Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Copy page
Open raw Markdown

Create a channel

Create a Telegram channel using a new bot token or a saved secret.

Endpoint

POST/api/v1/workspaces/{workspace_id}/channels

Authentication

Operation classAuthenticationMinimum roleAPI key
dashboard-session-apiDashboard session cookie; mutations also require X-CX-Request: 1.adminNot allowed

Parameters

NameInTypeRequiredDescription
workspace_idpathstringYes—

Request body

application/json request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectPermintaanKanal—NoYes——
agent_idstring——NoYes——
bot_tokenstring or null——YesNo——
secret_namestring or null——YesNo——
typestring——NoYes——

Example

cURL
curl --request POST 'https://operade.ai/api/v1/workspaces/ws_demo/channels' \
  --cookie 'cx_session=YOUR_SESSION_COOKIE' \
  --header 'X-CX-Request: 1' \
  --header 'Content-Type: application/json' \
  --data '{"agent_id":"agt_demo","type":"telegram","bot_token":"EXAMPLE_TELEGRAM_BOT_TOKEN"}'
Request body JSON
{
  "agent_id": "agt_demo",
  "bot_token": "EXAMPLE_TELEGRAM_BOT_TOKEN",
  "type": "telegram"
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
201Successful Responseapplication/json: ChannelCreateResponse

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

201 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectChannelCreateResponse—NoYes——
agent_idstring——NoYes——
created_atstring—date-timeNoYes——
enabledboolean——NoYes——
external_idstring or null——YesYes——
idstring——NoYes——
secret_namestring or null——YesYes——
typestring——NoYes"telegram"—
webhook_secretstring——NoYes——
workspace_idstring——NoYes——

Response example

Response body JSON
{
  "id": "string",
  "workspace_id": "string",
  "agent_id": "string",
  "type": "telegram",
  "external_id": "string",
  "secret_name": "string",
  "enabled": false,
  "created_at": "2026-01-01T00:00:00Z",
  "webhook_secret": "string"
}

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
401unauthenticatedAuthentication is missing, invalid, or revoked.
403forbiddenThe authenticated caller does not have access to this operation.
404not_foundThe requested workspace resource was not found.
422validation_failedThe request did not pass field or business validation.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. application/json request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 201 application/json response schema
  10. Response example
  11. Errors
  12. Related operations