Skip to main content
Use Zexa’s Slack integration to send automated notifications directly into your Slack workspace — ideal for operational alerts, customer event notifications, and internal status updates. Once connected, you can route any Zexa message to a Slack channel or direct message using the same unified API you use for every other channel.

Setup

Connect your Slack workspace to Zexa in four steps:
1

Open Slack settings in Zexa

Log in to the Zexa dashboard and navigate to Channels > Slack.
2

Connect your workspace

Click Connect Slack. You’ll be redirected to Slack’s OAuth authorisation page. Review the permissions requested and click Allow to authorise the Zexa app in your workspace.
3

Select a default channel

After authorisation, select the Slack channel where notifications should be sent by default. You can override this on a per-message basis using the to field in the API.
4

Copy your Slack channel ID

Once the connection is confirmed, Zexa will display the channel ID for your default channel. Copy and store this ID — you’ll use it as the to value when sending messages via the API.

Send a Slack message via API

Send a POST request to /messages with "channel": "slack" to post a message to your connected Slack workspace.
curl --request POST \
  --url https://api.zexa.ao/v1/messages \
  --header 'Authorization: Bearer <api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "channel": "slack",
    "to": "C0123456789",
    "from": "zexa-bot",
    "body": "Alert: Server response time exceeded 2s."
  }'
A successful request returns a 201 response with the message object:
{
  "id": "msg_sl6670",
  "status": "queued",
  "channel": "slack",
  "to": "C0123456789",
  "created_at": "2026-06-24T10:20:00Z"
}

Channel vs direct message

The to field accepts two types of Slack destination IDs:
DestinationID prefixExampleUse case
Public channelCC0123456789Team-wide alerts and announcements
Private channelCC9876543210Internal team notifications
Direct messageUU0ABC123DEFPersonal alerts for a specific user
Use a channel ID (starting with C) to post to a channel, or a user ID (starting with U) to send a direct message to an individual workspace member.
Find a channel’s ID in Slack by right-clicking the channel name in the sidebar and selecting Copy link. The ID is the alphanumeric string at the end of the URL (e.g., C0123456789).
The Zexa Slack app must be invited to any private channel before it can post there. In Slack, open the private channel and run /invite @Zexa to grant access.

Next steps

Webhooks

Configure webhooks to trigger Zexa messages — including Slack notifications — from external events.

Campaigns

Schedule and send bulk notifications across Slack and other channels simultaneously.