Skip to main content

Worked public samples

The endpoint list below documents every public route’s parameters; this overlay walks a callback-remember link the way the token holder actually uses it: look up the callback → check its status → cancel it → reschedule it. The {token} path segment is the public bearer handle Devotel mails to the customer; treat it like a read-once credential. Success envelopes are { data, meta }, error envelopes { error, meta } — the four shapes together are documented in How to read a worked sample. Every response carries meta.request_id. Quote the request id when you report an out-of-window token or a misfired cancel so support can trace the request end-to-end. Public endpoints accept the same sandbox key rule as the rest of the reference — run samples with a dv_test_sk_* key and never post a live token from a browser.

1. Look up a callback token

GET /api/v1/public/callbacks/{token} returns the callback’s arrival state — ok: true with status set to pending, running, succeeded, failed, or canceled. It also reports whether a cancel and a reschedule request would still be accepted, so your confirmation page can hide an action that would 409.
200
caller masks the calling number for screen readers and logs; the full E.164 number only resolves inside your tenant-scoped callback list.

2. Check a callback’s status

GET /api/v1/public/callbacks/{token}/status answers the same envelope without the embedded PII — use it for a barebones “still pending” check on the confirmation page before you offer the cancel button.
200

3. Cancel the callback

POST /api/v1/public/callbacks/{token}/cancel stops the remaining retry wins and flips the callback to canceled. It works even after an attempt already ran — already_canceled true` tells you a previous cancel-won, and the request is idempotent.
200

4. Reschedule the callback

POST /api/v1/public/callbacks/{token}/reschedule moves the callback to a new scheduled_for and resets the retry ladder. Rotate scheduled_for — send the new timestamp when you re-issue the token.
200

5. Errors

Errors follow the { error, meta } envelope. Two failures every token holder hits: 404 — token not found or out of window. A guessed token was never issued or the callback window already closed. Do not retry.
404
429 — token hydra-throttled. A public link that is punched 60 seconds apart returns a plain rate-limit so a runaway browser refresh is bounded:
429