Skip to main content
POST
/
api
/
v1
/
channels
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";

const syllableSDK = new SyllableSDK({
  apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await syllableSDK.channels.create({
    name: "twilio",
    channelService: "sip",
    supportedModes: "chat,voice",
    isSystemChannel: false,
    config: {
      accountSid: "AC123...",
      authToken: "sometoken",
      providerCredentials: {
        "api_key": "atk123",
        "username": "test_username",
      },
      telephony: {
        preInputTimeout: 1.2,
        overallInputTimeout: 20,
        interruptibility: "dtmf_only",
        passiveSpeechInputEnabled: true,
        passiveInputStart: 0.5,
      },
      email: {
        sendingDomain: "mail.example.com",
      },
    },
  });

  console.log(result);
}

run();
{
  "name": "<string>",
  "channel_service": "sip",
  "id": 123,
  "supported_modes": "chat,voice",
  "is_system_channel": true,
  "config": {
    "telephony": {
      "interruptibility": "dtmf_only",
      "overall_input_timeout": 20,
      "passive_input_start": 0.5,
      "passive_speech_input_enabled": true,
      "pre_input_timeout": 1.2
    }
  }
}

Authorizations

Syllable-API-Key
string
header
required

Body

application/json

Request model to create a channel through the organizations API

name
string
required

The channel name

Example:

"twilio"

channel_service
enum<string>
required

The service that facilitates communication on the channel

Available options:
sip,
twilio,
email,
webchat,
africastalking,
whatsapp
Example:

"webchat"

config
OrganizationChannelConfig · object
required

The configuration of the channel

Examples:
{
"account_sid": "AC123",
"auth_token": "sometoken",
"telephony": {
"interruptibility": "dtmf_only",
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 3
}
}
{
"provider_credentials": {
"api_key": "atk123",
"username": "test_username"
},
"telephony": {
"interruptibility": "dtmf_only",
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 3
}
}
supported_modes
string | null

The comma-delimited list of supported modes for the channel, which defines the possible communication methods for channel targets linked to it.

Example:

"chat,voice"

is_system_channel
boolean
default:true

Whether the channel is a built-in system channel (i.e., is not customizable)

Example:

false

Response

Successful Response

name
string
required

The channel name

Example:

"syllable-webchat"

channel_service
enum<string>
required

The service that facilitates communication on the channel

Available options:
sip,
twilio,
email,
webchat,
africastalking,
whatsapp
Example:

"webchat"

id
integer
required

The channel ID

supported_modes
string | null

The comma-delimited list of supported modes for the channel, which defines the possible communication methods for channel targets linked to it.

Example:

"chat,voice"

is_system_channel
boolean
default:true

Whether the channel is a built-in system channel (i.e., is not customizable)

Example:

false

config
ChannelConfigView · object

Configuration for the channel

Example:
{
"telephony": {
"interruptibility": "dtmf_only",
"overall_input_timeout": 20,
"passive_input_start": 0.5,
"passive_speech_input_enabled": true,
"pre_input_timeout": 1.2
}
}