Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

Errors

Ruut Voice uses standard HTTP status codes. Errors return a JSON body with a code and message.

Error format

HTTP/1.1 400 Bad Request Content-Type: application/json { "code": 21211, "message": "The 'To' number is not a valid phone number.", "more_info": "https://voice.ruut.chat/docs/reference/errors" }

HTTP status codes

StatusMeaning
400Bad request — invalid parameters or validation failure.
401Unauthorized — missing or invalid credentials.
403Forbidden — authenticated but not permitted (e.g. unverified source number).
404Not found — resource doesn't exist.
409Conflict — state conflict (e.g. call already accepted).
429Too many requests — rate limit exceeded.
500Internal server error — retry with backoff.

Examples of API errors

CodeMeaningContext
20003Authentication failed or the token lacks a required scopeHTTP 401
20021Insufficient fundsBilling gate, HTTP 403
30002Account suspendedAuthentication or account authorization
20429Too many requestsRequest throttle, HTTP 429
Validation and fraud responses vary by endpoint. Inspect the returned code, message, and HTTP status; a fraud response can also include fraud_reason.

Handling with the SDK

import { RuutApiError } from "@ruut/voice-sdk"; try { await client.calls.create({ to: "+…", from: "+…", twiml }); } catch (err) { if (err instanceof RuutApiError) { console.error(err.status, err.code, err.message, err.requestId); } }