Skip to main content

Webhooks

Create, update, execute and delete the Discord webhooks a project owns, with a project API key.

Discord webhook creation and management, authenticated with a project API key

List webhooks for a project

GET/api/projects/{projectId}/webhooks

Returns the webhooks owned by the requesting project. Channel and server names are resolved from the bot cache and may be null.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
projectIdpathstringyesProject ID (must be the requesting project)
serverIdquerystringnoFilter by Discord server ID. The project must have access to that server.
limitquerynumbernoMax number of webhooks (1-100) Default: 50.
offsetquerynumbernoPagination offset Default: 0.

Responses

StatusDescriptionBody
200List of webhooks.WebhookListResponseDto
400Invalid query parameters.
401Missing or invalid API key.
403The serverId filter names a server the project cannot access.
404Project not found for this API key.

Open in Swagger (opens in a new tab)

Create a webhook for a channel

POST/api/servers/{serverId}/channels/{channelId}/webhooks

Creates a Discord webhook in the channel and stores it for the project. The webhook URL and token are encrypted at rest and never returned.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
channelIdpathstringyesDiscord channel ID

Request body (JSON, required): CreateWebhookDto schema.

Responses

StatusDescriptionBody
201Webhook created.WebhookCreatedResponseDto
400Invalid name or avatar.
401Missing or invalid API key.
403Project does not have MANAGE_WEBHOOKS operation on this server.
404Channel does not exist or bot lacks access.
409Project webhook limit reached.
502Discord API error.

Open in Swagger (opens in a new tab)

Get webhook details

GET/api/webhooks/{webhookId}

Returns webhook details. The webhook must belong to the requesting project.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
webhookIdpathstringyesWebhook ID

Responses

StatusDescriptionBody
200Webhook details.WebhookDetailResponseDto
401Missing or invalid API key.
404Webhook not found for this project.

Open in Swagger (opens in a new tab)

Update webhook settings

PATCH/api/webhooks/{webhookId}

Updates the webhook name and/or avatar on Discord, then in storage. The webhook must belong to the requesting project.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
webhookIdpathstringyesWebhook ID

Request body (JSON, required): UpdateWebhookDto schema.

Responses

StatusDescriptionBody
200Updated webhook.WebhookDetailResponseDto
400Invalid name or avatar.
401Missing or invalid API key.
404Webhook not found for this project.
502Discord API error.

Open in Swagger (opens in a new tab)

Delete a webhook

DELETE/api/webhooks/{webhookId}

Deletes the webhook on Discord and removes it from storage. The webhook must belong to the requesting project.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
webhookIdpathstringyesWebhook ID

Responses

StatusDescriptionBody
204Webhook deleted.
401Missing or invalid API key.
404Webhook not found for this project.
502Discord API error.

Open in Swagger (opens in a new tab)

Execute a webhook

POST/api/webhooks/{webhookId}/execute

Sends a message through a stored Discord webhook. The webhook must belong to the requesting project.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
webhookIdpathstringyesWebhook ID

Request body (JSON, required): ExecuteWebhookDto schema.

Responses

StatusDescriptionBody
204Webhook executed.
400Message content and embeds are both empty or invalid.
401Missing or invalid API key.
404Webhook not found for this project.
429Execution limit exceeded for this project.
502Discord rejected every attempt.

Open in Swagger (opens in a new tab)

Schemas

CreateWebhookDto schema

FieldTypeRequiredDescription
avatarstringnoBase64-encoded avatar image, decoded size max 256KB. A base64 data URI is also accepted.
namestringyesWebhook name (2-80 chars)

EmbedAuthorDto schema

FieldTypeRequiredDescription
icon_urlstring (uri)noAuthor icon URL
namestringyesAuthor name
urlstring (uri)noAuthor URL

EmbedDto schema

FieldTypeRequiredDescription
authorEmbedAuthorDtonoEmbed author
colornumbernoColor as decimal integer (0-16777215)
descriptionstringnoEmbed description
footerEmbedFooterDtonoEmbed footer
imageEmbedImageDtonoEmbed image
thumbnailEmbedThumbnailDtonoEmbed thumbnail
titlestringnoEmbed title
urlstring (uri)noEmbed URL

EmbedFooterDto schema

FieldTypeRequiredDescription
icon_urlstring (uri)noFooter icon URL
textstringyesFooter text

EmbedImageDto schema

FieldTypeRequiredDescription
urlstring (uri)yesURL of the image

EmbedThumbnailDto schema

FieldTypeRequiredDescription
urlstring (uri)yesURL of the thumbnail

ExecuteWebhookDto schema

FieldTypeRequiredDescription
avatar_urlstring (uri)noAvatar used for this message
contentstringnoMessage content, optional when embeds are present
embedsarray of EmbedDtonoEmbed objects
usernamestringnoName used for this message

UpdateWebhookDto schema

FieldTypeRequiredDescription
avatarstring or nullnoBase64-encoded avatar image (decoded size max 256KB), or null to remove the avatar.
namestringnoWebhook name (2-80 chars)

WebhookCreatedResponseDto schema

FieldTypeRequiredDescription
channelIdstringyesDiscord channel ID
createdAtstringyesISO 8601 creation timestamp
idstringyesWebhook ID
namestringyesWebhook name
projectIdstringyesOwning project ID
serverIdstringyesDiscord server ID
usageCountnumberyesNumber of executions

WebhookDetailResponseDto schema

FieldTypeRequiredDescription
avatarstring or nullyesDiscord avatar hash
channelIdstringyesDiscord channel ID
channelNamestring or nullyesChannel name from the bot cache
createdAtstringyesISO 8601 creation timestamp
idstringyesWebhook ID
lastUsedAtstring or nullyesISO 8601 timestamp of the last execution
namestringyesWebhook name
serverIdstringyesDiscord server ID
serverNamestring or nullyesServer name from the bot cache
usageCountnumberyesNumber of executions

WebhookListResponseDto schema

FieldTypeRequiredDescription
limitnumberyesApplied limit
offsetnumberyesApplied offset
totalnumberyesTotal webhooks matching the filter
webhooksarray of WebhookSummaryDtoyes

WebhookSummaryDto schema

FieldTypeRequiredDescription
channelIdstringyesDiscord channel ID
channelNamestring or nullyesChannel name from the bot cache
createdAtstringyesISO 8601 creation timestamp
idstringyesWebhook ID
lastUsedAtstring or nullyesISO 8601 timestamp of the last execution
namestringyesWebhook name
serverIdstringyesDiscord server ID
serverNamestring or nullyesServer name from the bot cache
usageCountnumberyesNumber of executions

Source: apps/api/openapi.json.