Casama AI Channels API
The channels API from Casama AI, for channels.
The channels API from Casama AI, for channels.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/casama-ai:casama-ai-channels-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Casama Channels API
version: 0.1.0
license:
name: Apache-2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://api.casama.ai
tags:
- name: Channels
paths:
/v1/channels:
get:
operationId: listChannels
tags:
- Channels
security:
- bearerAuth: []
summary: A bot's chat apps
parameters:
- schema:
type: string
format: uuid
required: true
name: bot_id
in: query
responses:
'200':
description: Channels
content:
application/json:
schema:
$ref: '#/components/schemas/ChannelList'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
post:
operationId: createChannel
tags:
- Channels
security:
- bearerAuth: []
summary: Connect a chat app to a bot
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateChannelRequest'
responses:
'201':
description: Channel
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'400':
description: Validation failed
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/v1/channels/{id}:
patch:
operationId: updateChannel
tags:
- Channels
security:
- bearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateChannelRequest'
responses:
'200':
description: Channel
content:
application/json:
schema:
$ref: '#/components/schemas/Channel'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
summary: Update channel
x-summary-source: derived
delete:
operationId: deleteChannel
tags:
- Channels
security:
- bearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
responses:
'200':
description: Deleted
content:
application/json:
schema:
$ref: '#/components/schemas/DeletedChannel'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
summary: Delete channel
x-summary-source: derived
/v1/channels/{id}/events:
get:
operationId: listChannelEvents
tags:
- Channels
security:
- bearerAuth: []
summary: Recent messages in and out, including ignored senders
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
responses:
'200':
description: Events
content:
application/json:
schema:
$ref: '#/components/schemas/ChannelEventList'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/v1/channels/slack/install:
get:
operationId: startSlackInstall
tags:
- Channels
security:
- bearerAuth: []
summary: Add Casama's Slack app to a Slack workspace for this bot (D-277)
description: Returns the Slack sign-in address to open. After the person allows it, the bot answers @mentions and direct messages in that Slack workspace, and approvals show buttons in the thread. 409 when this server has no Slack app (self-hosters connect their own app with a bot token instead).
parameters:
- schema:
type: string
format: uuid
required: true
name: bot_id
in: query
responses:
'200':
description: Slack sign-in
content:
application/json:
schema:
$ref: '#/components/schemas/SlackInstallLink'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/v1/chat-links/discord/start:
post:
operationId: startDiscordLink
tags:
- Channels
security:
- bearerAuth: []
summary: Discord's sign-in, which connects your Discord to Casama's Discord app
description: Returns Discord's sign-in address (scopes identify and applications.commands, installed to your account). Signing in there connects that Discord account to you; direct messages to Casama's bot and /ask then reach this bot in your General chat. The address works for 15 minutes. 409 when this server has no Discord app of its own.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StartChatLinkRequest'
responses:
'200':
description: Discord sign-in
content:
application/json:
schema:
$ref: '#/components/schemas/ChatLinkStart'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/v1/chat-links:
get:
operationId: listChatLinks
tags:
- Channels
security:
- bearerAuth: []
summary: Your Telegram and Discord accounts connected to Casama's own bots
responses:
'200':
description: Chat links
content:
application/json:
schema:
$ref: '#/components/schemas/ChatLinkList'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/v1/chat-links/telegram/start:
post:
operationId: startTelegramLink
tags:
- Channels
security:
- bearerAuth: []
summary: A one-time link that connects your Telegram to Casama's Telegram bot
description: Returns t.me/?start=. Opening it in Telegram and pressing Start connects that Telegram account to you; messages then reach this bot in your General chat. Single use, 15 minutes. 409 when this server has no Telegram bot of its own.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StartChatLinkRequest'
responses:
'200':
description: Telegram link
content:
application/json:
schema:
$ref: '#/components/schemas/ChatLinkStart'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
/v1/chat-links/{id}:
patch:
operationId: updateChatLink
tags:
- Channels
security:
- bearerAuth: []
summary: Choose which bot your messages go to
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateChatLinkRequest'
responses:
'200':
description: Chat link
content:
application/json:
schema:
$ref: '#/components/schemas/ChatLink'
'400':
description: Validation failed
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
delete:
operationId: deleteChatLink
tags:
- Channels
security:
- bearerAuth: []
summary: Disconnect a Telegram or Discord account
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
responses:
'200':
description: Deleted
content:
application/json:
schema:
$ref: '#/components/schemas/DeletedChatLink'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: Not found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
components:
schemas:
ChannelKind:
type: string
enum:
- telegram
- email
- sms
- slack
- whatsapp
- messenger
- feishu
- imessage
- teams
- discord
- linear
- jira
ChannelList:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/Channel'
required:
- items
ChannelEventList:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/ChannelEvent'
required:
- items
ChatLink:
type: object
properties:
id:
type: string
format: uuid
provider:
$ref: '#/components/schemas/ChatLinkProvider'
external_name:
type:
- string
- 'null'
org_id:
type: string
format: uuid
default_bot_id:
type:
- string
- 'null'
format: uuid
linked_at:
type: string
format: date-time
last_seen_at:
type:
- string
- 'null'
format: date-time
required:
- id
- provider
- external_name
- org_id
- default_bot_id
- linked_at
- last_seen_at
CreateChannelRequest:
type: object
properties:
bot_id:
type: string
format: uuid
kind:
$ref: '#/components/schemas/ChannelKind'
name:
type: string
minLength: 1
maxLength: 100
config:
type: object
additionalProperties: {}
secrets:
type: object
additionalProperties:
type: string
maxLength: 5000
allowed_senders:
type: array
items:
type: string
minLength: 1
maxLength: 300
maxItems: 200
required:
- bot_id
- kind
- name
- allowed_senders
ChannelEvent:
type: object
properties:
id:
type: string
format: uuid
direction:
type: string
enum:
- in
- out
status:
type: string
enum:
- accepted
- ignored
- routine
- sent
- failed
sender:
type:
- string
- 'null'
preview:
type:
- string
- 'null'
detail:
type:
- string
- 'null'
created_at:
type: string
format: date-time
required:
- id
- direction
- status
- sender
- preview
- detail
- created_at
Problem:
type: object
properties:
type:
type: string
example: https://casama.ai/problems/not_found
title:
type: string
status:
type: integer
code:
type: string
description: Stable error code
example: not_found
detail:
type: string
instance:
type: string
errors:
type: array
items:
type: object
properties:
path:
type: string
message:
type: string
required:
- path
- message
description: Field errors for validation_failed
required:
- type
- title
- status
- code
ChatLinkList:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/ChatLink'
offered:
type: object
properties:
telegram:
type:
- object
- 'null'
properties:
username:
type: string
url:
type: string
format: uri
required:
- username
- url
discord:
type:
- object
- 'null'
properties:
url:
type:
- string
- 'null'
format: uri
required:
- url
required:
- telegram
- discord
required:
- items
- offered
ChatLinkProvider:
type: string
enum:
- telegram
- discord
StartChatLinkRequest:
type: object
properties:
bot_id:
type: string
format: uuid
required:
- bot_id
Channel:
type: object
properties:
id:
type: string
format: uuid
bot_id:
type: string
format: uuid
kind:
$ref: '#/components/schemas/ChannelKind'
name:
type: string
config:
type: object
additionalProperties: {}
allowed_senders:
type: array
items:
type: string
enabled:
type: boolean
webhook_url:
type:
- string
- 'null'
verify_token:
type:
- string
- 'null'
last_inbound_at:
type:
- string
- 'null'
format: date-time
last_error:
type:
- string
- 'null'
created_at:
type: string
format: date-time
required:
- id
- bot_id
- kind
- name
- config
- allowed_senders
- enabled
- webhook_url
- verify_token
- last_inbound_at
- last_error
- created_at
UpdateChannelRequest:
type: object
properties:
name:
type: string
minLength: 1
maxLength: 100
allowed_senders:
type: array
items:
type: string
minLength: 1
maxLength: 300
maxItems: 200
enabled:
type: boolean
anyone_in_workspace:
type: boolean
DeletedChannel:
type: object
properties:
deleted:
type: string
format: uuid
required:
- deleted
DeletedChatLink:
type: object
properties:
deleted:
type: string
format: uuid
required:
- deleted
ChatLinkStart:
type: object
properties:
url:
type: string
format: uri
expires_at:
type: string
format: date-time
required:
- url
- expires_at
UpdateChatLinkRequest:
type: object
properties:
default_bot_id:
type: string
format: uuid
required:
- default_bot_id
SlackInstallLink:
type: object
properties:
url:
type: string
format: uri
required:
- url
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Supabase access token