{"openapi":"3.1.0","info":{"title":"sms-multi API","version":"1.0.0","description":"SMS to every Mongolian operator through one API. JSON only, bodies up to 1 MB, unknown fields ignored. Every response carries `X-Request-Id`. Errors use one envelope (`Error`) whose `param` and `details` are always present. Test keys (`sk_test_…`) never send and cost nothing; magic numbers `00000000`–`00000006` simulate outcomes. Error catalog: https://web-production-c8403.up.railway.app/docs/errors."},"servers":[{"url":"https://web-production-c8403.up.railway.app/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Messages"},{"name":"OTP"},{"name":"Numbers"},{"name":"Account"},{"name":"Templates"},{"name":"Suppressions"},{"name":"Webhooks"},{"name":"Events"},{"name":"Meta"}],"paths":{"/messages":{"get":{"operationId":"listMessages","summary":"List messages","description":"Newest first, in the key's mode only.","tags":["Messages"],"x-scope":"messages:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MessageStatus"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"batch_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["sms","otp"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: `next_cursor` of the previous page."}],"responses":{"200":{"description":"A page of messages.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"sendMessage","summary":"Send a message","description":"Queues one SMS (priority 5). Charged up front; refunded if it fails, expires or is canceled.","tags":["Messages"],"x-scope":"messages:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 chars. A retry with the same key and body replays the stored response (`Idempotent-Replayed: true`); a different body gives `idempotency_key_reused` (422); a request still in flight gives `idempotency_key_in_use` (409). Kept 24h.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"202":{"description":"Accepted for sending.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_balance` or `spend_cap_reached`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`idempotency_key_in_use`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`operator_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/batch":{"post":{"operationId":"sendBatch","summary":"Send a batch","description":"Up to 1000 messages. Invalid items are rejected individually; valid ones are charged in one go. If balance or a cap fails for the total, the whole batch is rejected (402).","tags":["Messages"],"x-scope":"messages:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 chars. A retry with the same key and body replays the stored response (`Idempotent-Replayed: true`); a different body gives `idempotency_key_reused` (422); a request still in flight gives `idempotency_key_in_use` (409). Kept 24h.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"202":{"description":"Batch accepted (see per-item `results`).","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateResult"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_balance` or `spend_cap_reached`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`idempotency_key_in_use`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`operator_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/dry-run":{"post":{"operationId":"dryRunMessage","summary":"Preview a message","description":"Renders, analyzes (encoding, segments, UCS-2 trigger) and prices a message. Free; nothing is stored.","tags":["Messages"],"x-scope":"messages:write","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunRequest"}}}},"responses":{"200":{"description":"The preview.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/{id}":{"get":{"operationId":"getMessage","summary":"Get a message","tags":["Messages"],"x-scope":"messages:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`msg_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"The message with its status timeline.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageWithEvents"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages/{id}/cancel":{"post":{"operationId":"cancelMessage","summary":"Cancel a message","description":"Only while `scheduled` or `queued`. Refunded.","tags":["Messages"],"x-scope":"messages:write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`msg_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"The canceled message.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`message_not_cancelable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/batches/{id}":{"get":{"operationId":"getBatch","summary":"Get a batch","tags":["Messages"],"x-scope":"messages:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`bat_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"Batch progress.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/otp":{"post":{"operationId":"sendOtp","summary":"Send a verification code","description":"Limits per number: 1 per 30s, 5 per 10 min, 20 per 24h (`otp_rate_limited`, `details.retry_after_seconds`). A new code cancels the previous pending one. Test keys get `test_code`.","tags":["OTP"],"x-scope":"otp","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 255 chars. A retry with the same key and body replays the stored response (`Idempotent-Replayed: true`); a different body gives `idempotency_key_reused` (422); a request still in flight gives `idempotency_key_in_use` (409). Kept 24h.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpRequest"}}}},"responses":{"201":{"description":"Verification created.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Otp"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_balance` or `spend_cap_reached`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`idempotency_key_in_use`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`operator_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/otp/check":{"post":{"operationId":"checkOtp","summary":"Check a verification code","description":"By `id`, or the latest pending verification for `to`. Single use; 5 attempts.","tags":["OTP"],"x-scope":"otp","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpCheckRequest"}}}},"responses":{"200":{"description":"The result.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpCheck"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`otp_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/otp/{id}":{"get":{"operationId":"getOtp","summary":"Get a verification","tags":["OTP"],"x-scope":"otp","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`ver_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"The verification (never the code).","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Otp"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`otp_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/lookup/{phone}":{"get":{"operationId":"lookupPhone","summary":"Look up a number","description":"Free. Validity, operator and whether it can be sent to.","tags":["Numbers"],"x-scope":"lookup","security":[{"bearerAuth":[]}],"parameters":[{"name":"phone","in":"path","required":true,"description":"Any accepted phone format (URL-encode `+`).","schema":{"type":"string"}}],"responses":{"200":{"description":"The lookup.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/balance":{"get":{"operationId":"getBalance","summary":"Get the balance","tags":["Account"],"x-scope":"balance:read","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Balance and spend.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates":{"get":{"operationId":"listTemplates","summary":"List templates","tags":["Templates"],"x-scope":"templates","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: `next_cursor` of the previous page."}],"responses":{"200":{"description":"A page of templates.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTemplate","summary":"Create a template","tags":["Templates"],"x-scope":"templates","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCreateRequest"}}}},"responses":{"201":{"description":"Created.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}":{"get":{"operationId":"getTemplate","summary":"Get a template","tags":["Templates"],"x-scope":"templates","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`tpl_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"The template.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateTemplate","summary":"Update a template","tags":["Templates"],"x-scope":"templates","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`tpl_…`","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdateRequest"}}}},"responses":{"200":{"description":"Updated.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteTemplate","summary":"Delete a template","tags":["Templates"],"x-scope":"templates","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`tpl_…`","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`template_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppressions":{"get":{"operationId":"listSuppressions","summary":"List suppressions","description":"Numbers that will not receive `sms` messages from this project (OTP is never blocked).","tags":["Suppressions"],"x-scope":"suppressions","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: `next_cursor` of the previous page."}],"responses":{"200":{"description":"A page of suppressions.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionList"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addSuppression","summary":"Suppress a number","description":"Reason `manual`; idempotent per number.","tags":["Suppressions"],"x-scope":"suppressions","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionCreateRequest"}}}},"responses":{"201":{"description":"The suppression.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppressions/{phone}":{"delete":{"operationId":"removeSuppression","summary":"Remove a suppression","tags":["Suppressions"],"x-scope":"suppressions","security":[{"bearerAuth":[]}],"parameters":[{"name":"phone","in":"path","required":true,"description":"The suppressed number.","schema":{"type":"string"}}],"responses":{"204":{"description":"Removed.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"List webhook endpoints","description":"Endpoints in the key's mode. Never includes secrets.","tags":["Webhooks"],"x-scope":"webhooks","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"All endpoints (at most 10).","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhook","summary":"Create a webhook endpoint","description":"The endpoint's mode is the key's mode. The response carries `secret`, shown only once.","tags":["Webhooks"],"x-scope":"webhooks","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}}},"responses":{"201":{"description":"Created (includes `secret`).","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"get":{"operationId":"getWebhook","summary":"Get a webhook endpoint","tags":["Webhooks"],"x-scope":"webhooks","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`whe_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"The endpoint (no secret).","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook endpoint","tags":["Webhooks"],"x-scope":"webhooks","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`whe_…`","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"operationId":"testWebhook","summary":"Send a test event","description":"Emits `webhook.test`, delivered to this endpoint only.","tags":["Webhooks"],"x-scope":"webhooks","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"`whe_…`","schema":{"type":"string"}}],"responses":{"200":{"description":"The emitted event.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"operationId":"listEvents","summary":"List events","description":"Newest first, in the key's mode. The polling fallback when webhooks are down.","tags":["Events"],"x-scope":"events:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/EventType"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: `next_cursor` of the previous page."}],"responses":{"200":{"description":"A page of events.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events/stream":{"get":{"operationId":"streamEvents","summary":"Stream events (SSE)","description":"Server-Sent Events. Each event is `id: evt_…`, `event: <type>`, `data: <the event JSON on one line, identical to the webhook body>`. A `: ping` comment is sent every 15s. Resume with the `Last-Event-ID` header or `?after=evt_…`; without a cursor the stream starts now. Used by `smsmulti listen`.","tags":["Events"],"x-scope":"events:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"Last-Event-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Resume after this event id."},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"description":"Resume after this event id (when the header cannot be set)."}],"responses":{"200":{"description":"An endless `text/event-stream`.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"text/event-stream":{"schema":{"type":"string","description":"Event stream; `data:` lines carry `Event` JSON."},"x-itemSchema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inbound":{"get":{"operationId":"listInbound","summary":"List inbound messages","description":"Replies routed to this project (live mode; test keys get an empty list).","tags":["Messages"],"x-scope":"messages:read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: `next_cursor` of the previous page."}],"responses":{"200":{"description":"A page of inbound messages.","headers":{"X-Request-Id":{"description":"`req_…`, also in error bodies.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per second for this key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundList"}}}},"400":{"description":"`invalid_request` (with `param`) or another validation error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`unauthorized`: missing or malformed key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`forbidden`: missing scope, revoked key or archived project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"`invalid_request`: method not allowed (see the `Allow` header).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: body over 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited` (20 req/s per key); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","tags":["Meta"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 JSON.","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"`internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"message.accepted":{"post":{"operationId":"webhook_message_accepted","summary":"message.accepted event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAcceptedEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"message.delivered":{"post":{"operationId":"webhook_message_delivered","summary":"message.delivered event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDeliveredEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"message.undelivered":{"post":{"operationId":"webhook_message_undelivered","summary":"message.undelivered event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageUndeliveredEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"message.failed":{"post":{"operationId":"webhook_message_failed","summary":"message.failed event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFailedEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"message.unknown":{"post":{"operationId":"webhook_message_unknown","summary":"message.unknown event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageUnknownEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"message.expired":{"post":{"operationId":"webhook_message_expired","summary":"message.expired event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageExpiredEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"message.canceled":{"post":{"operationId":"webhook_message_canceled","summary":"message.canceled event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCanceledEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"batch.completed":{"post":{"operationId":"webhook_batch_completed","summary":"batch.completed event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCompletedEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"otp.approved":{"post":{"operationId":"webhook_otp_approved","summary":"otp.approved event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpApprovedEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"inbound.received":{"post":{"operationId":"webhook_inbound_received","summary":"inbound.received event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundReceivedEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"balance.low":{"post":{"operationId":"webhook_balance_low","summary":"balance.low event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceLowEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}},"webhook.test":{"post":{"operationId":"webhook_webhook_test","summary":"webhook.test event","description":"POSTed to your endpoint (Standard Webhooks). Respond 2xx within 15s; failures are retried after 5s, 5m, 30m, 2h, 5h, 10h, 10h.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"The event id (stable across retries)."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"`v1,<base64(hmac_sha256(secret_bytes, id + \".\" + timestamp + \".\" + body))>`; several space-separated during secret rotation. The HMAC key is the base64-decoded part of `whsec_…`."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestEvent"}}}},"responses":{"2XX":{"description":"Delivered."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk_live_… / sk_test_…","description":"`Authorization: Bearer sk_…`. Keys carry scopes: `messages:write`, `messages:read`, `otp`, `lookup`, `webhooks`, `balance:read`, `templates`, `suppressions`, `events:read`."}},"schemas":{"ErrorCode":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","payload_too_large","batch_too_large","invalid_phone","unroutable_number","operator_not_supported","operator_unavailable","recipient_opted_out","empty_body","message_too_long","template_not_found","template_variable_missing","insufficient_balance","spend_cap_reached","rate_limited","otp_rate_limited","idempotency_key_in_use","idempotency_key_reused","message_not_cancelable","otp_not_found","internal_error","service_unavailable"]},"MessageErrorCode":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","payload_too_large","batch_too_large","invalid_phone","unroutable_number","operator_not_supported","operator_unavailable","recipient_opted_out","empty_body","message_too_long","template_not_found","template_variable_missing","insufficient_balance","spend_cap_reached","rate_limited","otp_rate_limited","idempotency_key_in_use","idempotency_key_reused","message_not_cancelable","otp_not_found","internal_error","service_unavailable","operator_rejected","recipient_off_network","operator_unreachable","operator_not_configured","operator_response_unrecognized","operator_timeout","partial_send","worker_interrupted","expired","canceled"],"description":"`error.code` on a message object (API codes plus status-only codes)."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","description":"Human readable."},"param":{"anyOf":[{"type":"string","description":"The request field the error refers to (e.g. `to`, `messages.3.to`), or null."},{"type":"null"}]},"details":{"type":"object","additionalProperties":true,"description":"Extra context; `{}` when unused."},"doc_url":{"type":"string","format":"uri"},"request_id":{"type":"string","description":"Same as the `X-Request-Id` header."}},"required":["code","message","param","details","doc_url","request_id"]}},"required":["error"]},"ErrorRef":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"description":"Why a message failed, or null."},{"type":"null"}]},"MessageStatus":{"type":"string","enum":["scheduled","queued","sending","accepted","delivered","undelivered","failed","unknown","expired","canceled"]},"OperatorName":{"type":"string","enum":["unitel","mobicom","skytel","gmobile","ondo","test"],"description":"`test` for magic numbers."},"Message":{"type":"object","properties":{"id":{"type":"string","examples":["msg_01J0000000000000000000000"]},"object":{"const":"message"},"mode":{"type":"string","enum":["test","live"]},"kind":{"type":"string","enum":["sms","otp"]},"to":{"type":"string","description":"National number, 8 digits."},"to_e164":{"type":"string"},"operator":{"$ref":"#/components/schemas/OperatorName"},"body":{"anyOf":[{"type":"string","description":"null when not stored (store_body=false, OTP, or past retention)."},{"type":"null"}]},"status":{"$ref":"#/components/schemas/MessageStatus"},"error":{"anyOf":[{"type":"object","properties":{"code":{"$ref":"#/components/schemas/MessageErrorCode"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"encoding":{"type":"string","enum":["gsm7","ucs2"]},"units":{"type":"integer"},"segments":{"type":"integer"},"price_mnt":{"type":"number"},"attempts":{"type":"integer"},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":true},"send_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","object","mode","kind","to","to_e164","operator","body","status","error","encoding","units","segments","price_mnt","attempts","batch_id","metadata","send_at","expires_at","created_at","accepted_at","delivered_at","failed_at"]},"MessageEvent":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/MessageStatus"},"detail":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["status","detail","created_at"]},"MessageWithEvents":{"allOf":[{"$ref":"#/components/schemas/Message"},{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/MessageEvent"}}},"required":["events"]}]},"MessageList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string","description":"Pass as `starting_after` to fetch the next page."},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"]},"SendMessageRequest":{"type":"object","properties":{"to":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Mongolian mobile number: `99112233`, `+97699112233`, `976 9911 2233`, … Test keys also accept magic numbers `0000000x`.","examples":["99112233"]},"body":{"type":"string","description":"The text. Required unless `template_id` is given."},"template_id":{"type":"string","description":"Use a stored template instead of `body`."},"variables":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":"Values for `{{name}}` placeholders."},"send_at":{"type":"string","description":"Schedule for later (ISO 8601 with offset).","format":"date-time"},"ttl_seconds":{"type":"integer","description":"Give up if not sent within this many seconds (default 86400).","minimum":60,"maximum":259200},"transliterate":{"type":"boolean","description":"Convert Mongolian Cyrillic to Latin so the message fits GSM-7."},"max_parts":{"type":"integer","description":"Reject when the message needs more parts (default 5).","minimum":1,"maximum":10},"store_body":{"type":"boolean","description":"Store the body (default true). When false, `body` is null on reads."},"metadata":{"type":"object","additionalProperties":true,"maxProperties":20,"description":"Free-form JSON (≤ 20 keys, ≤ 2048 bytes), echoed on the message and its events."}},"required":["to"]},"BatchRequest":{"type":"object","properties":{"messages":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","properties":{"to":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Mongolian mobile number: `99112233`, `+97699112233`, `976 9911 2233`, … Test keys also accept magic numbers `0000000x`.","examples":["99112233"]},"body":{"type":"string"},"variables":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":"Values for `{{name}}` placeholders."},"metadata":{"type":"object","additionalProperties":true,"maxProperties":20,"description":"Free-form JSON (≤ 20 keys, ≤ 2048 bytes), echoed on the message and its events."}},"required":["to"]}},"body":{"type":"string","description":"Shared body for items without their own; may contain `{{vars}}`."},"template_id":{"type":"string"},"send_at":{"type":"string","description":"Schedule for later (ISO 8601 with offset).","format":"date-time"},"ttl_seconds":{"type":"integer","description":"Give up if not sent within this many seconds (default 86400).","minimum":60,"maximum":259200},"transliterate":{"type":"boolean","description":"Convert Mongolian Cyrillic to Latin so the message fits GSM-7."},"max_parts":{"type":"integer","description":"Reject when the message needs more parts (default 5).","minimum":1,"maximum":10},"store_body":{"type":"boolean","description":"Store the body (default true). When false, `body` is null on reads."}},"required":["messages"]},"BatchItemResult":{"type":"object","properties":{"index":{"type":"integer"},"to":{"type":"string"},"message_id":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["code","message"]}},"required":["index","to"]},"BatchCreateResult":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"batch"},"total":{"type":"integer"},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"price_mnt":{"type":"number"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchItemResult"}}},"required":["id","object","total","accepted","rejected","price_mnt","results"]},"Batch":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"batch"},"total":{"type":"integer"},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Messages per status."},"created_at":{"type":"string","format":"date-time"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","object","total","accepted","rejected","counts","created_at","completed_at"]},"DryRunRequest":{"type":"object","properties":{"to":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Mongolian mobile number: `99112233`, `+97699112233`, `976 9911 2233`, … Test keys also accept magic numbers `0000000x`.","examples":["99112233"]},"body":{"type":"string"},"template_id":{"type":"string"},"variables":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":"Values for `{{name}}` placeholders."},"send_at":{"type":"string","description":"Schedule for later (ISO 8601 with offset).","format":"date-time"},"ttl_seconds":{"type":"integer","description":"Give up if not sent within this many seconds (default 86400).","minimum":60,"maximum":259200},"transliterate":{"type":"boolean","description":"Convert Mongolian Cyrillic to Latin so the message fits GSM-7."},"max_parts":{"type":"integer","description":"Reject when the message needs more parts (default 5).","minimum":1,"maximum":10},"store_body":{"type":"boolean","description":"Store the body (default true). When false, `body` is null on reads."},"metadata":{"type":"object","additionalProperties":true,"maxProperties":20,"description":"Free-form JSON (≤ 20 keys, ≤ 2048 bytes), echoed on the message and its events."}},"required":[]},"DryRun":{"type":"object","properties":{"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"operator":{"anyOf":[{"$ref":"#/components/schemas/OperatorName"},{"type":"null"}]},"valid":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"}},"required":["code","message"]},"body":{"type":"string","description":"The final text (rendered and transliterated)."},"encoding":{"type":"string","enum":["gsm7","ucs2"]},"units":{"type":"integer"},"segments":{"type":"integer"},"price_mnt":{"type":"number"},"ucs2_trigger":{"anyOf":[{"type":"object","properties":{"char":{"type":"string"},"index":{"type":"integer"}},"required":["char","index"]},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["to","operator","valid","body","encoding","units","segments","price_mnt","ucs2_trigger","warnings"]},"OtpStatus":{"type":"string","enum":["pending","approved","expired","canceled","failed"]},"OtpRequest":{"type":"object","properties":{"to":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Mongolian mobile number: `99112233`, `+97699112233`, `976 9911 2233`, … Test keys also accept magic numbers `0000000x`.","examples":["99112233"]},"length":{"type":"integer","description":"Code length (default 6).","minimum":4,"maximum":10},"ttl_seconds":{"type":"integer","description":"Default 300.","minimum":60,"maximum":900},"template":{"type":"string","description":"Custom SMS text; must contain `{{code}}`."},"app_name":{"type":"string","description":"Shown as `{{app}}: таны баталгаажуулах код {{code}}`.","maxLength":50}},"required":["to"]},"Otp":{"type":"object","properties":{"id":{"type":"string","examples":["ver_01J0000000000000000000000"]},"object":{"const":"otp"},"to":{"type":"string"},"status":{"$ref":"#/components/schemas/OtpStatus"},"expires_at":{"type":"string","format":"date-time"},"attempts":{"type":"integer"},"max_attempts":{"type":"integer"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"test_code":{"type":"string","description":"Test mode only, on create."}},"required":["id","object","to","status","expires_at","attempts","max_attempts","message_id"]},"OtpCheckRequest":{"type":"object","properties":{"id":{"type":"string","description":"The verification id."},"to":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Or: the latest pending verification for this number.","examples":["99112233"]},"code":{"type":"string"}},"required":["code"]},"OtpCheck":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"otp"},"status":{"$ref":"#/components/schemas/OtpStatus"},"valid":{"type":"boolean"}},"required":["id","object","status","valid"]},"Lookup":{"type":"object","properties":{"input":{"type":"string"},"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_e164":{"anyOf":[{"type":"string"},{"type":"null"}]},"valid":{"type":"boolean"},"operator":{"anyOf":[{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OperatorName"},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}]},"supported":{"type":"boolean"},"reason":{"anyOf":[{"type":"string","description":"Error code explaining why the number cannot be sent to."},{"type":"null"}]}},"required":["input","to","to_e164","valid","operator","supported","reason"]},"Balance":{"type":"object","properties":{"balance_mnt":{"type":"number"},"currency":{"const":"MNT"},"low_balance_threshold_mnt":{"type":"number"},"project":{"type":"object","properties":{"spent_today_mnt":{"type":"number"},"spent_month_mnt":{"type":"number"},"daily_cap_mnt":{"anyOf":[{"type":"number"},{"type":"null"}]},"monthly_cap_mnt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["spent_today_mnt","spent_month_mnt","daily_cap_mnt","monthly_cap_mnt"]},"key":{"anyOf":[{"type":"object","properties":{"spent_today_mnt":{"type":"number"},"daily_cap_mnt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["spent_today_mnt","daily_cap_mnt"]},{"type":"null"}]}},"required":["balance_mnt","currency","low_balance_threshold_mnt","project","key"]},"Template":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"template"},"name":{"type":"string"},"body":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","object","name","body","variables","created_at","updated_at"]},"TemplateList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string","description":"Pass as `starting_after` to fetch the next page."},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"]},"TemplateCreateRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"body":{"type":"string","maxLength":5000}},"required":["name","body"]},"TemplateUpdateRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"body":{"type":"string","maxLength":5000}},"required":[]},"Suppression":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"suppression"},"phone":{"type":"string"},"reason":{"type":"string","enum":["stop","manual","admin"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","object","phone","reason","created_at"]},"SuppressionList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Suppression"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string","description":"Pass as `starting_after` to fetch the next page."},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"]},"SuppressionCreateRequest":{"type":"object","properties":{"phone":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Mongolian mobile number: `99112233`, `+97699112233`, `976 9911 2233`, … Test keys also accept magic numbers `0000000x`.","examples":["99112233"]}},"required":["phone"]},"EventType":{"type":"string","enum":["message.accepted","message.delivered","message.undelivered","message.failed","message.unknown","message.expired","message.canceled","batch.completed","otp.approved","inbound.received","balance.low","webhook.test"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook_endpoint"},"url":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"type":"string","enum":["test","live"]},"event_types":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/EventType"},{"const":"*"}]}},"enabled":{"type":"boolean"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"`whsec_…` signing secret. Returned only by `POST /webhooks`."}},"required":["id","object","url","description","mode","event_types","enabled","disabled_reason","created_at"]},"WebhookEndpointList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string","description":"Pass as `starting_after` to fetch the next page."},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"]},"WebhookCreateRequest":{"type":"object","properties":{"url":{"type":"string","description":"https:// (or http://localhost* / http://127.0.0.1* with a test key).","maxLength":2048},"event_types":{"type":"array","minItems":1,"items":{"anyOf":[{"$ref":"#/components/schemas/EventType"},{"const":"*"}]},"description":"Default `[\"*\"]`."},"description":{"type":"string","maxLength":500}},"required":["url"]},"Event":{"type":"object","properties":{"id":{"type":"string","examples":["evt_01J0000000000000000000000"]},"object":{"const":"event"},"type":{"$ref":"#/components/schemas/EventType"},"mode":{"type":"string","enum":["test","live"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true,"description":"Depends on `type`; see the `webhooks` section."}},"required":["id","object","type","mode","created_at","data"]},"EventList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string","description":"Pass as `starting_after` to fetch the next page."},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"]},"Inbound":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"inbound_message"},"from":{"type":"string"},"to_number":{"type":"string"},"body":{"type":"string"},"operator":{"type":"string","enum":["unitel","mobicom","skytel","gmobile","ondo"]},"is_stop":{"type":"boolean","description":"True when the body was a STOP keyword (the sender is now suppressed)."},"received_at":{"type":"string","format":"date-time"}},"required":["id","object","from","to_number","body","operator","is_stop","received_at"]},"InboundList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Inbound"}},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"type":"string","description":"Pass as `starting_after` to fetch the next page."},{"type":"null"}]}},"required":["object","data","has_more","next_cursor"]},"MessageAcceptedEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.accepted"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"MessageDeliveredEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.delivered"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"MessageUndeliveredEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.undelivered"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"MessageFailedEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.failed"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"MessageUnknownEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.unknown"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"MessageExpiredEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.expired"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"MessageCanceledEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"message.canceled"},"data":{"$ref":"#/components/schemas/Message"}},"required":["type","data"]}]},"BatchCompletedEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"batch.completed"},"data":{"$ref":"#/components/schemas/Batch"}},"required":["type","data"]}]},"OtpApprovedEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"otp.approved"},"data":{"$ref":"#/components/schemas/Otp"}},"required":["type","data"]}]},"InboundReceivedEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"inbound.received"},"data":{"$ref":"#/components/schemas/Inbound"}},"required":["type","data"]}]},"BalanceLowEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"balance.low"},"data":{"type":"object","additionalProperties":true,"properties":{"workspace_id":{"type":"string"},"balance_mnt":{"type":"number"},"low_balance_threshold_mnt":{"type":"number"}}}},"required":["type","data"]}]},"WebhookTestEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"webhook.test"},"data":{"type":"object","properties":{"endpoint_id":{"type":"string"},"message":{"type":"string"}},"required":["endpoint_id","message"]}},"required":["type","data"]}]}},"x-error-codes":{"unauthorized":{"status":401,"group":"auth","message":"Missing or invalid API key."},"forbidden":{"status":403,"group":"auth","message":"This key is not allowed to perform this request (missing scope or revoked key)."},"not_found":{"status":404,"group":"auth","message":"The requested resource does not exist."},"invalid_request":{"status":400,"group":"validation","message":"The request is invalid."},"payload_too_large":{"status":413,"group":"validation","message":"The request body exceeds 1 MB."},"batch_too_large":{"status":400,"group":"validation","message":"A batch may contain at most 1000 messages."},"invalid_phone":{"status":400,"group":"recipient","message":"The phone number is not a valid Mongolian mobile number."},"unroutable_number":{"status":400,"group":"recipient","message":"No operator serves this number range."},"operator_not_supported":{"status":400,"group":"recipient","message":"The recipient's operator is not supported."},"operator_unavailable":{"status":503,"group":"recipient","message":"The recipient's operator is temporarily disabled."},"recipient_opted_out":{"status":400,"group":"recipient","message":"The recipient has opted out of messages from this project."},"empty_body":{"status":400,"group":"content","message":"The message body is empty."},"message_too_long":{"status":400,"group":"content","message":"The message needs more parts than max_parts allows."},"template_not_found":{"status":404,"group":"content","message":"The template does not exist."},"template_variable_missing":{"status":400,"group":"content","message":"The template references variables that were not provided."},"insufficient_balance":{"status":402,"group":"billing","message":"The workspace balance is too low for this request."},"spend_cap_reached":{"status":402,"group":"billing","message":"This request would exceed a spend cap."},"rate_limited":{"status":429,"group":"rate_limit","message":"Too many requests. Slow down."},"otp_rate_limited":{"status":429,"group":"rate_limit","message":"Too many verification codes were sent to this number. Try again later."},"idempotency_key_in_use":{"status":409,"group":"idempotency","message":"A request with this Idempotency-Key is still being processed."},"idempotency_key_reused":{"status":422,"group":"idempotency","message":"This Idempotency-Key was already used with a different request."},"message_not_cancelable":{"status":409,"group":"messages","message":"Only scheduled or queued messages can be canceled."},"otp_not_found":{"status":404,"group":"messages","message":"No matching verification was found."},"internal_error":{"status":500,"group":"server","message":"Something went wrong on our side."},"service_unavailable":{"status":503,"group":"server","message":"The service is temporarily unavailable."}}}}