The bundles endpoint allows you to create and manage bundles of account resources.
Provisioning API (1.2.7)
https://provisioning.api.sinch.com/
Request
Delete a template by name and language.
Please note that by default only draft is removed. Use query parameter deleteSubmitted=true
to also remove the submitted template. Once an approved template is deleted, the template cannot be recreated again with this name and language for 30 days. Consequently, be aware that you must use a different name to create template for this language within this 30 days long period. If you need the template in this language soon, update the submitted template for a specific language instead of trying to delete and recreate it again.
The unique ID of the project. You can find this on the Sinch Dashboard.
- Production server
https://provisioning.api.sinch.com/v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}?deleteSubmitted=false' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
Request
Updates a template DRAFT.
Note that it is not possible to update all fields for a template, if you want to update a field that is not supported you will need to delete the draft and create a new one.
Update a template REJECTED / APPROVED / PAUSED / DISABLED
It is possible to update templates that have been rejected, approved, paused or disabled, we will automatically set the status to draft when update a rejected template.
The unique ID of the project. You can find this on the Sinch Dashboard.
Supported template fields to update.
Works if status template is DRAFT or it was rejected with INCORRECT_CATEGORY.
Works if status template is DRAFT or it was rejected with INCORRECT_CATEGORY True if Meta should be allowed to change the category if they determine the category is wrong. If false, Meta might reject the template if they determine the category is wrong based on the template contents. Defaults to false.
- Production server
https://provisioning.api.sinch.com/v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
-u <username>:<password> \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"details": {
"components": [
{
"type": "HEADER",
"format": "LOCATION"
},
{
"type": "HEADER",
"format": "TEXT",
"text": "Save {{1}}% on your next purchase!",
"example": "20"
},
{
"type": "HEADER",
"format": "DOCUMENT",
"example": {
"url": "https://example.com/photos/1.png"
}
},
{
"type": "BODY",
"text": "Good morning {{1}}, your package has arrived.",
"examples": [
"Mr. Smith"
],
"addSecurityRecommendation": true
},
{
"type": "FOOTER",
"text": "To track your order please click the '\''Track Your Order'\'' button",
"codeExpirationMinutes": 5
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PHONE_NUMBER",
"text": "Example text.",
"phoneNumber": "+48 777 777777"
},
{
"type": "URL",
"text": "Example test",
"url": "https://www.my-website.com?name={{1}}",
"example": "https://www.my-website.com?name=john"
},
{
"type": "QUICK_REPLY",
"text": "Track Your Order"
},
{
"type": "OTP",
"otpType": "COPY_CODE",
"text": "Example text."
},
{
"type": "FLOW",
"text": "Start Flow",
"flowId": "flow-id",
"navigateScreen": "QUESTION_ONE",
"flowAction": "NAVIGATE"
}
]
},
{
"type": "CAROUSEL",
"cards": [
{
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"example": {
"url": "https://example.com/photos/1.png"
}
},
{
"type": "BODY",
"text": "Good morning {{1}}, your package has arrived.",
"examples": [
"Mr. Smith"
]
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Example test",
"url": "https://www.my-website.com?name={{1}}",
"example": "https://www.my-website.com?name=john"
},
{
"type": "QUICK_REPLY",
"text": "Track Your Order"
},
{
"type": "PHONE_NUMBER",
"text": "Example text.",
"phoneNumber": "+48 777 777777"
}
]
}
]
}
]
}
],
"messageSendTtlSeconds": 60
}
}'
Updated template draft
Rejection code if template is in status 'REJECTED'
Quality score of the HSM.
Object containing changes on the template. If empty the changes has been approved and applied to the template.
Template analytics.
Number of times buttons in the template has been clicked.
Response when successfully update a template.
{ "whatsappId": "123456", "name": "My WhatsApp Template", "state": "APPROVED", "category": "UTILITY", "language": "EN_US", "qualityScore": "QUALITY_SCORE_GREEN", "changes": { "status": "IN_PROGRESS", "details": { … } }, "details": { "components": [ … ], "messageSendTtlSeconds": 60 }, "analytics": [] }
The unique ID of the project. You can find this on the Sinch Dashboard.
- Production server
https://provisioning.api.sinch.com/v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}/activities
- 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}/whatsapp/templates/{templateName}/languages/{languageCode}/activities?pageToken=string&pageSize=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
Response for all template activities.
{ "totalSize": 2, "pageSize": 50, "notifications": [ { … }, { … } ] }
WhatsApp Senders
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.