Skip to main content
GET
/
portouts
/
rejections
/
{portout_id}
JavaScript
import Telnyx from 'telnyx';

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

const response = await client.portouts.listRejectionCodes('329d6658-8f93-405d-862f-648776e8afd7');

console.log(response.data);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.portouts.list_rejection_codes(
portout_id="329d6658-8f93-405d-862f-648776e8afd7",
)
print(response.data)
package main

import (
"context"
"fmt"

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

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Portouts.ListRejectionCodes(
context.TODO(),
"329d6658-8f93-405d-862f-648776e8afd7",
telnyx.PortoutListRejectionCodesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.portouts.PortoutListRejectionCodesParams;
import com.telnyx.sdk.models.portouts.PortoutListRejectionCodesResponse;

public final class Main {
private Main() {}

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

PortoutListRejectionCodesResponse response = client.portouts().listRejectionCodes("329d6658-8f93-405d-862f-648776e8afd7");
}
}
require "telnyx"

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

response = telnyx.portouts.list_rejection_codes("329d6658-8f93-405d-862f-648776e8afd7")

puts(response)
<?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 {
$response = $client->portouts->listRejectionCodes(
'329d6658-8f93-405d-862f-648776e8afd7', filter: ['code' => 1002]
);

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx portouts list-rejection-codes \
--api-key 'My API Key' \
--portout-id 329d6658-8f93-405d-862f-648776e8afd7
curl --request GET \
--url https://api.telnyx.com/v2/portouts/rejections/{portout_id} \
--header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "code": 1002,
      "description": "Invalid PIN",
      "reason_required": false
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

portout_id
string
required

Identifies a port out order.

Example:

"329d6658-8f93-405d-862f-648776e8afd7"

Query Parameters

filter
object

Consolidated filter parameter (deepObject style). Originally: filter[code], filter[code][in]

Response

Successful response

data
object[]