Skip to main content

Channel Connections

List channel connections

GET
/projects/{projectId}/channel-connections
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/channel-connections"
{
  "$schema": "/api/v1/schemas/ChannelConnectionsOutputBody.json",
  "connections": [
    {
      "$schema": "/api/v1/schemas/ChannelConnectionDTO.json",
      "app_id": "string",
      "channel_type": "string",
      "connection_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "default_agent_id": "string",
      "display_name": "string",
      "ig_account_id": "string",
      "page_id": "string",
      "phone_number_id": "string",
      "project_id": "string",
      "provider_mode": "string",
      "status": "string",
      "status_detail": "string",
      "templates": null,
      "test_send_succeeded": true,
      "updated_at": "2019-08-24T14:15:22Z",
      "verify_token": "string",
      "waba_id": "string",
      "webhook_callback_url": "string"
    }
  ],
  "items": [
    {
      "$schema": "/api/v1/schemas/ChannelConnectionDTO.json",
      "app_id": "string",
      "channel_type": "string",
      "connection_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "default_agent_id": "string",
      "display_name": "string",
      "ig_account_id": "string",
      "page_id": "string",
      "phone_number_id": "string",
      "project_id": "string",
      "provider_mode": "string",
      "status": "string",
      "status_detail": "string",
      "templates": null,
      "test_send_succeeded": true,
      "updated_at": "2019-08-24T14:15:22Z",
      "verify_token": "string",
      "waba_id": "string",
      "webhook_callback_url": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create channel connection

POST
/projects/{projectId}/channel-connections
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/channel-connections" \  -H "Content-Type: application/json" \  -d '{    "channel_type": "whatsapp"  }'
{
  "$schema": "/api/v1/schemas/ChannelConnectionDTO.json",
  "app_id": "string",
  "channel_type": "string",
  "connection_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "default_agent_id": "string",
  "display_name": "string",
  "ig_account_id": "string",
  "page_id": "string",
  "phone_number_id": "string",
  "project_id": "string",
  "provider_mode": "string",
  "status": "string",
  "status_detail": "string",
  "templates": null,
  "test_send_succeeded": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "verify_token": "string",
  "waba_id": "string",
  "webhook_callback_url": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get channel connection

GET
/projects/{projectId}/channel-connections/{id}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string
id*string

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/channel-connections/string"
{
  "$schema": "/api/v1/schemas/ChannelConnectionDTO.json",
  "app_id": "string",
  "channel_type": "string",
  "connection_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "default_agent_id": "string",
  "display_name": "string",
  "ig_account_id": "string",
  "page_id": "string",
  "phone_number_id": "string",
  "project_id": "string",
  "provider_mode": "string",
  "status": "string",
  "status_detail": "string",
  "templates": null,
  "test_send_succeeded": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "verify_token": "string",
  "waba_id": "string",
  "webhook_callback_url": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update channel connection

PATCH
/projects/{projectId}/channel-connections/{id}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string
id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/projects/string/channel-connections/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "$schema": "/api/v1/schemas/ChannelConnectionDTO.json",
  "app_id": "string",
  "channel_type": "string",
  "connection_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "default_agent_id": "string",
  "display_name": "string",
  "ig_account_id": "string",
  "page_id": "string",
  "phone_number_id": "string",
  "project_id": "string",
  "provider_mode": "string",
  "status": "string",
  "status_detail": "string",
  "templates": null,
  "test_send_succeeded": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "verify_token": "string",
  "waba_id": "string",
  "webhook_callback_url": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete channel connection

DELETE
/projects/{projectId}/channel-connections/{id}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string
id*string

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/channel-connections/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Test channel connection

POST
/projects/{projectId}/channel-connections/{id}/test
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string
id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/channel-connections/string/test" \  -H "Content-Type: application/json" \  -d '{    "message": "string",    "to": "string"  }'
{
  "$schema": "/api/v1/schemas/ChannelConnectionDTO.json",
  "app_id": "string",
  "channel_type": "string",
  "connection_id": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "default_agent_id": "string",
  "display_name": "string",
  "ig_account_id": "string",
  "page_id": "string",
  "phone_number_id": "string",
  "project_id": "string",
  "provider_mode": "string",
  "status": "string",
  "status_detail": "string",
  "templates": null,
  "test_send_succeeded": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "verify_token": "string",
  "waba_id": "string",
  "webhook_callback_url": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}