- Create bundle for project
Creates a new bundle of resources based on the input work order.
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.
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 Application resource block.
If set to true, a Conversation 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 Application will not be created.
- Production serverhttps://provisioning.api.sinch.com/v1/projects/{projectId}/bundles
Small example to create a subproject, SMS App and Conversation App. The webhooks for Conversation API and Provisioning API are examples and can be extended.
curl -i -X POST \
-u '<username>:<password>' \
'https://provisioning.api.sinch.com/v1/projects/{projectId}/bundles' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Small bundle example",
"region": "US",
"subproject": true,
"smsApp": true,
"convApp": {
"name": "Conversation App Example",
"webhooks": [
{
"target": "https://webhook.site/d614d077-302a-4e0b-a06a-276923f7d8d4",
"secret": "secret",
"triggers": [
"MESSAGE_DELIVERY"
]
}
],
"processingMode": "DISPATCH",
"retentionPolicy": {
"retentionPolicyType": "MESSAGE_EXPIRE_POLICY",
"ttl": 7
},
"consentManagerSettings": {
"mode": "PRIMARY"
}
},
"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", "regions": [ … ], "test": false }, "convApp": { "id": "31c12b1042d14b37ae96df96bb13575b", "name": "Sample response", "processingMode": "CONVERSATION" }, "webhooks": [ { … } ], "state": "IN_PROGRESS" }