HCC Docs

Numbers

List phone numbers, newest first

GET /v1/numbers numbers:read

Query

  • limit integer
  • cursor string

Responses

  • 200

    A page of phone numbers

    Fields
    • data PhoneNumber[] required
      Fields
      • id string required
      • e164 string required
      • provider string required
      • defaultAgentId string | null required
      • callWebhookUrl string | null required
      • flow string | null required

        Call flow inbound calls run, if set

      • createdAt string | null required
    • nextCursor string | null required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code

Get a phone number

GET /v1/numbers/{id} numbers:read

Path

  • id string required

Responses

  • 200

    Phone number

    Fields
    • data PhoneNumber required
      Fields
      • id string required
      • e164 string required
      • provider string required
      • defaultAgentId string | null required
      • callWebhookUrl string | null required
      • flow string | null required

        Call flow inbound calls run, if set

      • createdAt string | null required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code

Set the call flow of a phone number

PATCH /v1/numbers/{id} numbers:write

Inbound calls to the number run this flow from the live environment, instead of its call webhook. The flow must be registered. Live keys only.

Path

  • id string required

Body

  • flow string | null required

    Inbound calls to this number run this call flow; null clears it.

Responses

  • 200

    Phone number

    Fields
    • data PhoneNumber required
      Fields
      • id string required
      • e164 string required
      • provider string required
      • defaultAgentId string | null required
      • callWebhookUrl string | null required
      • flow string | null required

        Call flow inbound calls run, if set

      • createdAt string | null required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 403

    A test key (live_mode_only): this change needs a live API key

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code

Release a phone number

DELETE /v1/numbers/{id} numbers:write

Managed numbers are released at the provider. Numbers in your own connected account are never released: their previous webhook configuration is restored and they are unlinked. Live keys only.

Path

  • id string required

Responses

  • 204

    Released or unlinked

  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 403

    A test key (live_mode_only): this change needs a live API key

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code