Short Code Numbers

Overview

A short number (4-6 digits) used for sending and receiving SMS and MMS messages to mobile phones in a single country. Short code numbers are strictly domestic and are not recommended for sending international traffic.

API Access

The following API requests can only be made using a valid access key, and attached to an access role, with an access policy that at least specifies the permissions to the resources outlined in each section below. Learn more about API access.

List Short Code Numbers

In order to retrieve all short code numbers available in your workspace you can use this request.

List Workspace Short Code Numbers

GET/workspaces/{workspaceId}/numbers-short-code
Authorization
Query parameters
Response

OK

Body
nextPageTokenstring

The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.

results*array of WorkspaceShortCodeNumber (object)
Request
const response = await fetch('/workspaces/{workspaceId}/numbers-short-code', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "nextPageToken": "text",
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "endpointId": "123e4567-e89b-12d3-a456-426614174000",
      "type": "dedicated",
      "numberString": "text",
      "countryCode": "text",
      "capabilities": {
        "voice": {
          "inbound": false,
          "outbound": false
        },
        "sms": {
          "inbound": false,
          "outbound": false
        },
        "mms": {
          "inbound": false,
          "outbound": false
        }
      },
      "createdAt": "2025-01-07T03:33:27.242Z",
      "updatedAt": "2025-01-07T03:33:27.242Z",
      "endpoint": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "long-code-number",
        "instanceId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "capabilities": [
          {
            "name": "sms",
            "inbound": {
              "status": "active",
              "issues": [
                "subscription-is-not-active"
              ]
            },
            "outbound": {
              "status": "active",
              "destinationStatuses": {
                "active": 0,
                "inactive": 0,
                "available": 0,
                "unavailable": 0
              },
              "supportsDestinations": false,
              "issues": [
                "subscription-is-not-active"
              ]
            }
          }
        ],
        "dependencies": [
          {
            "type": "connector",
            "connectorId": "123e4567-e89b-12d3-a456-426614174000",
            "connectorTemplateRef": "text",
            "capabilities": [
              "voice"
            ]
          }
        ],
        "issues": [
          "subscription-is-not-active"
        ],
        "provisioningStatus": "provisioned",
        "createdAt": "2025-01-07T03:33:27.242Z",
        "updatedAt": "2025-01-07T03:33:27.242Z"
      }
    }
  ]
}

curl "https://api.bird.com/workspaces/{workpaceId}/numbers-short-code/" \
     -H 'Authorization: Bearer <your-access-key>'

Get a Short Code Number

In order to retrieve the details of a short code number available in your workspace you can use this request.

Get Workspace Short Code Number

GET/workspaces/{workspaceId}/numbers-short-code/{shortCodeNumberId}
Authorization
Path parameters
workspaceId*string
shortCodeNumberId*string
Response

OK

Body
id*string (uuid)
endpointId*string (uuid)
type*ShortCodeNumberType (enum)
dedicatedvanityshared
numberString*string
countryCode*string (iso3166-1)
capabilities*PhoneNumberCapabilities (object)

Capabilities of the phone number

createdAt*string (date-time)
updatedAt*string (date-time)
endpoint*EndpointFragment (object)
Request
const response = await fetch('/workspaces/{workspaceId}/numbers-short-code/{shortCodeNumberId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "endpointId": "123e4567-e89b-12d3-a456-426614174000",
  "type": "dedicated",
  "numberString": "text",
  "countryCode": "text",
  "capabilities": {
    "voice": {
      "inbound": false,
      "outbound": false
    },
    "sms": {
      "inbound": false,
      "outbound": false
    },
    "mms": {
      "inbound": false,
      "outbound": false
    }
  },
  "createdAt": "2025-01-07T03:33:27.242Z",
  "updatedAt": "2025-01-07T03:33:27.242Z",
  "endpoint": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "long-code-number",
    "instanceId": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "capabilities": [
      {
        "name": "sms",
        "inbound": {
          "status": "active",
          "issues": [
            "subscription-is-not-active"
          ]
        },
        "outbound": {
          "status": "active",
          "destinationStatuses": {
            "active": 0,
            "inactive": 0,
            "available": 0,
            "unavailable": 0
          },
          "supportsDestinations": false,
          "issues": [
            "subscription-is-not-active"
          ]
        }
      }
    ],
    "dependencies": [
      {
        "type": "connector",
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text",
        "capabilities": [
          "voice"
        ]
      }
    ],
    "issues": [
      "subscription-is-not-active"
    ],
    "provisioningStatus": "provisioned",
    "createdAt": "2025-01-07T03:33:27.242Z",
    "updatedAt": "2025-01-07T03:33:27.242Z"
  }
}

curl "https://api.bird.com/workspaces/{workpaceId}/numbers-short-code/{shorCodeNumberId}" \
     -H 'Authorization: Bearer <your-access-key>'

Last updated