Quick reference
All paths are relative to the service base URL. Bearer token is required where noted.
8.1 Service info and health
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | https://connect.routee.net/failover-otp | No | Service info (name, version, status). |
| GET | https://connect.routee.net/failover-otp/health | No | Health check. Returns {"status": "ok"}. |
GET / – Returns service, version, status, and health (path to health endpoint).
8.2 Send OTP
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | https://connect.routee.net/failover-otp/otp/send-failover | Bearer | Send OTP with a failover flow (e.g. Viber then SMS). |
Request: JSON body with flow (required) and callback (optional). See §4.1.
Response (200):
| Field | Type | Description |
|---|---|---|
| flowId | string | null | Unique flow identifier (UUID). Use for tracking (GET /otp/failover/{flowId}). Null when status is Failed (send rejected on all channels). |
| status | string | "InProgress" (multi-step flow; first step accepted, failover may run later), "Succeeded" (single-step flow), or "Failed". |
| type | string | null | "Viber" or "Sms" (channel that succeeded). Null when status is Failed. |
| flow | array | Echo of the request flow; the step that was sent has trackingId (message token). |
| createdAt | string | ISO 8601 timestamp. |
| error | string | Present when status is Failed. |
| statusCode | int | null | When Failed: 0=server error, 1=insufficient balance, 2=no next step, 3=not failover triggered. |
Errors: 401 (missing/invalid token), 422 (validation error).
8.3 Tracking and listing deliveries
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | https://connect.routee.net/failover-otp/otp/failover/{tracking_id} | Bearer | Get failover tracking and full delivery story (steps). |
| GET | https://connect.routee.net/failover-otp/otp/failover | Bearer | List deliveries with optional filters and pagination. |
GET /otp/failover/{tracking_id} – See §5.1.
GET /otp/failover – Query params: status, tag, phone_number, flow_id, limit, offset. Response: total, limit, offset, results.
Errors: 401, 404 (tracking not found).
8.4 Templates
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | https://connect.routee.net/failover-otp/otp/templates | No | List available Viber OTP template types, parameters, and template UUIDs. |
Response (200): total and templates (array of template objects with id, type, name, description, required_params, optional_params, example_message).
8.5 Quick reference
| Action | Method | Path | Auth |
|---|---|---|---|
| Service info | GET | https://connect.routee.net/failover-otp/ | No |
| Health | GET | https://connect.routee.net/failover-otp/health | No |
| Send OTP | POST | https://connect.routee.net/failover-otp/otp/send-failover | Bearer |
| Get failover tracking | GET | https://connect.routee.net/failover-otp/otp/failover/{tracking_id} | Bearer |
| List deliveries | GET | https://connect.routee.net/failover-otp/otp/failover | Bearer |
| List templates | GET | https://connect.routee.net/failover-otp/otp/templates | No |
Headers for authenticated requests:
Authorization: Bearer <access_token>
Content-Type: application/json (for POST body)
8.6 Error handling
| HTTP status | When it occurs |
|---|---|
| 401 | Missing or invalid Bearer token. Obtain a new token from Routee and retry. |
| 404 | Resource not found. For GET https://connect.routee.net/failover-otp/otp/failover/{tracking_id}: no delivery with that tracking_id. |
| 422 | Request validation failed. Invalid JSON body, missing required fields, or invalid values (e.g. flow step type, format). Check the response body for details. |
| 503 | Service temporarily unavailable (e.g. upstream provider or internal error). Retry with backoff. |
Updated 1 day ago
