Overview
The Channel Webhooks API allows you to create incoming webhooks that can post messages to channels programmatically. Webhooks are useful for integrations with external services like CI/CD pipelines, monitoring tools, and third-party applications. Each webhook creates a bot user that posts messages on behalf of the webhook. Only organization admins can manage webhooks.Security
- Webhook tokens are only shown once during creation or regeneration
- Tokens are stored as SHA-256 hashes in the database
- Tokens can be regenerated at any time, immediately invalidating the old token
- Webhooks can be enabled/disabled without regenerating tokens
Methods
channelWebhook.create
Creates a new webhook for a channel. A new bot user is created for this webhook. Returns the webhook data including the plain token (only shown once).Channel ID where the webhook will post messages
Webhook name (1-100 characters)
Webhook description (max 500 characters)
Avatar URL for the webhook bot user
When set, uses a global integration bot user instead of creating a unique webhook bot
Plain webhook token (only returned once)
Full webhook URL for posting messages
Transaction ID for optimistic updates
token and webhookUrl securely. The token cannot be retrieved again after creation.
Errors:
ChannelNotFoundError- Channel doesn’t existUnauthorizedError- User is not org adminInternalServerError- Unexpected server error
channelWebhook.list
Lists all webhooks for a channel.Channel ID
Array of webhook objects (without token hashes)
ChannelNotFoundError- Channel doesn’t existUnauthorizedError- User is not org adminInternalServerError- Unexpected server error
channelWebhook.listByOrganization
Lists all webhooks for the user’s organization. Used by the integration settings page to show all configured webhooks.Array of webhooks across all channels in the organization
UnauthorizedError- User is not authenticatedInternalServerError- Unexpected server error
channelWebhook.update
Updates webhook configuration (name, description, avatar, enabled).Webhook ID to update
New webhook name (1-100 characters)
New description (max 500 characters) or null to remove
New avatar URL or null to remove
Enable or disable the webhook
Updated webhook object
Transaction ID for optimistic updates
ChannelWebhookNotFoundError- Webhook doesn’t existUnauthorizedError- User is not org adminInternalServerError- Unexpected server error
channelWebhook.regenerateToken
Generates a new token for a webhook. The old token is invalidated immediately.Webhook ID
Webhook object with updated tokenSuffix
New plain webhook token (only returned once)
Updated webhook URL with new token
Transaction ID for optimistic updates
ChannelWebhookNotFoundError- Webhook doesn’t existUnauthorizedError- User is not org adminInternalServerError- Unexpected server error
channelWebhook.delete
Deletes a webhook (soft delete).Webhook ID to delete
Transaction ID for optimistic updates
ChannelWebhookNotFoundError- Webhook doesn’t existUnauthorizedError- User is not org adminInternalServerError- Unexpected server error