Quick reference

All paths are relative to the service base URL. Bearer token is required where noted.

8.1 Service info and health

MethodPathAuthDescription
GEThttps://connect.routee.net/failover-otpNoService info (name, version, status).
GEThttps://connect.routee.net/failover-otp/healthNoHealth check. Returns {"status": "ok"}.

GET / – Returns service, version, status, and health (path to health endpoint).


8.2 Send OTP

MethodPathAuthDescription
POSThttps://connect.routee.net/failover-otp/otp/send-failoverBearerSend OTP with a failover flow (e.g. Viber then SMS).

Request: JSON body with flow (required) and callback (optional). See §4.1.

Response (200):

FieldTypeDescription
flowIdstring | nullUnique flow identifier (UUID). Use for tracking (GET /otp/failover/{flowId}). Null when status is Failed (send rejected on all channels).
statusstring"InProgress" (multi-step flow; first step accepted, failover may run later), "Succeeded" (single-step flow), or "Failed".
typestring | null"Viber" or "Sms" (channel that succeeded). Null when status is Failed.
flowarrayEcho of the request flow; the step that was sent has trackingId (message token).
createdAtstringISO 8601 timestamp.
errorstringPresent when status is Failed.
statusCodeint | nullWhen 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

MethodPathAuthDescription
GEThttps://connect.routee.net/failover-otp/otp/failover/{tracking_id}BearerGet failover tracking and full delivery story (steps).
GEThttps://connect.routee.net/failover-otp/otp/failoverBearerList 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

MethodPathAuthDescription
GEThttps://connect.routee.net/failover-otp/otp/templatesNoList 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

Headers for authenticated requests:
Authorization: Bearer <access_token>
Content-Type: application/json (for POST body)

8.6 Error handling

HTTP statusWhen it occurs
401Missing or invalid Bearer token. Obtain a new token from Routee and retry.
404Resource not found. For GET https://connect.routee.net/failover-otp/otp/failover/{tracking_id}: no delivery with that tracking_id.
422Request validation failed. Invalid JSON body, missing required fields, or invalid values (e.g. flow step type, format). Check the response body for details.
503Service temporarily unavailable (e.g. upstream provider or internal error). Retry with backoff.