Skip to content

API reference

Route blends

Blended routes that spread traffic across several member routes.

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

Preview a blended route

POST/api/v1/routes/blends/preview

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

Request body (application/json)

  • membersrequired

    object[]

  • memberRouteId

    string (uuid) | null · members[].memberRouteId

  • memberVendorTrunkId

    string (uuid) | null · members[].memberVendorTrunkId

  • raterequired

    number · members[].rate

    min 0
  • weightPctrequired

    number · members[].weightPct

    0 to 100
  • routeType

    string · members[].routeType

    One of direct, premium, standard, ncli
  • capacity

    integer · members[].capacity

    min 0
  • maxCps

    integer · members[].maxCps

    min 0
  • priority

    integer · members[].priority

    1 to 20
  • enabled

    boolean · members[].enabled

  • type

    string

    One of voice, sms
  • countryCode

    string

  • numberType

    string

    One of mobile, fixed, both

Response 200

  • datarequired

    object

  • blendedRaterequired

    number · data.blendedRate

    Weighted rate (display figure)
  • capacityrequired

    number · data.capacity

  • memberCountrequired

    integer · data.memberCount

  • membersrequired

    object[] · data.members

  • coveragerequired

    object | null · data.coverage

  • coverageSummaryrequired

    string | null · data.coverageSummary

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.

Propose the cheapest complete blend for a destination

POST/api/v1/routes/blends/propose

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
20 requests per minute

Request body (application/json)

  • type

    string

    default "voice"One of voice, sms
  • countryCoderequired

    string

  • numberType

    string

    default "both"One of mobile, fixed, both

Response 200

  • datarequired

    object

    Proposed members, their coverage and a coverage summary

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 blended routes

GET/api/v1/routes/blends

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

Response 200

  • datarequired

    object[]

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.

Create a blended route

POST/api/v1/routes/blends

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
30 requests per minute

Refused when no member is enabled, or when the blend cannot carry the destination it claims unless acknowledgeIncomplete is set.

Request body (application/json)

  • namerequired

    string

    max 255 chars
  • typerequired

    string

    One of voice, sms
  • countryrequired

    string

    max 100 chars
  • countryCoderequired

    string

  • prefix

    string[]

  • destinationName

    string

    max 255 chars
  • cliType

    string

    One of full_cli, ncli, local_cli, mixed_cli
  • billingIncrement

    string

  • visibility

    string

    One of public, private
  • dialerCompatible

    boolean

  • membersrequired

    object[]

  • memberRouteId

    string (uuid) | null · members[].memberRouteId

  • memberVendorTrunkId

    string (uuid) | null · members[].memberVendorTrunkId

  • raterequired

    number · members[].rate

    min 0
  • weightPctrequired

    number · members[].weightPct

    0 to 100
  • routeType

    string · members[].routeType

    One of direct, premium, standard, ncli
  • capacity

    integer · members[].capacity

    min 0
  • maxCps

    integer · members[].maxCps

    min 0
  • priority

    integer · members[].priority

    1 to 20
  • enabled

    boolean · members[].enabled

  • numberType

    string

    One of mobile, fixed, both
  • acknowledgeIncomplete

    boolean

Response 201

  • datarequired

    object

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 blended route

GET/api/v1/routes/blends/{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

  • idrequired

    string (uuid) · data.id

  • namerequired

    string · data.name

  • typerequired

    string · data.type

    One of voice, sms
  • countryrequired

    string · data.country

  • countryCoderequired

    string · data.countryCode

  • visibilityrequired

    string · data.visibility

    One of public, private
  • statusrequired

    string · data.status

    One of active, paused, suspended, pending_review
  • numberTyperequired

    string | null · data.numberType

  • coveragerequired

    object | null · data.coverage

  • coverageSummaryrequired

    string | null · data.coverageSummary

  • 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.
  • 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 a blended route

PATCH/api/v1/routes/blends/{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

Request body (application/json)

  • name

    string

    max 255 chars
  • visibility

    string

    One of public, private
  • dialerCompatible

    boolean

  • members

    object[]

  • memberRouteId

    string (uuid) | null · members[].memberRouteId

  • memberVendorTrunkId

    string (uuid) | null · members[].memberVendorTrunkId

  • raterequired

    number · members[].rate

    min 0
  • weightPctrequired

    number · members[].weightPct

    0 to 100
  • routeType

    string · members[].routeType

    One of direct, premium, standard, ncli
  • capacity

    integer · members[].capacity

    min 0
  • maxCps

    integer · members[].maxCps

    min 0
  • priority

    integer · members[].priority

    1 to 20
  • enabled

    boolean · members[].enabled

  • numberType

    string

    One of mobile, fixed, both
  • acknowledgeIncomplete

    boolean

Response 200

  • datarequired

    object

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.

Archive a blended route

DELETE/api/v1/routes/blends/{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

  • archivedrequired

    boolean · data.archived

    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.