Buying a number through Bird

If you require a number for your customer, these are available to acquire through Bird CRM using our numbers API. Once you purchase the number this will automatically be verified on WhatsApp for use in the embedded signup flow.

Find an available number

If you do not already have a number available in your workspace you can find one to purchase

List all available numbers in stock at organization level.

GET/organizations/{organizationId}/numbers-stock-items
Authorization
Path parameters
organizationId*OrganizationId (string (uuid))

The ID for the organization.

Example: "d0b85ccc-b63a-4e81-b698-c359d77d250e"
Query parameters
Response

OK

Body
results*array of NumberStockItem (object)
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. To know more, refer to the pagination section.

Request
const response = await fetch('/organizations/{organizationId}/numbers-stock-items', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "countryCode": "US",
      "type": "local",
      "numberString": "+19283764510",
      "capabilities": {
        "voice": {
          "inbound": false,
          "outbound": false
        },
        "sms": {
          "inbound": false,
          "outbound": false
        },
        "mms": {
          "inbound": false,
          "outbound": false
        }
      },
      "monthlyPrice": {
        "currencyCode": "EUR",
        "amount": 3500000,
        "exponent": -6
      },
      "backOrderRequired": false,
      "backOrderStockId": "text"
    }
  ],
  "nextPageToken": "text"
}

Purchase a number

Once you have found an available number, you can purchase it by providing the number (using the unique identifier provided by the endpoint above).

Buy Long Code Numbers

Assigns Long Code Numbers to the current workspace, charging the wallet for their subscription price. When creating LCNs as a User, all specified Number Stock Items should be reserved.

POST/workspaces/{workspaceId}/numbers-long-code
Authorization
Path parameters
workspaceId*WorkspaceId (string (uuid))

The ID for the workspace.

Example: "d386a801-ee8d-4aba-a7e4-78671bd3b11e"
Body
numberStockItemIds*array of string (uuid)

The unique identifiers of the numbers you want to buy. You can buy up to 25 numbers at a time. This operation will incur wallet charges for the numbers. Before buying the number, you must reserve it.

Response

Created

Body
results*array of WorkspaceLongCodeNumber (object)
Request
const response = await fetch('/workspaces/{workspaceId}/numbers-long-code', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "numberStockItemIds": [
        "123e4567-e89b-12d3-a456-426614174000"
      ]
    }),
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "41e3cf43-4386-464a-a1ee-e6ef6fd6883d",
      "endpointId": "41e3cf43-4386-464a-a1ee-e6ef6fd6883d",
      "numberString": "+14155552671",
      "countryCode": "US",
      "type": "local",
      "capabilities": {
        "voice": {
          "inbound": false,
          "outbound": false
        },
        "sms": {
          "inbound": false,
          "outbound": false
        },
        "mms": {
          "inbound": false,
          "outbound": false
        }
      },
      "createdAt": "2024-12-21T11:58:14.062Z",
      "updatedAt": "2024-12-21T11:58:14.062Z",
      "order": {
        "countryCode": "US",
        "type": "local",
        "capabilities": [
          "voice"
        ],
        "prefix": "text",
        "status": "draft",
        "createdAt": "2024-12-21T11:58:14.062Z",
        "updatedAt": "2024-12-21T11:58:14.062Z"
      },
      "deprovisionAt": "2024-12-21T11:58:14.062Z",
      "endpoint": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "type": "long-code-number",
        "instanceId": "1551f382-6870-4480-8f9b-f5ab34936288",
        "name": "+14155552671",
        "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": "2024-12-21T11:58:14.062Z",
        "updatedAt": "2024-12-21T11:58:14.062Z"
      }
    }
  ]
}

A successful request to this endpoint will start a recurring monthly subscription based on the monthly cost of the number

Subscribing to channel created webhooks

Last updated