---
title: "Register your own bot/number as a channel app [write]"
method: POST
path: "/channels/apps"
tags: ["channels"]
---

# Register your own bot/number as a channel app \[write\]

`POST /channels/apps`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/channels/apps`
- Auth: HTTP bearer

Credentials are proven against the platform where an API exists, stored encrypted, and write-only from then on. The response's setup object carries the steps the platform cannot automate (webhook URLs to paste, invite links).

## Request body

- CreateChannelApp
  - `platform` 'telegram' | 'slack' | 'discord' | 'whatsapp' | 'imessage' | 'email' | 'teams' | 'x' | 'lark' | 'buzz' | 'gchat' | 'line', required
  - `label` string, required
  - `credentials` object, required: Write-only. Required keys per platform — telegram: bot_token · discord: bot_token · slack: bot_token, signing_secret · whatsapp: access_token, phone_number_id, app_secret · email (requires EMAIL_CHANNEL_ENABLED): region, access_key, secret_key, from_address, sns_topic_arn; optional from_name, inbound_address, allow_subaddressing, reply_to_sender_only (string true/false); optional s3_bucket, s3_prefix (nonempty, ends /), s3_bucket_owner (12 digits), all three together for S3 receiving with the same region/key pair · teams (when enabled; app creation and credential rotation return 501 coming_soon when disabled): app_id (Azure Application client ID), app_password (client secret); optional app_tenant_id (Directory ID for single-tenant bots, omit for multi-tenant). Credentials are validated against Azure AD on creation. The API returns a webhook_url to paste into Azure Bot Configuration → Messaging Endpoint. Connection returns PENDING and a LINK code to send to the bot. Each conversation can bind to its own session. · imessage (coming soon — answers 501 coming_soon today): api_key, phone_number, webhook_secret · x: consumer_secret + either user_access_token (Group A, OAuth 2.0 Bearer) or client_id + refresh_token (Group B, OAuth 2.0 managed refresh). Exactly one group must be supplied. · lark: app_id, app_secret, verification_token (optional encrypt_key, domain: lark|feishu, app_mode: self-built|store, app_ticket for migration) · buzz: private_key, auth_tag · gchat: service_account_json, project_number · line: channel_access_token, channel_secret (requires LINE_CHANNEL_ENABLED; setup returns manual webhook instructions)

## Response `201`

Created

- ChannelApp
  - `verification_error` string: Non-secret explanation when X verification remains pending
  - `verification_retryable` boolean: Present for pending X verification. False means the saved refresh attempt cannot be replayed; replace credentials with a fresh OAuth grant.
  - `id` string
  - `platform` 'telegram' | 'slack' | 'discord' | 'whatsapp' | 'imessage' | 'email' | 'teams' | 'x' | 'lark' | 'buzz' | 'gchat' | 'line'
  - `label` string
  - `status` string
  - `credential_keys` string[]: Key names only — values are write-only
  - `created_at` string, date-time
  - `setup` object: Steps the platform cannot automate (per-app webhook_url / verify_token / events_url / invite_url)

## Other responses

- `202`: Verification pending
- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - added the optional property `error/request_id` to the response with the `default` status

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/channels/apps/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
