Sign inGet started

Install WhatsApp phone number in Bird CRM

Install a connector into Bird CRM

Once you have acquired the long lived access token you can then install a WhatsApp connector into Bird CRM. This will complete the integration between Bird and WhatsApp so you can send messages via the Bird CRM APIs.
POST
/workspaces/{workspaceId}/connectors
Create a new connector from a template.
Payload permintaan
name
string
wajib
connectorTemplateRef
string
arguments
object
For SMS connectors (sms-messagebird:1), channelMessageType is required and must be one of promotional, transactional, conversational, emergency, 2fa.
securityArguments
object
Provide the arguments required by the security scheme(s) on the connector template.
channelConversationalStatusEnabled
boolean
invitationToken
string
Payload respons
id
string
wajib
The ID of this connector.
workspaceId
string
The ID of the workspace this connector belongs to.
routingKey
string
name
string
wajib
The Name of this connector.
region
string
The Region in which this connector was installed in.
description
string
The Description of this connector.
arguments
object
Pre-configured arguments for this connector.
channel
object
Tampilkan atribut turunan
channel.channelId
string
wajib
channel.platform
string
wajib
number
object
Tampilkan atribut turunan
number.profileId
string
wajib
number.numberId
string
wajib
number.phoneNumber
string
number.variables
object
number.capabilities
string
Capabilities of a number. That would be represented with joined string of capabilities with comma.
number.numberType
string
Type of the number; could be mobile, tollfree, local, etc.
number.endpointType
string
Type of the endpoint; could be long-code-number, short-code-number, alpha-number, etc.
number.country
string
Country code of the number.
number.profileAttachments
array of object
Tampilkan atribut turunan
number.profileAttachments.capability
string
number.profileAttachments.profileId
string
number.profileAttachments.variables
object
Tampilkan atribut turunan
number.profileAttachments.variables.connectorId
string
connectorTemplateSlug
string
The slug for the template this connector is based on.
connectorTemplateRef
string
The ref for the template this connector is based on.
dataFetching
object
Tampilkan atribut turunan
dataFetching.schedule
string
dataFetching.streams
array of object
Tampilkan atribut turunan
dataFetching.streams.eventName
string
dataFetching.streams.streamName
string
dataFetching.streams.eventStreamName
string
dataFetching.streams.filter
string
dataFetching.streams.initialState
string
dataFetching.streams.endCondition
string
dataFetching.streams.incremental
boolean
dataFetching.streams.duplicatesFilterCapacity
number
dataFetching.streams.cursorField
string
dataCapture
object
Tampilkan atribut turunan
dataCapture.captureEndpoint
string
createdAt
string
wajib
When the connector was created.
updatedAt
string
When the connector was last updated.
Contoh kode
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/connectors' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
The required properties are as follows
  • Name - friendly name of the connector
  • wabaId - as per the embedded signup sessionInfo
  • phoneId - as per the embedded signup sessionInfo
  • phoneNumber -
    • The phone number in E.164 format (e.g., +18668044658) or with formatting (e.g., +1 866-804-4658) — we normalize automatically.
    • If using a Bird-provided number, use the number you acquired.
    • If the customer is bringing their own number, either collect it from them directly or resolve it from the phone_number_id via the Meta Graph API: GET https://graph.facebook.com/v25.0/{phone_number_id}?fields=display_phone_number.
  • mbPhoneId - the ID of the Bird phone number (Required only if using a Bird number)
  • accessToken - Use the Business Integration System User Access Token exchanged during the Embedded Signup flow here - not a manually-created System User Access Token. Ensure your app has advanced access to whatsapp_business_management permission. See Meta's token documentation.
Contoh kode
curl --location 'https://api.bird.com/workspaces/{{workspaceId}}/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "connectorTemplateRef": "whatsapp:1",
    "name": "{{name}}",
    "arguments": {  
        "wabaId": "{{wabaId}}",
        "phoneId": "{{phoneNumberId}}",	
        "phoneNumber": "{{phone Number}}".
        “mbPhoneId”: “{{mbPhoneId}}”
    },
     "securityArguments": {
        "oauth": {
      "accessToken": "{{long-lived-access-token}}"
        }
    }
}'

Await channel creation webhook

Once you have submitted your connector request a channel will be created in the background and once this has been created you will receive a callback based on the webhook you setup earlier.
Take note of the connector id and channel id. You will use the connector id to manage the integration with Meta and the channel id to send messages to the Bird CRM API.