Skip to content
Try the API

Slack

The Slack integration posts Elastio notifications into your Slack workspace. Through the API you can connect a workspace, see which channels the Elastio bot can reach, decide which channels it delivers to, send a test message and review delivery history.

Each connected workspace is a Slack integration. An integration can deliver to its own channel_id (set at install time) and to any number of channel mappings, one of which can be the default. The integration’s own channel_id takes priority over the default mapping when delivery picks a target.

GET
/gateway/integration/v1/slack/statusSlack service readiness
Try it

Read this before offering a “Connect Slack” action. When oauth_available is false, oauth_unavailable_reasons says why, and the authorize call would return 503.

Terminal window
curl "https://acme.app.elastio.com/gateway/integration/v1/slack/status" \
-H "Authorization: Bearer $ELASTIO_TOKEN"
{
"oauth_available": true,
"oauth_configured": true,
"redis_available": true,
"crud_available": true,
"test_available": true
}
GET
/gateway/integration/v1/slack/oauth/authorizeMint the Slack consent URL
Try it

This mints a Slack consent URL carrying a signed state that is valid for 10 minutes. Open authorize_url in a browser and approve the app in Slack. Slack then calls Elastio back to finish the install, so this response doesn’t tell you the outcome: list the integrations afterwards to see the new workspace.

Terminal window
curl "https://acme.app.elastio.com/gateway/integration/v1/slack/oauth/authorize" \
-H "Authorization: Bearer $ELASTIO_TOKEN" | jq -r .authorize_url
{
"authorize_url": "https://slack.com/oauth/v2/authorize?client_id=...&state=...",
"state": "eyJ0ZW5hbnRfbmFtZSI6ImFjbWUiLC…"
}
GET
/gateway/integration/v1/slackList Slack integrations
Try it

Integrations created by OAuth are named Slack - <workspace> and have newly_created: true until their setup is finished. Tokens are masked in responses.

Terminal window
curl "https://acme.app.elastio.com/gateway/integration/v1/slack" \
-H "Authorization: Bearer $ELASTIO_TOKEN" \
| jq '.integrations[] | {id, name, workspace_name, status, newly_created, channel_name}'
{
"integrations": [
{
"id": "3f8d2a6c-1b4e-4c7a-9e2d-7a5b1c9f0e43",
"tenant_name": "acme",
"name": "Slack - acme-security",
"workspace_id": "T0ADALJ19J7",
"workspace_name": "acme-security",
"status": "active",
"auth_method": "oauth",
"bot_token": "xoxb-********",
"channel_id": "C0ADDKEPP8V",
"channel_name": "elastio-alerts",
"newly_created": true,
"created_at": "2026-10-01T09:12:44Z",
"updated_at": "2026-10-01T09:12:44Z"
}
],
"oauth_available": true
}
GET
/gateway/integration/v1/slack/{slack_id}/channelsList the workspace's channels
Try it

Lists the conversations the bot can see, fetched live from Slack. can_post tells you whether a message from the bot will actually reach the channel.

Terminal window
SLACK_ID="3f8d2a6c-1b4e-4c7a-9e2d-7a5b1c9f0e43"
curl "https://acme.app.elastio.com/gateway/integration/v1/slack/$SLACK_ID/channels" \
-H "Authorization: Bearer $ELASTIO_TOKEN" \
| jq -r '.channels[] | select(.can_post) | "\(.id)\t\(.name)"'
POST
/gateway/integration/v1/slack/{slack_id}/channel-mappingsAdd a channel mapping
Try it

Add a mapping for each channel the integration may deliver to. Set is_default: true on one of them.

Terminal window
curl -X POST "https://acme.app.elastio.com/gateway/integration/v1/slack/$SLACK_ID/channel-mappings" \
-H "Authorization: Bearer $ELASTIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel_id": "C0ADDKEPP8V", "channel_name": "elastio-alerts", "is_default": true}'
{
"id": "b7e1c0d2-5a4f-4e9b-8c3d-2f6a1e0b9d84",
"slack_integration_id": "3f8d2a6c-1b4e-4c7a-9e2d-7a5b1c9f0e43",
"tenant_name": "acme",
"channel_id": "C0ADDKEPP8V",
"channel_name": "elastio-alerts",
"is_default": true,
"created_at": "2026-10-01T09:20:03Z",
"updated_at": "2026-10-01T09:20:03Z"
}

GET /gateway/integration/v1/slack/{slack_id}/channel-mappings lists the mappings, default first.

PUT
/gateway/integration/v1/slack/{slack_id}Update a Slack integration
Try it

Rename the integration and clear newly_created. Only name, description and newly_created are writable; the workspace, tokens and channel_id come from the install.

Terminal window
curl -X PUT "https://acme.app.elastio.com/gateway/integration/v1/slack/$SLACK_ID" \
-H "Authorization: Bearer $ELASTIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Security alerts", "newly_created": false}'
POST
/gateway/integration/v1/slack/{slack_id}/testPost a test message with this integration
Try it

Posts a test message with this integration’s bot token. Without channel_id in the body it uses the integration’s own channel_id. A 200 means the test was attempted: check success, and error_message when it is false.

Terminal window
curl -X POST "https://acme.app.elastio.com/gateway/integration/v1/slack/$SLACK_ID/test" \
-H "Authorization: Bearer $ELASTIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel_id": "C0ADDKEPP8V"}'
{ "success": true, "status_code": 200, "latency_ms": 246 }
GET
/gateway/integration/v1/slack/{slack_id}/invocationsGet Slack invocation history for an integration
Try it

Delivery history for one integration. Filter with period (for example 24h, 7d, 30d; default 7d) and status (scheduled, in_progress, delivered, failed, retryable or all). It pages with pageSize (1–100, default 50) and pageToken; the next token is in pagination.next_page_token.

Terminal window
curl "https://acme.app.elastio.com/gateway/integration/v1/slack/$SLACK_ID/invocations?period=24h&status=failed" \
-H "Authorization: Bearer $ELASTIO_TOKEN" \
| jq '.invocations[] | {created_at, event_type, http_status_code, error_message, retry_count}'

GET /gateway/integration/v1/slack/statistics returns totals across all Slack integrations (total_deliveries, successful_deliveries, failed_deliveries and active/inactive counts) for a period.