Skip to main content

Create Channel

POST 

/api/channels

Create a new communication channel (email or SMS).

Required fields for all channels:

  • name
  • channel_type ('email' or 'sms')
  • integration_id

Additional required fields for email channels:

  • send_from_email
  • email_domain_id

Additional required fields for SMS channels:

  • send_from_phone_number
  • phone_number_id

Note: SMS channels are typically auto-created when phone numbers are purchased.

Sample API Call - Create Email Channel:

POST /api/channels
Content-Type: application/json

{
"name": "Support Email",
"channel_type": "email",
"integration_id": "123e4567-e89b-12d3-a456-426614174002",
"send_from_email": "support@example.com",
"email_domain_id": "123e4567-e89b-12d3-a456-426614174003",
"is_default": true
}

Sample Response - Email Channel:

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "123e4567-e89b-12d3-a456-426614174001",
"name": "Support Email",
"channel_type": "email",
"integration_id": "123e4567-e89b-12d3-a456-426614174002",
"send_from_email": "support@example.com",
"email_domain_id": "123e4567-e89b-12d3-a456-426614174003",
"status": "available",
"is_default": true,
"metadata": {},
"created_at": "2024-10-03T12:00:00Z"
}

Sample API Call - Create SMS Channel:

POST /api/channels
Content-Type: application/json

{
"name": "Sales SMS",
"channel_type": "sms",
"integration_id": "323e4567-e89b-12d3-a456-426614174011",
"send_from_phone_number": "+15551234567",
"phone_number_id": "423e4567-e89b-12d3-a456-426614174012",
"is_default": false
}

Sample Response - SMS Channel:

{
"id": "223e4567-e89b-12d3-a456-426614174010",
"tenant_id": "123e4567-e89b-12d3-a456-426614174001",
"name": "Sales SMS",
"channel_type": "sms",
"integration_id": "323e4567-e89b-12d3-a456-426614174011",
"send_from_phone_number": "+15551234567",
"phone_number_id": "423e4567-e89b-12d3-a456-426614174012",
"status": "available",
"is_default": false,
"metadata": {},
"created_at": "2024-10-03T13:00:00Z"
}

Request

Responses

Successful Response