Overview
Instead of polling the status endpoint, you can provide acallback_url in your interactive notification request. NextKS will POST the results to your URL when the request finishes.
When callbacks fire
A callback is triggered when:onUserActionmode: All users have respondedonTimeoutmode: The timeout is reached- Either mode: The timeout is reached and some users haven’t responded
Signature verification
Every callback request is signed with HMAC-SHA256 so you can verify it came from NextKS. When you send an interactive notification with acallback_url, the API response includes a callback_secret. Store this secret securely — you’ll use it to verify incoming callbacks.
Verification headers
| Header | Description |
|---|---|
X-NextKS-Signature | sha256=<hex> — HMAC-SHA256 of the raw request body, keyed with your callback_secret |
X-NextKS-Request-Id | The request_id from the original notification |
Verification example
Callback payload
NextKS sends aPOST request with Content-Type: application/json:
Callback URL requirements
Your callback URL is validated when you submit the notification:| Requirement | Details |
|---|---|
| Protocol | HTTPS only |
| DNS | Must resolve to a public IP address |
| Reachability | Must respond to a HEAD request within 5 seconds |
| Private IPs | Blocked (10.x, 172.16-31.x, 192.168.x, 127.x, 169.254.x) |
400 error.
Retries
If a callback delivery fails (network error or non-2xx response), NextKS retries automatically with exponential backoff:| Attempt | Delay after failure | Total elapsed |
|---|---|---|
| 1 (initial) | immediate | 0 |
| 2 | 1 minute | ~1 min |
| 3 | 2 minutes | ~3 min |
| 4 | 4 minutes | ~7 min |
| 5 | 8 minutes | ~15 min |
| 6 | 16 minutes | ~31 min |
- Up to 6 total attempts (1 initial + 5 retries)
- Each attempt is logged with the error message
- Once successful, no further retries are attempted
Handling callbacks
Your endpoint should:- Return a
2xxstatus code to acknowledge receipt - Process the payload asynchronously if needed — NextKS has a 10-second timeout
- Be idempotent — in rare cases, a callback may be delivered more than once