The bundles endpoint allows you to create and manage bundles of account resources.
Provisioning API (1.2.7)
https://provisioning.api.sinch.com/
The unique ID of the project. You can find this on the Sinch Dashboard.
Example Bundle create requests
Region to create resources in.
(Allowed values for staging environment: EU or US).
Name of bundle to create. If a name is not specified in the resource blocks then they will be created with this name.
Subproject resource block.
If set to true, a subproject will be created under the provided projectId with default name from the root object. Optionally a different name can be specified as well as labels on the project.
If not provided or set to false, a subproject will not be created and instead all resources will be created under the projectId provided in the request.
Subproject resource block.
If set to true, a subproject will be created under the provided projectId with default name from the root object. Optionally a different name can be specified as well as labels on the project.
If not provided or set to false, a subproject will not be created and instead all resources will be created under the projectId provided in the request.
SMS Application resource block.
If set to true, an SMS Application will be created under the project or subproject specified. Optionally a different name can specified.
If not provided or set to false, an SMS Application will not be created.
SMS Application resource block.
If set to true, an SMS Application will be created under the project or subproject specified. Optionally a different name can specified.
If not provided or set to false, an SMS Application will not be created.
Conversation API Application resource block.
If set to true, a Conversation API Application will be created under the project or subproject specified. All other resources created will be associated with the Conversation Application. Optionally a different name can specified as well as Conversation API webhooks.
If not provided or set to false, a Conversation API Application will not be created.
Conversation API Application resource block.
If set to true, a Conversation API Application will be created under the project or subproject specified. All other resources created will be associated with the Conversation Application. Optionally a different name can specified as well as Conversation API webhooks.
If not provided or set to false, a Conversation API Application will not be created.
- Production server
https://provisioning.api.sinch.com/v1/projects/{projectId}/bundles
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/bundles' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Small bundle example",
"region": "US",
"subproject": true,
"smsApp": true,
"convApp": {
"webhooks": [
{
"target": "https://webhook.site/d614d077-302a-4e0b-a06a-276923f7d8d4",
"secret": "secret",
"triggers": [
"MESSAGE_DELIVERY"
]
}
],
"processingMode": "DISPATCH",
"retentionPolicy": {
"retentionPolicyType": "MESSAGE_EXPIRE_POLICY",
"ttl": 7
}
},
"webhooks": [
{
"target": "https://webhook.site/d614d077-302a-4e0b-a06a-276923f7d8d4",
"secret": "secret",
"triggers": [
"BUNDLE_DONE"
]
}
]
}'Responds with the bundle created. At time of response the bundle might not be completed. To receive the complete payload register a webhook for the BUNDLE_DONE trigger.
Name of bundle created. If a name was not specified in the resource blocks then they were created with this name.
List delivery statuses for all BUNDLE_DONE webhooks.
Response if the SMS App is not ready. This is the most likely response.
{ "id": "62a02dd40000000000000000", "projectId": "ea026751-3edf-40a9-ad93-1b382bd60a78", "name": "Sample response", "region": "US", "subproject": { "id": "ea026751-3edf-40a9-ad93-1b382bd60a78", "name": "Sample response", "parentProjectId": "18bbdcc8-117d-42f0-85cc-e30462c49404", "status": "PENDING" }, "smsApp": { "id": "54e5eb6cae6242c88c132c8da8bb1072", "smsServiceId": "d84b09da00fb4b76ff63f2fcea8d46c7", "name": "Sample response", "status": "PENDING_ADD" }, "convApp": { "id": "31c12b1042d14b37ae96df96bb13575b", "name": "Sample response", "processingMode": "CONVERSATION" }, "webhooks": [ { … } ], "state": "IN_PROGRESS" }
The unique ID of the project. You can find this on the Sinch Dashboard.
- Production server
https://provisioning.api.sinch.com/v1/projects/{projectId}/bundles/{bundleId}
- 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}/bundles/{bundleId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response if the SMS App is not ready. This is the most likely response.
{ "id": "62a02dd40000000000000000", "projectId": "ea026751-3edf-40a9-ad93-1b382bd60a78", "name": "Sample response", "region": "US", "subproject": { "id": "ea026751-3edf-40a9-ad93-1b382bd60a78", "name": "Sample response", "parentProjectId": "18bbdcc8-117d-42f0-85cc-e30462c49404", "status": "PENDING" }, "smsApp": { "id": "54e5eb6cae6242c88c132c8da8bb1072", "smsServiceId": "d84b09da00fb4b76ff63f2fcea8d46c7", "name": "Sample response", "status": "PENDING_ADD" }, "convApp": { "id": "31c12b1042d14b37ae96df96bb13575b", "name": "Sample response", "processingMode": "CONVERSATION" }, "webhooks": [ { … } ], "state": "IN_PROGRESS" }
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.