Skip to content
Markets open

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

NameInTypeDescription
tokenrequiredquerystring-

Response 200

FieldTypeDescription
datarequiredobject-
idrequireddata.idstring (uuid)-
contactNamerequireddata.contactNamestring | null-
companyNamerequireddata.companyNamestring | null-
jobTitledata.jobTitlestring | null-
avatarUrldata.avatarUrlstring | null-
logoUrldata.logoUrlstring | null-
countryrequireddata.countrystring | null-
verifiedrequireddata.verifiedboolean-
memberSincedata.memberSincestring (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.

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

FieldTypeDescription
datarequiredobject-
tokenrequireddata.tokenstring-

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

FieldTypeDescription
datarequiredobject-
tokenrequireddata.tokenstring-

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)

FieldTypeDescription
tokenrequiredstring-max 64 chars

Response 200

FieldTypeDescription
datarequiredobject-
connectionIdrequireddata.connectionIdstring (uuid)-
counterpartyrequireddata.counterpartyobjectSame 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

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
counterpartyrequireddata[].counterpartyobjectSame fields as ConnectionProfile, shown earlier on this page.
visibleRouteCountrequireddata[].visibleRouteCountinteger-
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.

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

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
connectionIdrequireddata.connectionIdstring (uuid)-
counterpartyrequireddata.counterpartyobjectSame fields as ConnectionProfile, shown earlier on this page.
theirRoutesrequireddata.theirRoutesobject[]-
idrequireddata.theirRoutes[].idstring (uuid)-
typerequireddata.theirRoutes[].typestring-One of voice, sms
countryrequireddata.theirRoutes[].countrystring | null-
countryCoderequireddata.theirRoutes[].countryCodestring | null-
prefixrequireddata.theirRoutes[].prefixstring[]-
destinationNamerequireddata.theirRoutes[].destinationNamestring | null-
pricePerUnitrequireddata.theirRoutes[].pricePerUnitmoneyYour 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".
customPricerequireddata.theirRoutes[].customPricemoney | nullUS 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".
cliTyperequireddata.theirRoutes[].cliTypestring | null-
capacityrequireddata.theirRoutes[].capacityinteger | null-
billingIncrementrequireddata.theirRoutes[].billingIncrementstring | null-
expectedAsrrequireddata.theirRoutes[].expectedAsrstring | null-
expectedAcdrequireddata.theirRoutes[].expectedAcdstring | null-
routeTyperequireddata.theirRoutes[].routeTypestring | null-
visibilityrequireddata.theirRoutes[].visibilitystring-
jingleSipIprequireddata.theirRoutes[].jingleSipIpenum | null-One of null
supportedCodecsrequireddata.theirRoutes[].supportedCodecsstring[] | null-
myRoutesrequireddata.myRoutesobject[]-
idrequireddata.myRoutes[].idstring (uuid)-
typerequireddata.myRoutes[].typestring-One of voice, sms
countryrequireddata.myRoutes[].countrystring | null-
countryCoderequireddata.myRoutes[].countryCodestring | null-
prefixrequireddata.myRoutes[].prefixstring[]-
destinationNamerequireddata.myRoutes[].destinationNamestring | null-
pricePerUnitrequireddata.myRoutes[].pricePerUnitmoneyYour 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".
customPricerequireddata.myRoutes[].customPricemoney | nullUS 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".
cliTyperequireddata.myRoutes[].cliTypestring | null-
capacityrequireddata.myRoutes[].capacityinteger | null-
billingIncrementrequireddata.myRoutes[].billingIncrementstring | null-
expectedAsrrequireddata.myRoutes[].expectedAsrstring | null-
expectedAcdrequireddata.myRoutes[].expectedAcdstring | null-
routeTyperequireddata.myRoutes[].routeTypestring | null-
visibilityrequireddata.myRoutes[].visibilitystring-
jingleSipIprequireddata.myRoutes[].jingleSipIpenum | null-One of null
supportedCodecsrequireddata.myRoutes[].supportedCodecsstring[] | null-
mySharesPrivaterequireddata.mySharesPrivateboolean-
theySharePrivaterequireddata.theySharePrivateboolean-
interconnectrequireddata.interconnectobject-
whitelistedIpsrequireddata.interconnect.whitelistedIpsinteger-
activePurchasesrequireddata.interconnect.activePurchasesinteger-

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

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
okrequireddata.okboolean-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

NameInTypeDescription
idrequiredpathstring-

Request body (application/json)

FieldTypeDescription
enabledrequiredboolean-

Response 200

FieldTypeDescription
datarequiredobject-
okrequireddata.okboolean-One of true
sharingrequireddata.sharingboolean-

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.