Skip to content
Markets open

API reference

Interconnections

The SIP IP whitelist and connectivity tests for your traffic.

11 operationsBase URL https://packetexchange.io/api/v1Postman collection

List your whitelisted source IPs

GET/api/v1/interconnections/ips

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
userIdrequireddata[].userIdstring (uuid)-
ipAddressrequireddata[].ipAddressstringIPv4/IPv6 address, optionally with a CIDR suffix
labelrequireddata[].labelstring | null-
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Whitelist a source IP for your traffic

POST/api/v1/interconnections/ips

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)

An address can authenticate for one account only; an address already registered elsewhere is refused with VALIDATION_ERROR.

Request body (application/json)

FieldTypeDescription
ipAddressrequiredstring-max 49 chars
labelstring-max 100 chars

Response 201

FieldTypeDescription
datarequiredobjectSame fields as WhitelistedIp, shown earlier on this page.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Remove a whitelisted source IP

DELETE/api/v1/interconnections/ips/{id}

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)

Traffic from the address is refused from then on.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
messagerequireddata.messagestring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List your interconnections

GET/api/v1/interconnections

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

One per purchase, with your credentials, the route (never its seller endpoint) and pricing: what you are actually billed on the route. route.pricePerUnit is the list price only.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
purchaseIdrequireddata[].purchaseIdstring (uuid)-
typerequireddata[].typestring-One of sip, smpp, api
buyerEndpointrequireddata[].buyerEndpointobject | nullYour own connection settings and credentials
sellerEndpointrequireddata[].sellerEndpointenum | nullAlways null: the seller endpoint is never shown to buyersOne of null
statusrequireddata[].statusstring-One of active, inactive
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata[].updatedAtstring (date-time)ISO-8601 timestamp (UTC)
purchaserequireddata[].purchaseobject | null-
idrequireddata[].purchase.idstring (uuid)-
statusrequireddata[].purchase.statusstring-
sipUsernamerequireddata[].purchase.sipUsernamestring | null-
sipPasswordrequireddata[].purchase.sipPasswordstring | null-
smppSystemIdrequireddata[].purchase.smppSystemIdstring | null-
smppPasswordrequireddata[].purchase.smppPasswordstring | null-
routerequireddata[].routeobject | null-
idrequireddata[].route.idstring (uuid)-
typerequireddata[].route.typestring-One of voice, sms
countryrequireddata[].route.countrystring | null-
countryCoderequireddata[].route.countryCodestring | null-
prefixrequireddata[].route.prefixstring[]-
destinationNamerequireddata[].route.destinationNamestring | nullThe listing name as a buyer reads it: generated by the platform, never the seller's text, and ending in the listing reference (e.g. "Niger Mobile · Ref 7K2Q", "A-Z Voice · Premium · Full CLI · Ref 3MX9"). Your own listings keep the name you gave them.
listingRefdata[].route.listingRefstringAnonymous short reference of the listing (4 characters, e.g. "7K2Q"): stable for the life of the listing, unique enough to tell two same-named listings apart, and derived from the listing alone (it says nothing about the seller). Absent on your own listings.
pricePerUnitrequireddata[].route.pricePerUnitmoneyList price only; see pricing for what you pay USD as a decimal string with exactly 6 places, e.g. "0.012500".
billingIncrementrequireddata[].route.billingIncrementstring | null-
jingleSipIprequireddata[].route.jingleSipIpenum | null-One of null
capacityrequireddata[].route.capacityinteger | null-
rateCountrequireddata[].route.rateCountintegerDestinations on the rate deck; > 0 means priced per destination
pricingrequireddata[].pricingobject | nullYour real rate basis for this route
basisrequireddata[].pricing.basisstring-One of flat, per_destination

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get an interconnection

GET/api/v1/interconnections/{id}

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

In buyerEndpoint the SIP password is replaced by sipPasswordSet (here and on the two PUTs); the list endpoint carries your plaintext credentials for the connection card.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
purchaseIdrequireddata.purchaseIdstring (uuid)-
typerequireddata.typestring-One of sip, smpp, api
buyerEndpointrequireddata.buyerEndpointobject | nullYour own connection settings and credentials
sellerEndpointrequireddata.sellerEndpointenum | nullAlways null: the seller endpoint is never shown to buyersOne of null
statusrequireddata.statusstring-One of active, inactive
createdAtrequireddata.createdAtstring (date-time)ISO-8601 timestamp (UTC)
updatedAtrequireddata.updatedAtstring (date-time)ISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Update an interconnection

PUT/api/v1/interconnections/{id}

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
buyerEndpointobject-
statusstring-One of active, inactive

Response 200

FieldTypeDescription
datarequiredobjectSame fields as Interconnection, shown earlier on this page.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Set delivery-receipt settings on an SMS interconnection

PUT/api/v1/interconnections/{id}/dlr-config

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)

Stores whether to request delivery receipts and the https callback URL for them.

Parameters

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
requestDlrsrequiredboolean-
dlrCallbackUrlstring (uri) | null-

Response 200

FieldTypeDescription
datarequiredobjectSame fields as Interconnection, shown earlier on this page.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Test connectivity on a purchased route

POST/api/v1/interconnections/test

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)
Real traffic
Sends real test traffic over the purchased route.

sip_options probes reachability from every media worker. test_call places a real billed test call to testNumber; smpp_bind checks an SMS bind. Test calls and binds are capped per purchase per hour and per day.

Request body (application/json)

FieldTypeDescription
purchaseIdrequiredstring (uuid)-
testTypestring-default "sip_options"One of sip_options, test_call, smpp_bind
testNumberstring-max 30 chars
testClistring-max 30 chars

Response 200

FieldTypeDescription
datarequiredobject-
statusrequireddata.statusstringOutcome: connected, degraded, failed, no_answer, error or unknown
messagerequireddata.messagestring-
detailsrequireddata.detailsobjectDiagnostic trace. Never carries the seller address.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get a summary of your interconnect setup

GET/api/v1/interconnections/status/summary

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject-
whitelistedIpsrequireddata.whitelistedIpsinteger-
activePurchasesrequireddata.activePurchasesinteger-
activeInterconnectionsrequireddata.activeInterconnectionsinteger-
totalInterconnectionsrequireddata.totalInterconnectionsinteger-
sipPublicIprequireddata.sipPublicIpstringThe edge address to send SIP traffic to

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get live connection health per purchase

GET/api/v1/interconnections/health

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

SIP purchases report whether the switch is up and the route configured; SMS purchases report their SMPP bind state.

Response 200

FieldTypeDescription
datarequiredobject[]-
purchaseIdrequireddata[].purchaseIdstring (uuid)-
protocolrequireddata[].protocolstring-One of sip, smpp
boundrequireddata[].boundboolean-
boundAtrequireddata[].boundAtstring (date-time) | nullISO-8601 timestamp (UTC)
lastMessageAtrequireddata[].lastMessageAtstring (date-time) | nullISO-8601 timestamp (UTC)
remoteIprequireddata[].remoteIpstring | null-
configureddata[].configuredboolean-
reachablerequireddata[].reachableboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Rotate the SIP and SMPP credentials on a purchase

POST/api/v1/interconnections/{purchaseId}/rotate-credentials

Access
API key. Scoped keys need account:write.
Rate limit
100 requests per second (the default)

Issues new credentials, returned once. The old ones stop working immediately and open SMPP binds are dropped.

Parameters

NameInTypeDescription
purchaseIdrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
sipUsernamerequireddata.sipUsernamestring-
sipPasswordrequireddata.sipPasswordstring-
smppSystemIdrequireddata.smppSystemIdstring-
smppPasswordrequireddata.smppPasswordstring-
unboundSessionsrequireddata.unboundSessionsinteger-
messagerequireddata.messagestring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.