Skip to main content
POST
/
porting_orders
/
{id}
/
verification_codes
/
send
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

await client.portingOrders.verificationCodes.send('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.porting_orders.verification_codes.send(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
package main

import (
"context"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.PortingOrders.VerificationCodes.Send(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.PortingOrderVerificationCodeSendParams{},
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.portingorders.verificationcodes.VerificationCodeSendParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

client.portingOrders().verificationCodes().send("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

result = telnyx.porting_orders.verification_codes.send_("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(result)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$result = $client->portingOrders->verificationCodes->send(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
phoneNumbers: ['+61424000001', '+61424000002'],
verificationMethod: 'sms',
);

var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx porting-orders:verification-codes send \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
curl --request POST \
--url https://api.telnyx.com/v2/porting_orders/{id}/verification_codes/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone_numbers": [
"+61424000001",
"+61424000002"
],
"verification_method": "sms"
}
'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Porting Order id

Body

application/json

A list of phone numbers to send the verification codes to and the method to send them by

phone_numbers
string[]
Maximum array length: 100
verification_method
enum<string>
Available options:
sms,
call

Response

No content