Skip to main content
GET
/
portouts
/
events
/
{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 event = await client.portouts.events.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(event.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
)
event = client.portouts.events.retrieve(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(event.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"),
)
event, err := client.Portouts.Events.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", event.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.events.EventRetrieveParams;
import com.telnyx.sdk.models.portouts.events.EventRetrieveResponse;

public final class Main {
private Main() {}

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

EventRetrieveResponse event = client.portouts().events().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}
require "telnyx"

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

event = telnyx.portouts.events.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(event)
<?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 {
$event = $client->portouts->events->retrieve(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'
);

var_dump($event);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx portouts:events retrieve \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
curl --request GET \
--url https://api.telnyx.com/v2/portouts/events/{id} \
--header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "eef3340b-8903-4466-b445-89b697315a3a",
    "event_type": "portout.status_changed",
    "portout_id": "9471c873-e3eb-4ca1-957d-f9a451334d52",
    "available_notification_methods": [],
    "payload_status": "created",
    "payload": {
      "id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
      "status": "authorized",
      "phone_numbers": [
        "+35312345678"
      ],
      "carrier_name": "Testing Carrier",
      "spid": "987H",
      "user_id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
      "subscriber_name": "John Doe",
      "rejection_reason": null,
      "attempted_pin": "1234"
    },
    "record_type": "portout_event",
    "created_at": "2021-03-19T10:07:15.527000Z",
    "updated_at": "2021-03-19T10:07:15.527000Z"
  }
}

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

Identifies the port-out event.

Response

Successful response

data
object