Skip to content

API reference

Connections

Your SIP and SMPP connections to the exchange.

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

Look up the account behind a connect code

GET/api/v1/connections/lookup

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

  • tokenrequired

    query · string

Response 200

  • datarequired

    object

  • idrequired

    string (uuid) · data.id

  • contactNamerequired

    string | null · data.contactName

  • companyNamerequired

    string | null · data.companyName

  • jobTitle

    string | null · data.jobTitle

  • avatarUrl

    string | null · data.avatarUrl

  • logoUrl

    string | null · data.logoUrl

  • countryrequired

    string | null · data.country

  • verifiedrequired

    boolean · data.verified

  • memberSince

    string (date-time) · data.memberSince

    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.

Get your connect code

GET/api/v1/connections/code

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Created on first read. Share it (or its QR) so another account can connect with you.

Response 200

  • datarequired

    object

  • tokenrequired

    string · data.token

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 your connect code

POST/api/v1/connections/code/rotate

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

The old code stops working. Existing connections are kept.

Response 200

  • datarequired

    object

  • tokenrequired

    string · data.token

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.

Connect with another account by its code

POST/api/v1/connections/connect

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Both sides can then see each other's public routes; the owner is notified.

Request body (application/json)

  • tokenrequired

    string

    max 64 chars

Response 200

  • datarequired

    object

  • connectionIdrequired

    string (uuid) · data.connectionId

  • counterpartyrequired

    object · data.counterparty

    Same fields as ConnectionProfile, 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.

List your connections

GET/api/v1/connections

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

  • datarequired

    object[]

  • idrequired

    string (uuid) · data[].id

  • counterpartyrequired

    object · data[].counterparty

    Same fields as ConnectionProfile, shown earlier on this page.
  • visibleRouteCountrequired

    integer · data[].visibleRouteCount

  • createdAtrequired

    string (date-time) · data[].createdAt

    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.

Get a connection with the routes each side can see

GET/api/v1/connections/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

  • idrequired

    path · string

Response 200

  • datarequired

    object

  • connectionIdrequired

    string (uuid) · data.connectionId

  • counterpartyrequired

    object · data.counterparty

    Same fields as ConnectionProfile, shown earlier on this page.
  • theirRoutesrequired

    object[] · data.theirRoutes

  • idrequired

    string (uuid) · data.theirRoutes[].id

  • typerequired

    string · data.theirRoutes[].type

    One of voice, sms
  • countryrequired

    string | null · data.theirRoutes[].country

  • countryCoderequired

    string | null · data.theirRoutes[].countryCode

  • prefixrequired

    string[] · data.theirRoutes[].prefix

  • destinationNamerequired

    string | null · data.theirRoutes[].destinationName

  • pricePerUnitrequired

    money · data.theirRoutes[].pricePerUnit

    Your negotiated price when the route was shared privately, else the list price USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • customPricerequired

    money | null · data.theirRoutes[].customPrice

    US dollars as a decimal string with exactly 6 decimal places, e.g. "0.012500". Do money arithmetic with a decimal type, not floating point. USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • cliTyperequired

    string | null · data.theirRoutes[].cliType

  • capacityrequired

    integer | null · data.theirRoutes[].capacity

  • billingIncrementrequired

    string | null · data.theirRoutes[].billingIncrement

  • expectedAsrrequired

    string | null · data.theirRoutes[].expectedAsr

  • expectedAcdrequired

    string | null · data.theirRoutes[].expectedAcd

  • routeTyperequired

    string | null · data.theirRoutes[].routeType

  • visibilityrequired

    string · data.theirRoutes[].visibility

  • jingleSipIprequired

    enum | null · data.theirRoutes[].jingleSipIp

    One of null
  • supportedCodecsrequired

    string[] | null · data.theirRoutes[].supportedCodecs

  • myRoutesrequired

    object[] · data.myRoutes

  • idrequired

    string (uuid) · data.myRoutes[].id

  • typerequired

    string · data.myRoutes[].type

    One of voice, sms
  • countryrequired

    string | null · data.myRoutes[].country

  • countryCoderequired

    string | null · data.myRoutes[].countryCode

  • prefixrequired

    string[] · data.myRoutes[].prefix

  • destinationNamerequired

    string | null · data.myRoutes[].destinationName

  • pricePerUnitrequired

    money · data.myRoutes[].pricePerUnit

    Your negotiated price when the route was shared privately, else the list price USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • customPricerequired

    money | null · data.myRoutes[].customPrice

    US dollars as a decimal string with exactly 6 decimal places, e.g. "0.012500". Do money arithmetic with a decimal type, not floating point. USD as a decimal string with exactly 6 places, e.g. "0.012500".
  • cliTyperequired

    string | null · data.myRoutes[].cliType

  • capacityrequired

    integer | null · data.myRoutes[].capacity

  • billingIncrementrequired

    string | null · data.myRoutes[].billingIncrement

  • expectedAsrrequired

    string | null · data.myRoutes[].expectedAsr

  • expectedAcdrequired

    string | null · data.myRoutes[].expectedAcd

  • routeTyperequired

    string | null · data.myRoutes[].routeType

  • visibilityrequired

    string · data.myRoutes[].visibility

  • jingleSipIprequired

    enum | null · data.myRoutes[].jingleSipIp

    One of null
  • supportedCodecsrequired

    string[] | null · data.myRoutes[].supportedCodecs

  • mySharesPrivaterequired

    boolean · data.mySharesPrivate

  • theySharePrivaterequired

    boolean · data.theySharePrivate

  • interconnectrequired

    object · data.interconnect

  • whitelistedIpsrequired

    integer · data.interconnect.whitelistedIps

  • activePurchasesrequired

    integer · data.interconnect.activePurchases

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.

Remove a connection

DELETE/api/v1/connections/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Private route access granted through the connection is revoked on both sides.

Parameters

  • idrequired

    path · string

Response 200

  • datarequired

    object

  • okrequired

    boolean · data.ok

    One of true

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.

Share or stop sharing your private routes with a connection

POST/api/v1/connections/{id}/share-private

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

  • idrequired

    path · string

Request body (application/json)

  • enabledrequired

    boolean

Response 200

  • datarequired

    object

  • okrequired

    boolean · data.ok

    One of true
  • sharingrequired

    boolean · data.sharing

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.