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.
1. Check that OAuth install is available
Section titled “1. Check that OAuth install is available”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.
curl "https://acme.app.elastio.com/gateway/integration/v1/slack/status" \ -H "Authorization: Bearer $ELASTIO_TOKEN"import os, requests
BASE = "https://acme.app.elastio.com"HEADERS = {"Authorization": f"Bearer {os.environ['ELASTIO_TOKEN']}"}
resp = requests.get(f"{BASE}/gateway/integration/v1/slack/status", headers=HEADERS, timeout=30)resp.raise_for_status()print(resp.json())$Base = "https://acme.app.elastio.com"$Headers = @{ Authorization = "Bearer $env:ELASTIO_TOKEN" }Invoke-RestMethod -Uri "$Base/gateway/integration/v1/slack/status" -Headers $Headers{ "oauth_available": true, "oauth_configured": true, "redis_available": true, "crud_available": true, "test_available": true}2. Connect a workspace with OAuth
Section titled “2. Connect a workspace with OAuth”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.
curl "https://acme.app.elastio.com/gateway/integration/v1/slack/oauth/authorize" \ -H "Authorization: Bearer $ELASTIO_TOKEN" | jq -r .authorize_urlresp = requests.get(f"{BASE}/gateway/integration/v1/slack/oauth/authorize", headers=HEADERS, timeout=30)resp.raise_for_status()print("Open this URL in a browser:", resp.json()["authorize_url"])$auth = Invoke-RestMethod -Uri "$Base/gateway/integration/v1/slack/oauth/authorize" -Headers $HeadersStart-Process $auth.authorize_url{ "authorize_url": "https://slack.com/oauth/v2/authorize?client_id=...&state=...", "state": "eyJ0ZW5hbnRfbmFtZSI6ImFjbWUiLC…"}3. Find the integration
Section titled “3. Find the integration”Integrations created by OAuth are named Slack - <workspace> and have newly_created: true until their setup is finished. Tokens are masked in responses.
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}'resp = requests.get(f"{BASE}/gateway/integration/v1/slack", headers=HEADERS, timeout=30)resp.raise_for_status()for i in resp.json()["integrations"]: print(i["id"], i["name"], i["workspace_name"], i["status"], i["newly_created"])(Invoke-RestMethod -Uri "$Base/gateway/integration/v1/slack" -Headers $Headers).integrations | Select-Object id, name, workspace_name, status, newly_created{ "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}4. Choose delivery channels
Section titled “4. Choose delivery channels”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.
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)"'slack_id = "3f8d2a6c-1b4e-4c7a-9e2d-7a5b1c9f0e43"resp = requests.get(f"{BASE}/gateway/integration/v1/slack/{slack_id}/channels", headers=HEADERS, timeout=30)resp.raise_for_status()for ch in resp.json()["channels"]: if ch["can_post"]: print(ch["id"], ch["name"], ch["type"])$SlackId = "3f8d2a6c-1b4e-4c7a-9e2d-7a5b1c9f0e43"(Invoke-RestMethod -Uri "$Base/gateway/integration/v1/slack/$SlackId/channels" -Headers $Headers).channels | Where-Object can_post | Select-Object id, name, typeAdd a mapping for each channel the integration may deliver to. Set is_default: true on one of them.
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}'resp = requests.post( f"{BASE}/gateway/integration/v1/slack/{slack_id}/channel-mappings", headers=HEADERS, json={"channel_id": "C0ADDKEPP8V", "channel_name": "elastio-alerts", "is_default": True}, timeout=30,)resp.raise_for_status()print(resp.json()["id"])$body = @{ channel_id = "C0ADDKEPP8V"; channel_name = "elastio-alerts"; is_default = $true } | ConvertTo-JsonInvoke-RestMethod -Method Post -Uri "$Base/gateway/integration/v1/slack/$SlackId/channel-mappings" ` -Headers $Headers -ContentType "application/json" -Body $body{ "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.
5. Finish setup and send a test message
Section titled “5. Finish setup and send a test message”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.
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}'resp = requests.put( f"{BASE}/gateway/integration/v1/slack/{slack_id}", headers=HEADERS, json={"name": "Security alerts", "newly_created": False}, timeout=30,)resp.raise_for_status()$body = @{ name = "Security alerts"; newly_created = $false } | ConvertTo-JsonInvoke-RestMethod -Method Put -Uri "$Base/gateway/integration/v1/slack/$SlackId" ` -Headers $Headers -ContentType "application/json" -Body $bodyPosts 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.
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"}'resp = requests.post( f"{BASE}/gateway/integration/v1/slack/{slack_id}/test", headers=HEADERS, json={"channel_id": "C0ADDKEPP8V"}, timeout=30,)resp.raise_for_status()result = resp.json()print("ok" if result["success"] else result.get("error_message"))$body = @{ channel_id = "C0ADDKEPP8V" } | ConvertTo-Json$result = Invoke-RestMethod -Method Post -Uri "$Base/gateway/integration/v1/slack/$SlackId/test" ` -Headers $Headers -ContentType "application/json" -Body $bodyif ($result.success) { "ok" } else { $result.error_message }{ "success": true, "status_code": 200, "latency_ms": 246 }6. Monitor deliveries
Section titled “6. Monitor deliveries”/gateway/integration/v1/slack/{slack_id}/invocationsGet Slack invocation history for an integrationDelivery 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.
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}'resp = requests.get( f"{BASE}/gateway/integration/v1/slack/{slack_id}/invocations", headers=HEADERS, params={"period": "24h", "status": "failed", "pageSize": 100}, timeout=30,)resp.raise_for_status()for inv in resp.json()["invocations"]: print(inv.get("created_at"), inv.get("event_type"), inv.get("error_message"))(Invoke-RestMethod -Uri "$Base/gateway/integration/v1/slack/$SlackId/invocations?period=24h&status=failed" -Headers $Headers).invocations | Select-Object created_at, event_type, http_status_code, error_messageGET /gateway/integration/v1/slack/statistics returns totals across all Slack integrations (total_deliveries, successful_deliveries, failed_deliveries and active/inactive counts) for a period.
All endpoints
Section titled “All endpoints”Slack
17 operations in the reference →- GET
/gateway/integration/v1/slackList Slack integrations - POST
/gateway/integration/v1/slackCreate a Slack integration from a bot token - GET
/gateway/integration/v1/slack/statusSlack service readiness - GET
/gateway/integration/v1/slack/oauth/authorizeMint the Slack consent URL - POST
/gateway/integration/v1/slack/testPost a test message - GET
/gateway/integration/v1/slack/{slack_id}Get a Slack integration - PUT
/gateway/integration/v1/slack/{slack_id}Update a Slack integration - DELETE
/gateway/integration/v1/slack/{slack_id}Delete a Slack integration - POST
/gateway/integration/v1/slack/{slack_id}/testPost a test message with this integration - GET
/gateway/integration/v1/slack/{slack_id}/channelsList the workspace's channels - GET
/gateway/integration/v1/slack/{slack_id}/channel-mappingsList channel mappings - POST
/gateway/integration/v1/slack/{slack_id}/channel-mappingsAdd a channel mapping - DELETE
/gateway/integration/v1/slack/{slack_id}/channel-mappings/{mapping_id}Remove a channel mapping - GET
/gateway/integration/v1/slack/statisticsGet Slack delivery statistics - GET
/gateway/integration/v1/slack/invocations/filter-optionsGet filter options for Slack invocations list - GET
/gateway/integration/v1/slack/invocationsGet Slack invocation history (all integrations) - GET
/gateway/integration/v1/slack/{slack_id}/invocationsGet Slack invocation history for an integration