The page token if retrieving the next page from a previous query.
Provisioning API (1.2.36)
Request
Returns a paginated list of webhooks for the specified project. If no page token is supplied then all registered webhooks (of maximum 15) are returned in alphabetical order.
The unique ID of the project. You can find this on the Sinch Dashboard.
- Production serverhttps://provisioning.api.sinch.com/v1/projects/{projectId}/webhooks
- Staging server from master branchhttps://provisioning-api.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- Staging server from dev branchhttps://provisioning-api-dev.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- Internal production server for admin authorizationhttps://provisioning-api.unauth.int.prod.sinch.com/v1/projects/{projectId}/webhooks
- Internal staging server from master branch for admin authorizationhttps://provisioning-api.unauth.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- Internal staging server from dev branch for admin authorizationhttps://provisioning-api-dev.unauth.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/webhooks?pageToken=string&pageSize=1' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'List of webhooks
List of triggers this webhook is triggered by.
{ "previousPageToken": "{{TOKEN}}", "nextPageToken": "{{TOKEN}}", "pageSize": 1, "totalSize": 5, "webhooks": [ { … }, { … } ] }
Request
Register a new webhook for a project. The webhook will be used to communicate updates to resources. Maximum of 15 webhooks allowed per project.
The unique ID of the project. You can find this on the Sinch Dashboard.
Webhook to register
Secret to be used to sign contents of webhooks sent by the provisioning API. You can then use the secret to verify the signature. Please not that secret should have a high entropy to be considered secure.
List of triggers you want to be notified about on your webhook. To be able to listen to all type of events use ALL.
- Common:
ALL - Bundles:
BUNDLE_DONE - WhatsApp Sender:
WHATSAPP_SENDER_ACTIVE,WHATSAPP_SENDER_COMMENT_ADDED,WHATSAPP_SENDER_DAILY_LIMIT_CHANGED,WHATSAPP_SENDER_ERROR,WHATSAPP_SENDER_INACTIVE,WHATSAPP_SENDER_PENDING_VERIFICATION,WHATSAPP_SENDER_QUALITY_RATING_CHANGEDorWHATSAPP_SENDER_REJECTED - WhatsApp Template:
WHATSAPP_TEMPLATE_APPROVED,WHATSAPP_TEMPLATE_CATEGORY_FUTURE_UPDATE,WHATSAPP_TEMPLATE_CATEGORY_UPDATED,WHATSAPP_TEMPLATE_COMMENT_ADDED,WHATSAPP_TEMPLATE_DELETED,WHATSAPP_TEMPLATE_QUALITY_SCORE_UPDATED,WHATSAPP_TEMPLATE_REJECTEDorWHATSAPP_TEMPLATE_STATUS_UPDATED - WhatsApp Account:
WHATSAPP_ACCOUNT_COMMENT_ADDED,WHATSAPP_ACCOUNT_ONBOARDED,WHATSAPP_ACCOUNT_PENDING_VERIFICATION,WHATSAPP_ACCOUNT_REJECTEDorWHATSAPP_WABA_ACCOUNT_CHANGED - RCS Sender:
RCS_SENDER_COMMENT_ADDED,RCS_SENDER_OPERATOR_STATUS_UPDATEDorRCS_SENDER_STATUS_UPDATED - KakaoTalk Sender:
KAKAOTALK_SENDER_ACTIVE,KAKAOTALK_SENDER_COMMENT_ADDED,KAKAOTALK_SENDER_INACTIVEorKAKAOTALK_SENDER_REJECTED - KakaoTalk Template:
KAKAOTALK_TEMPLATE_APPROVED,KAKAOTALK_TEMPLATE_COMMENT_ADDEDorKAKAOTALK_TEMPLATE_REJECTED
- Production serverhttps://provisioning.api.sinch.com/v1/projects/{projectId}/webhooks
- Staging server from master branchhttps://provisioning-api.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- Staging server from dev branchhttps://provisioning-api-dev.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- Internal production server for admin authorizationhttps://provisioning-api.unauth.int.prod.sinch.com/v1/projects/{projectId}/webhooks
- Internal staging server from master branch for admin authorizationhttps://provisioning-api.unauth.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- Internal staging server from dev branch for admin authorizationhttps://provisioning-api-dev.unauth.int.staging.sinch.com/v1/projects/{projectId}/webhooks
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- registerWebhookNoTriggerReq
- registerWebhookReq
curl -i -X POST \
-u <username>:<password> \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/webhooks' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"secret": "{{WEBHOOK_SECRET}}",
"target": "https://my.server.com/callback",
"triggers": [
"ALL"
]
}'Webhook created
List of triggers this webhook is triggered by.
- registerWebhookNoTriggerRes
- registerWebhookRes
{ "id": "{{WEBHOOK_ID}}", "projectId": "{{PROJECT_ID}}", "target": "https://my.server.com/callback", "triggers": [ "ALL" ] }
The unique ID of the project. You can find this on the Sinch Dashboard.
- Production serverhttps://provisioning.api.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}
- Staging server from master branchhttps://provisioning-api.int.staging.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}
- Staging server from dev branchhttps://provisioning-api-dev.int.staging.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}
- Internal production server for admin authorizationhttps://provisioning-api.unauth.int.prod.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}
- Internal staging server from master branch for admin authorizationhttps://provisioning-api.unauth.int.staging.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}
- Internal staging server from dev branch for admin authorizationhttps://provisioning-api-dev.unauth.int.staging.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/webhooks/{webhookId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Webhook response
List of triggers this webhook is triggered by.
- triggers
- noTriggers
{ "id": "{{WEBHOOK_ID}}", "target": "https://my.server.com/callback", "projectId": "{{PROJECT_ID}}", "triggers": [ "WHATSAPP_TEMPLATE_APPROVED", "WHATSAPP_TEMPLATE_REJECTED" ] }
A WhatsApp Sender is also referred to as a 'Business Profile' or a WhatsApp channel. The WhatsApp Sender endpoint allows you to create a Sender through Meta's Embedded sign up. A Sender must be provisioned for you as a consumer of the WhatsApp API to send messages to your end users.