Skip to main content
POST
Create a channel

Yetkilendirmeler

Authorization
string
header
gerekli

The access token received from the authorization server in the OAuth 2.0 flow.

Başlıklar

X-Tenant
number
gerekli

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Gövde

application/json
name
string
gerekli

The name of the channel.

Maximum string length: 255
type
enum<string>
gerekli

The channel type (whatsapp, instagram, website, telegram).

Mevcut seçenekler:
whatsapp,
instagram,
website,
telegram
provider
string | null

The messaging provider backing the channel, when the type supports more than one.

Maximum string length: 255
address
string | null

The channel address — a phone number, handle or bot identifier. Required for every type except website, and for a Telegram channel created without a bot token; a connected Telegram channel defaults to @<bot username>.

Maximum string length: 255
website_domain
string | null

The site the widget is embedded on, without a scheme. Required for website channels.

Maximum string length: 255
Pattern: ^(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+))(?:\:\d{1,5})?$
integration_id
integer | null

The integration this channel belongs to.

is_active
boolean | null

Whether the channel is active.

ai_reply_mode
enum<string> | null

Pins the channel to a fixed AI reply mode (auto, semi_auto, closed). Omit to follow the clinic schedule.

Mevcut seçenekler:
auto,
semi_auto,
closed
bot_token
string | null

Telegram only. The BotFather token of the bot to connect. When given, the bot is verified and its webhook registered before the channel is saved, and the channel starts open; when omitted, only the channel record is created. Write-only: it is stored encrypted and never returned.

Maximum string length: 255
Pattern: ^\d+:[A-Za-z0-9_-]+$
webhook_enabled
boolean | null

Telegram only. Whether Telegram delivers incoming messages to the channel's webhook. Defaults to true.

webhook_base_url
string<uri> | null

Telegram only, non-production only. The public HTTPS base URL (for example a tunnel) the webhook is registered under. Ignored in production, which always uses the application URL.

Maximum string length: 255

Yanıt

success
string
gerekli
data
ChannelResource · object
gerekli