Skip to main content

Overview

Interactive notifications display a message with clickable buttons. Users respond directly in Slack or Teams, and you can track responses via polling or callbacks. Common use cases:
  • Deployment approvals
  • Incident acknowledgement
  • Shift confirmations
  • Survey questions

Endpoint

POST /api/notify

Request body

Include the response_request field alongside the standard notification fields.
user_emails
string[]
required
Recipients. Maximum 50.
message
string
required
The prompt shown above the buttons. Maximum 4000 characters.
external_reference_id
string
Your correlation ID. Maximum 200 characters.
response_request
object
required
Configures the interactive behavior.

Response

status
string
"ok" on success.
request_id
string
Unique identifier for this notification request. Use it to check status.
{
  "status": "ok",
  "request_id": "req_a1b2c3d4e5f6..."
}

Example: deployment approval

curl -X POST https://app.nextks.com/api/notify \
  -H "Content-Type: application/json" \
  -H "X-API-Key: nks_abc123..." \
  -d '{
    "user_emails": ["[email protected]"],
    "message": "Release v2.4.1 is ready.\nChanges: 3 bug fixes, 1 new feature.\n\nDeploy to production?",
    "external_reference_id": "deploy-v2.4.1",
    "response_request": {
      "options": [
        { "text": "Approve", "value": "approve" },
        { "text": "Reject", "value": "reject" },
        { "text": "Delay 1h", "value": "delay" }
      ],
      "timeout_minutes": 60,
      "callback_url": "https://ci.company.com/hooks/nextks"
    }
  }'

Message appearance

The notification renders as:
  1. Message text — Your message content with markdown formatting
  2. Response buttons — One button per option
  3. Footer — Shows validity period and sender name (e.g., “Valid for 1h. Sent by Alice via Notifications API.”)
After a user responds (in onUserAction mode), the message is updated to show their choice and the buttons are removed.

Disable modes

  • Buttons disable immediately when the user clicks
  • The user’s choice is final
  • Request completes when all users respond or timeout is reached
  • Best for: approvals, acknowledgements — one-shot decisions