WhatsApp

The WhatsApp endpoint allows you to programmatically log in to and get details of your WhatsApp account.

Enable Meta template analytics GA

  Enable Meta template analytics for WhatsApp Business Account.
  
SecurityBasic or OAuth2.0
Request
path Parameters
projectId
required
string

The unique ID of the project. You can find this on the Sinch Dashboard.

Responses
200

Meta template analytics enabled for WhatsApp Business Account.

400

BadRequest

401

Unauthorized

424

FailedDependency

500

InternalServerError

put/v1/projects/{projectId}/whatsapp/enableTemplateAnalytics
Request samples
Response samples
application/json
{
  • "errorCode": "project_not_initialized",
  • "message": "Project not initialized for WhatsApp.",
  • "resolution": "Verify that the project ID is correct and that it has been onboarded for WhatsApp."
}

Create a long lived access token GA Deprecated

Returns a long lived access token based on the facebook token from the embedded signup. Valid for 60 days.
SecurityBasic or OAuth2.0
Request
path Parameters
projectId
required
string

The unique ID of the project. You can find this on the Sinch Dashboard.

Request Body schema: application/json
required

Facebook token generated from the embedded signup process, or another long lived access token.

facebookToken
string <uri> non-empty

Long-Lived User access token. Mandatory if facebookCode is not provided.

facebookCode
string <uri> non-empty

Single-use access code. Mandatory if facebookToken is not provided.

businessManager
string

Business manager.

Enum: "SINCH_AMERICA" "SINCH_BR" "SINCH_MX" "SINCH_SEP" "SINCH_UK"
Responses
201

The long lived access token.

Response Schema: application/json
longLivedAccessToken
required
string
400

BadRequest

401

Unauthorized

500

InternalServerError

post/v1/projects/{projectId}/whatsapp/longLivedAccessToken
Request samples
application/json
  Example body request to create a long lived access token.
  
{
  • "facebookCode": "FACEBOOK_CODE"
}
Response samples
application/json
Response when successfully creating a long lived access token.
{
  • "longLivedAccessToken": "FACEBOOK_TOKEN"
}

List WhatsApp Business Accounts details GA Deprecated

Returns a list of all the WhatsApp Business Accounts that the facebook token is associated with, together with the numbers that are shared.
SecurityBasic or OAuth2.0
Request
path Parameters
projectId
required
string

The unique ID of the project. You can find this on the Sinch Dashboard.

Request Body schema: application/json
required

WabaDetails data with Facebook token generated from the embedded signup process.

facebookToken
required
string

Long-Lived User access token.

businessManager
string

Business manager.

Enum: "SINCH_AMERICA" "SINCH_BR" "SINCH_MX" "SINCH_SEP" "SINCH_UK"
Responses
200

List of WhatsApp Business Accounts.

Response Schema: application/json
required
Array of objects (WhatsappWabaDetailsDto)
Array
id
required
string

The id of the WhatsApp Business Account.

name
required
string

The name of the WhatsApp Business Account.

required
Array of objects (WhatsappWabaNumbersDto)

The numbers that are shared to the WhatsApp Business Account.

400

BadRequest

401

Unauthorized

500

InternalServerError

post/v1/projects/{projectId}/whatsapp/wabaDetails
Request samples
application/json
  Example body request to list WhatsApp Business Accounts details.
  
{
  • "facebookToken": "FACEBOOK_TOKEN"
}
Response samples
application/json
Response for all waba details.
{
  • "wabas": [
    • {
      }
    ]
}