Connect a channel
POST/v1/projects/:project_id/channels
Connect a channel. The required fields depend on channel; no credential is ever returned.
Discord (channel: discord) — supply application_id and bot_token, plus the modes selecting which Gateway flows to serve (direct messages, and/or @mention-opens-a-thread). Returns 501 when the deployment has no CHANNEL_TOKEN_KEY configured.
WhatsApp (default) — one of two credential paths, both filling the same write-only secret:
-
BYOT (
credential_source: byot, default) — supplyphone_number_idandaccess_tokenfrom your own Meta app. -
Embedded signup (
credential_source: embedded_signup) — supplycodeandwaba_id(and optionallypin) from the Meta popup; naturali exchanges thecodefor the token and subscribes its app to the WABA, so the customer never hands over a token. Returns501on deployments where Meta App credentials are not configured.
Request
Responses
- 201
- 400
- 401
- 404
- 409
- 501
- 502
Channel created.
The request was malformed or failed validation.
Missing or invalid credentials.
The resource does not exist (existence is not leaked).
The request conflicts with the resource's current state.
The requested path is not enabled on this deployment (e.g. embedded signup before Meta App credentials are configured, or a Discord channel before CHANNEL_TOKEN_KEY is set).
The upstream runtime, or Meta, could not complete the operation.