Bundles

The bundles endpoint allows you to create and manage bundles of account resources.

Create bundle for project GA

Creates a new bundle of resources based on the input work order.
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

Example Bundle create requests

region
required
string

Region to create resources in.

(Allowed values for staging environment: EU or US).

Enum: "BR" "EU" "US"
name
string <= 255 characters

Name of bundle to create. If a name is not specified in the resource blocks then they will be created with this name.

BundlesSubprojectInputDto (object) or boolean

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.

BundlesSmsAppInputDto (object) or boolean

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.

BundlesConversationAppInputDto (object) or boolean

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.

Array of objects (BundlesWebhookInputDto) [ 1 .. 15 ] items unique

Provisioning API .

Optionally provide webhook targets for the Provisioning API.

Responses
201

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.

Response Schema: application/json
id
required
string

Id of bundle created.

projectId
required
string

The project or subproject id where resources have been created.

state
required
string

Current state.

Enum: "DONE" "FAILED" "IN_PROGRESS"
region
required
string

Region resources were create in.

Enum: "BR" "EU" "US"
name
string <= 255 characters

Name of bundle created. If a name was not specified in the resource blocks then they were created with this name.

Array of objects (BundlesWebhookDeliveryStatusDto)

List delivery statuses for all BUNDLE_DONE webhooks.

object

Subproject created, if requested.

object

SMS App created, if requested.

object

Conversation App created, if requested.

Array of objects (BundlesWebhookDto)

Webhooks registered, if requested.

400

BadRequest

401

Unauthorized

409

Conflict

424

FailedDependency

500

InternalServerError

Callbacks
postBundle Done Event
post/v1/projects/{projectId}/bundles
Request samples
application/json
  Small example to create a subproject, SMS App and Conversation API App. The webhooks for Conversation API and Provisioning API are examples and can be extended.
  
{}
Response samples
application/json
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"
}
Callback payload samples
POST: Bundle Done Event
application/json
{
  • "type": "BUNDLE_DONE",
  • "payload": {
    • "id": "62a02dd40000000000000000",
    • "projectId": "ea026751-3edf-40a9-ad93-1b382bd60a78",
    • "name": "Sample response",
    • "region": "US",
    • "subproject": {
      },
    • "smsApp": {
      },
    • "convApp": {
      },
    • "webhooks": [],
    • "state": "DONE",
    • "webhookDeliveryStatuses": [
      ]
    }
}

Get bundle by projectId and bundleId GA

Retrieve created bundle and resources created.
SecurityBasic or OAuth2.0
Request
path Parameters
projectId
required
string

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

bundleId
required
string

The unique ID of the bundle.

Responses
200

Responds with the bundle created. At time of response the bundle might not be completed.

Response Schema: application/json
id
required
string

Id of bundle created.

projectId
required
string

The project or subproject id where resources have been created.

state
required
string

Current state.

Enum: "DONE" "FAILED" "IN_PROGRESS"
region
required
string

Region resources were create in.

Enum: "BR" "EU" "US"
name
string <= 255 characters

Name of bundle created. If a name was not specified in the resource blocks then they were created with this name.

Array of objects (BundlesWebhookDeliveryStatusDto)

List delivery statuses for all BUNDLE_DONE webhooks.

object

Subproject created, if requested.

object

SMS App created, if requested.

object

Conversation App created, if requested.

Array of objects (BundlesWebhookDto)

Webhooks registered, if requested.

400

BadRequest

401

Unauthorized

404

NotFound

500

InternalServerError

get/v1/projects/{projectId}/bundles/{bundleId}
Request samples
Response samples
application/json
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"
}