Phone numbers

Release a phone number

Changed on

Releases a phone number from the account.

delete/phone_numbers/{id}

Request

  • Base URL
    https://api.surge.app
  • URL
    https://api.surge.app/phone_numbers/{id}
  • Auth
    HTTP bearer

Path parameters

idstring required

The ID of the phone number to release.

Example:pn_01j9a43avnfqzbjfch6pygv1td

Response

Released phone number

campaign_idstring nullable required

Deprecated. The unique identifier of the campaign this phone number is attached to, if any

idstring required

Unique identifier for the phone number

metadataMetadata required

Set of key-value pairs that will be stored with the object.

namestring nullable required

A human-readable name for the phone number

numberstring phone-number required

The phone number in E.164 format

type'local' | 'short_code' | 'toll_free' required

Whether the phone number is local, toll-free, or short code

Example response

{
  "campaign": {
    "attachment_status": "attached",
    "id": "cpn_01jjnn7s0zfx5tdcsxjfy93et2"
  },
  "campaign_id": "cpn_01jjnn7s0zfx5tdcsxjfy93et2",
  "id": "pn_01jsjwe4d9fx3tpymgtg958d9w",
  "metadata": {
    "location": "Downtown store"
  },
  "name": "(801) 555-1234",
  "number": "+18015551234",
  "type": "local"
}

Changes