Hanzo
OpenapiChannels

Turns one pending pairing code into a standing allow entry, so that person can…

Turns one pending pairing code into a standing allow entry, so that person can DM the org's bot on that channel from now on.

POST /v1/channels/pairing/approve

Addresshttps://api.hanzo.ai/v1/channels/pairing/approve
MethodPOST
Operationpost_channels_pairing_approve
AuthAuthorization: Bearer $HANZO_API_KEY

Turns one pending pairing code into a standing allow entry, so that person can DM the org's bot on that channel from now on. It requires ORG ADMIN, not merely membership. The first approval an org makes on a channel also bootstraps that sender as the channel's owner, which the answer reports. An unknown or expired code is a 404, and a code always belongs to exactly one org, so it can never approve someone into another tenant.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
channelbodystringChannel is the transport the request came in on: discord, slack, teams or telegram.
codebodystringCode is the pairing code from GET /v1/channels/pairing.

Response

StatusBodyMeaning
200pairingApprovedok

200 body — 2 fields.

FieldInTypeAlwaysDescription
ownerBootstrappedbodybooleanOwnerBootstrapped is true when this approval was the org's FIRST on the channel and therefore also made the sender its owner.
senderbodystringSender is the external chat identity that is now allowed to DM the org's bot.

Failure carries the platform error shape — see Errors.

Examples

hanzo channels pairing approve

Channels API · All Hanzo APIs · Interactive reference

How is this guide?

On this page