Skip to navigation

Create a Slack or Discord integration

View as MarkdownOpen in Claude

Creates the Slack or Discord destination of a notification configuration. If the configuration already has a destination of that type, its URL is replaced instead and the destination keeps its id. It never sends a test message and never switches the channel on: that is slack_channel or discord_channel on “Update a notification configuration”.

A destination has no request of its own to read it: read it with “Retrieve a notification configuration” and include=integrations. The complete URL is returned on ordinary reads too. To change the URL of an existing destination use “Update a Slack or Discord integration”, and to remove it “Delete a Slack or Discord integration”.

Your role must be allowed to edit notification configurations and the organization’s plan must include the channel; otherwise the request answers 404. The body is checked before the configuration, so an invalid body answers 422 and a configuration of another organization answers 404 only when the body is valid.

Body

  • type (slack or discord, required): the kind of destination.
  • url (string, required): at most 2048 characters, a complete https://hooks.slack.com/services/... URL for slack, or a complete https://discord.com/api/webhooks/... (or discordapp.com) URL for discord.

Errors

  • 422: type is not slack or discord, or url is empty, masked or not valid for the type.

Authentication

AuthorizationBearer

Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

Path parameters

alert_idstringRequired

Request

This endpoint expects an object.
typestringOptional
urlstringOptional

Response

201 - Integration created (or replaced)

dataobjectOptional
jsonapiobjectOptional

Errors

422
Unprocessable Entity Error