# 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/numbers-api.md) 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&#x20;

## GET /organizations/{organizationId}/numbers-stock-items

> List all available numbers in stock.

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[{"description":"Manage a number within a workspace.","name":"numbers"}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"parameters":{"pagination.param.limit":{"description":"Limits the number of results to return.","in":"query","name":"limit","schema":{"default":25,"maximum":100,"type":"integer"}},"pagination.param.pageToken":{"description":"The cursor that keeps track of the current position in the results.","in":"query","name":"pageToken","schema":{"type":"string"}},"queryCountryCodes":{"allowEmptyValue":false,"in":"query","name":"countryCodes","schema":{"description":"A 2-digit ISO 3166-1 country code array.","items":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":"array"}},"queryLongCodeNumberTypes":{"allowEmptyValue":false,"description":"The number type depending on its purpose. Local for regional use, national for countrywide use, mobile for mobile networks, or toll-free for caller-free charging.","in":"query","name":"types","schema":{"items":{"$ref":"#/components/schemas/LongCodeNumberType"},"type":"array"}},"queryNumberFeatures":{"allowEmptyValue":false,"description":"The number capabilities, which can be voice, SMS, and MMS for inbound, outbound, or two-way communication, plus WhatsApp.","in":"query","name":"features","schema":{"items":{"$ref":"#/components/schemas/NumberFilterFeature"},"minItems":1,"type":"array"}},"queryNumberPrefix":{"description":"Used to filter numbers by area code. Accepts either bare area code digits (e.g. `205` for Alabama) or a full E.164 prefix (e.g. `+1205`). Partial prefixes are supported for autocomplete use cases (e.g. `+120` matches all numbers in area codes 202, 203, 205, 206, 207, 208, 209). Must be used together with the `countryCodes` filter.","in":"query","name":"prefix","schema":{"maxLength":250,"minLength":1,"type":"string"}},"queryTesting":{"in":"query","name":"testing","schema":{"type":"boolean"}}},"schemas":{"NumbersCountryCode":{"type":"string","format":"iso3166-1","description":"The country code in ISO 3166-1 alpha-2 format."},"LongCodeNumberType":{"type":"string","description":"The type of long code number.","enum":["local","national","toll-free","mobile"]},"NumberFilterFeature":{"type":"string","enum":["voice-outbound","voice-inbound","sms-outbound","sms-inbound","mms-outbound","mms-inbound","whatsapp"]},"NumberStockItem":{"type":"object","required":["id","countryCode","type","numberString","capabilities","monthlyPrice"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the stock item."},"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"numberString":{"type":"string"},"capabilities":{"$ref":"#/components/schemas/PhoneNumberCapabilities"},"monthlyPrice":{"$ref":"#/components/schemas/Money"},"backOrderRequired":{"type":"boolean","description":"Whether back order is required for this item, available but it is not in the local inventory"},"backOrderStockId":{"type":"string","description":"The stock id of the back order item, to be used when creating back order","nullable":true}}},"PhoneNumberCapabilities":{"type":"object","description":"Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.","required":["voice","sms","mms"],"properties":{"voice":{"$ref":"#/components/schemas/PhoneNumberCapability"},"sms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"mms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"whatsapp":{"$ref":"#/components/schemas/PhoneNumberCapability"}}},"PhoneNumberCapability":{"type":"object","required":["inbound","outbound"],"properties":{"inbound":{"type":"boolean","description":"Whether the number supports inbound use cases."},"outbound":{"type":"boolean","description":"Whether the number supports outbound use cases."}}},"Money":{"type":"object","title":"Money","additionalProperties":false,"description":"Money combines an amount of money with its currency.","nullable":true,"properties":{"currencyCode":{"$ref":"#/components/schemas/Currency"},"amount":{"$ref":"#/components/schemas/Amount"},"exponent":{"$ref":"#/components/schemas/Exponent"}},"required":["currencyCode","amount","exponent"]},"Currency":{"title":"Currency Code","description":"Currency as ISO 4217 code (three digits). An example would be `EUR` for Euro.","type":"string","enum":["EUR","USD","GBP","AUD","SGD","IDR","INR","MXN"]},"Amount":{"type":"integer","format":"int64"},"Exponent":{"description":"Usually a negative number to specify the exponent for decimal precision. e.g., `1540 * (10^-2) = 15.4`","type":"integer","format":"int32","minimum":-10},"pagination":{"properties":{"nextPageToken":{"description":"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.","type":"string"}},"type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/organizations/{organizationId}/numbers-stock-items":{"get":{"operationId":"listOrganizationNumbersStockItems","summary":"List all available numbers in stock.","parameters":[{"$ref":"#/components/parameters/pagination.param.limit"},{"$ref":"#/components/parameters/pagination.param.pageToken"},{"$ref":"#/components/parameters/queryCountryCodes"},{"$ref":"#/components/parameters/queryLongCodeNumberTypes"},{"$ref":"#/components/parameters/queryNumberFeatures"},{"$ref":"#/components/parameters/queryNumberPrefix"},{"$ref":"#/components/parameters/queryTesting"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"results":{"items":{"$ref":"#/components/schemas/NumberStockItem"},"type":"array"}},"required":["results"],"type":"object"},{"$ref":"#/components/schemas/pagination"}]}}},"description":"OK"},"422":{"$ref":"#/components/responses/error.response.invalid_request"}},"tags":["numbers"]}}}}
```

## 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.<br>

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[{"description":"Manage long code numbers.","name":"long_code_numbers"}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"CreateWorkspaceLongCodeNumbers":{"type":"object","additionalProperties":false,"required":["numberStockItemIds"],"properties":{"numberStockItemIds":{"type":"array","maxItems":25,"description":"The unique identifiers of the numbers you want to buy. You can buy up to 25 numbers at a time.\nThis operation will incur wallet charges for the numbers. Before buying the number, you must reserve it.\n","items":{"type":"string","format":"uuid"}}}},"WorkspaceLongCodeNumber":{"type":"object","allOf":[{"$ref":"#/components/schemas/LongCodeNumberFragment"},{"type":"object","required":["endpoint"],"properties":{"endpoint":{"$ref":"#/components/schemas/EndpointFragment"}}}]},"LongCodeNumberFragment":{"type":"object","required":["id","endpointId","numberString","countryCode","capabilities","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the long code number. The endpoint ID is the same."},"endpointId":{"type":"string","format":"uuid","description":"The unique identifier of the endpoint. The long conde ID is the same."},"numberString":{"type":"string","description":"The phone number in E.164 format."},"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"capabilities":{"$ref":"#/components/schemas/PhoneNumberCapabilities"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"order":{"$ref":"#/components/schemas/LongCodeNumberOrder","description":"The order that created this long code number. It contains information such as the capabilities, order status and type."},"deprovisionAt":{"type":"string","format":"date-time","description":"The date and time when the long code number should be deprovisioned."}}},"NumbersCountryCode":{"type":"string","format":"iso3166-1","description":"The country code in ISO 3166-1 alpha-2 format."},"LongCodeNumberType":{"type":"string","description":"The type of long code number.","enum":["local","national","toll-free","mobile"]},"PhoneNumberCapabilities":{"type":"object","description":"Capabilities of the phone number. It shows if the phone number supports voice, sms and/or mms.","required":["voice","sms","mms"],"properties":{"voice":{"$ref":"#/components/schemas/PhoneNumberCapability"},"sms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"mms":{"$ref":"#/components/schemas/PhoneNumberCapability"},"whatsapp":{"$ref":"#/components/schemas/PhoneNumberCapability"}}},"PhoneNumberCapability":{"type":"object","required":["inbound","outbound"],"properties":{"inbound":{"type":"boolean","description":"Whether the number supports inbound use cases."},"outbound":{"type":"boolean","description":"Whether the number supports outbound use cases."}}},"LongCodeNumberOrder":{"type":"object","required":["countryCode","type","capabilities","status","createdAt","updatedAt"],"properties":{"countryCode":{"$ref":"#/components/schemas/NumbersCountryCode"},"type":{"$ref":"#/components/schemas/LongCodeNumberType"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapabilityName"}},"prefix":{"type":"string"},"status":{"$ref":"#/components/schemas/LongCodeNumberOrderStatus"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"EndpointCapabilityName":{"type":"string","enum":["voice","sms","mms","whatsapp","email","rcs-google"]},"LongCodeNumberOrderStatus":{"type":"string","enum":["draft","submitted","processing","fulfilled","rejected","cancelled"]},"EndpointFragment":{"type":"object","description":"A representation of an endpoint. It contains details such as the capabilities, dependencies, and more.","required":["id","type","instanceId","name","capabilities","provisioningStatus","createdAt","updatedAt"],"properties":{"id":{"$ref":"#/components/schemas/EndpointId"},"type":{"$ref":"#/components/schemas/EndpointType"},"instanceId":{"$ref":"#/components/schemas/InstanceId"},"name":{"$ref":"#/components/schemas/EndpointName"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapability"}},"dependencies":{"type":"array","description":"The dependencies of the endpoint. It shows the connectors that the endpoint is connected to.","items":{"$ref":"#/components/schemas/EndpointDependency"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}},"provisioningStatus":{"$ref":"#/components/schemas/EndpointProvisioningStatus"},"whatsApp":{"description":"WhatsApp pre-verification details for this endpoint, if applicable. Only present for long code numbers from WhatsApp-capable providers.","nullable":true,"$ref":"#/components/schemas/WorkspaceWhatsAppNumber"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"EndpointId":{"type":"string","format":"uuid","description":"The ID of the endpoint."},"EndpointType":{"type":"string","description":"The type of the endpoint. It can be a long code number, short code number, alpha number, ip pool, or rcs google agent.","enum":["long-code-number","short-code-number","alpha-number","ip-pool","rcs-google-agent"]},"InstanceId":{"type":"string","format":"uuid","description":"The unique identifier of the instance."},"EndpointName":{"type":"string","description":"The name of the endpoint. For some cases it will be the number in international format as string."},"EndpointCapability":{"type":"object","description":"The capability of the endpoint. It shows what capabilities the endpoint supports and which direction (inbound, which means receiving messages, and outbound, which means sending messages). Also, it shows the status for that capability/direction combination.","discriminator":{"propertyName":"name","mapping":{"sms":"#/components/schemas/EndpointCapabilitySMS","mms":"#/components/schemas/EndpointCapabilityMMS","voice":"#/components/schemas/EndpointCapabilityVoice","whatsapp":"#/components/schemas/EndpointCapabilityWhatsapp","email":"#/components/schemas/EndpointCapabilityEmail","rcs-google":"#/components/schemas/EndpointCapabilityRcsGoogle"}},"oneOf":[{"$ref":"#/components/schemas/EndpointCapabilitySMS"},{"$ref":"#/components/schemas/EndpointCapabilityMMS"},{"$ref":"#/components/schemas/EndpointCapabilityVoice"},{"$ref":"#/components/schemas/EndpointCapabilityWhatsapp"},{"$ref":"#/components/schemas/EndpointCapabilityEmail"},{"$ref":"#/components/schemas/EndpointCapabilityRcsGoogle"}]},"EndpointCapabilitySMS":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["sms"]}}}]},"EndpointCapabilityFields":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/EndpointCapabilityName"},"inbound":{"$ref":"#/components/schemas/InboundEndpointCapability"},"outbound":{"$ref":"#/components/schemas/OutboundEndpointCapability"}}},"InboundEndpointCapability":{"type":"object","nullable":true,"required":["status"],"properties":{"status":{"$ref":"#/components/schemas/EndpointCapabilityStatus"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}}}},"EndpointCapabilityStatus":{"type":"string","enum":["active","inactive","available","unavailable"]},"EndpointIssue":{"type":"string","description":"The issue of the endpoint. It indicates what's wrong with the endpoint and the reason why traffic is deactivated in that case.","enum":["subscription-is-not-active","setup-fee-is-not-paid","capability-is-not-supported","compliance-requirement-not-satisfied","brand-not-ready","destination-brand-not-ready","use-case-not-ready","kyc-form-grace-period-has-ended","whatsapp-not-pre-verified"]},"OutboundEndpointCapability":{"type":"object","nullable":true,"required":["status"],"properties":{"status":{"$ref":"#/components/schemas/EndpointCapabilityStatus"},"destinationStatuses":{"type":"object","properties":{"active":{"type":"number"},"inactive":{"type":"number"},"available":{"type":"number"},"unavailable":{"type":"number"}}},"supportsDestinations":{"type":"boolean","description":"Whether the number supports destinations"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EndpointIssue"}}}},"EndpointCapabilityMMS":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["mms"]}}}]},"EndpointCapabilityVoice":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["voice"]},"useCaseType":{"$ref":"#/components/schemas/EndpointVoiceUseCaseType"}}}]},"EndpointVoiceUseCaseType":{"type":"string","enum":["contact-centre"]},"EndpointCapabilityWhatsapp":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["whatsapp"]}}}]},"EndpointCapabilityEmail":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["email"]}}}]},"EndpointCapabilityRcsGoogle":{"allOf":[{"$ref":"#/components/schemas/EndpointCapabilityFields"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","enum":["rcs-google"]}}}]},"EndpointDependency":{"type":"object","discriminator":{"propertyName":"type","mapping":{"connector":"#/components/schemas/EndpointDependencyConnector"}},"oneOf":[{"$ref":"#/components/schemas/EndpointDependencyConnector"}]},"EndpointDependencyConnector":{"type":"object","required":["connectorId","connectorTemplateRef"],"properties":{"type":{"type":"string","enum":["connector"]},"connectorId":{"type":"string","format":"uuid"},"connectorTemplateRef":{"type":"string"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/EndpointCapabilityName"}}}},"EndpointProvisioningStatus":{"type":"string","enum":["provisioned","provisioning","deprovisioned","deprovisioning"]},"WorkspaceWhatsAppNumber":{"type":"object","description":"WhatsApp number pre-verification details.","properties":{"whatsAppId":{"type":"string"},"status":{"$ref":"#/components/schemas/WhatsAppNumberStatus"},"stage":{"type":"string"},"attempt":{"type":"integer"},"nextAttemptAt":{"type":"string","format":"date-time"},"verificationExpiresAt":{"type":"string","format":"date-time","nullable":true},"requestedCodeAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"WhatsAppNumberStatus":{"type":"string","description":"WhatsApp number status","enum":["unknown","already-exists","installed","verified","not-verified","expired"]},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"error.response.generic":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"An error."},"error.response.not_found":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"The requested resource was not found."},"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/workspaces/{workspaceId}/numbers-long-code":{"post":{"operationId":"createWorkspaceLongCodeNumbers","description":"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.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceLongCodeNumbers"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"allOf":[{"properties":{"results":{"items":{"$ref":"#/components/schemas/WorkspaceLongCodeNumber"},"type":"array"}},"required":["results"],"type":"object"}]}}},"description":"Created"},"402":{"$ref":"#/components/responses/error.response.generic"},"404":{"$ref":"#/components/responses/error.response.not_found"},"422":{"$ref":"#/components/responses/error.response.invalid_request"}},"summary":"Buy Long Code Numbers","tags":["long_code_numbers"]}}}}
```

{% hint style="warning" %}
A successful request to this endpoint will start a recurring monthly subscription based on the monthly cost of the number
{% endhint %}

{% content-ref url="/pages/WuC4zuiTQzjrbtbqxmlD" %}
[Subscribing to channel created webhooks](/api/channels-api/supported-channels/programmable-whatsapp/whatsapp-isv-integration/setting-up-your-customer-workspaces/subscribing-to-channel-created-webhooks.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/channels-api/supported-channels/programmable-whatsapp/whatsapp-isv-integration/setting-up-your-customer-workspaces/buying-a-number-through-bird.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
