{"openapi":"3.1.0","info":{"title":"RelayPoint API","version":"1.0.0","summary":"One API for AI products and connected accounts, billed in USD AI Credits.","description":"Authenticate with `Authorization: Bearer rp_live_…` (real usage, charged) or `rp_test_…` (sample outputs, never charged). Every error has the shape `{ \"error\": { \"code\", \"message\", \"request_id\" } }`. Send an `Idempotency-Key` on POST requests to retry safely. Resellers act for one of their customers with `RelayPoint-Account: <sub-account id>`. Rate-limited responses carry `Retry-After`; every response carries `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and `X-Request-Id`.","contact":{"name":"RelayPoint support","url":"https://relaypoints.online/contact"}},"servers":[{"url":"https://api.relaypoints.online","description":"RelayPoint API"}],"tags":[{"name":"AI","description":"Chat, embeddings, images and audio, billed per unit from the AI Credits wallet."},{"name":"Jobs","description":"Asynchronous GPU and document work (video, avatars, long text to speech, OCR). Poll or receive job.completed / job.failed webhooks."},{"name":"Video avatar","description":"Talking-presenter videos: characters (generated, trained with consent, or stock), voices, scripts, plan, estimate and render. Every video is labelled AI-generated."},{"name":"Account","description":"Products and prices, the wallet balance and usage records."},{"name":"Catalog","description":"Products, prices, packs, plans, voices and limits with a version; changes pushed as signed webhooks and on an SSE stream."},{"name":"Connections","description":"Connected accounts (Google, Microsoft, Meta, LinkedIn, …): connect links, the request proxy and credentials."},{"name":"Sub-accounts","description":"Resellers: customer accounts with their own wallet, monthly cap and mark-up."},{"name":"Webhooks","description":"Signed event deliveries to your HTTPS endpoints."},{"name":"Connect","description":"RelayPoint Connect: your own users (end users) connect their social, Google Drive and WhatsApp accounts in a hosted popup or the Social hub. Connect sessions, hub links, setup status, end users and workspace settings. Live use needs the RelayPoint Connections package; test mode is free."},{"name":"Social","description":"Post to the end user's Facebook Pages, Instagram, LinkedIn, TikTok, YouTube, Google Business Profile and X from one request, with per-network adaptation, validation, scheduling, approvals, AI assist, best times, analytics and a media library."},{"name":"Drive","description":"The end user's Google Drive (drive.file scope): list, upload, download and import files into the media library."},{"name":"WhatsApp","description":"The end user's own WhatsApp Business number (Cloud API): approved templates, opted-in contacts, messages within the 24-hour window, broadcasts and inbound webhooks. Messaging only: there is no posting on WhatsApp."}],"security":[{"apiKey":[]}],"paths":{"/v1/chat/completions":{"post":{"operationId":"createChatCompletion","tags":["AI"],"summary":"Create a chat completion","description":"OpenAI-compatible chat. `model` is a RelayPoint product id (GET /v1/models). Without `max_tokens` the product's `default_max_tokens` applies, and the hold placed while the call runs covers the prompt plus that many output tokens; the call is then charged at its real token count. Set `stream: true` for server-sent events (`data: {chunk}` lines, the last chunk carries `usage`, then `data: [DONE]`).\n\nScope `chat`.","security":[{"apiKey":["chat"]}],"x-scope":"chat","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"},"example":{"model":"rp/text-pro","messages":[{"role":"user","content":"Write a two-line welcome message for a property listing site."}],"max_tokens":200}}}},"responses":{"200":{"description":"The completion","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatCompletionChunk"},"x-stream":"server-sent events when stream=true"}}},"400":{"description":"`invalid_request`, `unknown_product`, `upstream_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","upstream_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/chat/completions \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"rp/text-pro\",\"messages\":[{\"role\":\"user\",\"content\":\"Write a two-line welcome message for a property listing site.\"}],\"max_tokens\":200}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst completion = await rp.chat.completions.create({\n  \"model\": \"rp/text-pro\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a two-line welcome message for a property listing site.\"\n    }\n  ],\n  \"max_tokens\": 200\n});\nconsole.log(completion.choices[0].message.content);\n\n// Streaming\nfor await (const chunk of rp.chat.completions.stream({ model: \"rp/text-pro\", messages: [{ role: \"user\", content: \"Hello\" }] })) {\n  process.stdout.write(chunk.choices[0]?.delta.content ?? \"\");\n}"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/chat/completions\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"model\": \"rp/text-pro\",\n        \"messages\": [\n            {\n                \"role\": \"user\",\n                \"content\": \"Write a two-line welcome message for a property listing site.\"\n            }\n        ],\n        \"max_tokens\": 200\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/chat/completions\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"model\" => \"rp/text-pro\",\n    \"messages\" => [\n        [\n            \"role\" => \"user\",\n            \"content\" => \"Write a two-line welcome message for a property listing site.\",\n        ],\n    ],\n    \"max_tokens\" => 200,\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/embeddings":{"post":{"operationId":"createEmbeddings","tags":["AI"],"summary":"Create embeddings","description":"Vectors for one text or up to 2,048 texts. Identical inputs are served from cache when the product allows it (charged, marked `cached` in usage).\n\nScope `embeddings`.","security":[{"apiKey":["embeddings"]}],"x-scope":"embeddings","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"},"example":{"model":"rp/embed","input":["3-bedroom house with a garden","Studio flat near the station"]}}}},"responses":{"200":{"description":"The vectors, in input order","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingList"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/embeddings \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"rp/embed\",\"input\":[\"3-bedroom house with a garden\",\"Studio flat near the station\"]}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.embeddings.create({\n  \"model\": \"rp/embed\",\n  \"input\": [\n    \"3-bedroom house with a garden\",\n    \"Studio flat near the station\"\n  ]\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/embeddings\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"model\": \"rp/embed\",\n        \"input\": [\n            \"3-bedroom house with a garden\",\n            \"Studio flat near the station\"\n        ]\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/embeddings\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"model\" => \"rp/embed\",\n    \"input\" => [\n        \"3-bedroom house with a garden\",\n        \"Studio flat near the station\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/images":{"post":{"operationId":"createImage","tags":["AI"],"summary":"Generate images","description":"Generates 1–4 images. With `response_format: url` (default) each image is stored for you and returned as a signed URL with its expiry.\n\nScope `images`.","security":[{"apiKey":["images"]}],"x-scope":"images","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"},"example":{"model":"rp/image","prompt":"Bright modern kitchen, morning light, real-estate photo","size":"1024x1024"}}}},"responses":{"200":{"description":"The images","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `upstream_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","upstream_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/images \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"rp/image\",\"prompt\":\"Bright modern kitchen, morning light, real-estate photo\",\"size\":\"1024x1024\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst image = await rp.images.generate({\n  \"model\": \"rp/image\",\n  \"prompt\": \"Bright modern kitchen, morning light, real-estate photo\",\n  \"size\": \"1024x1024\"\n});\nconsole.log(image.data[0].url);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/images\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"model\": \"rp/image\",\n        \"prompt\": \"Bright modern kitchen, morning light, real-estate photo\",\n        \"size\": \"1024x1024\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/images\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"model\" => \"rp/image\",\n    \"prompt\" => \"Bright modern kitchen, morning light, real-estate photo\",\n    \"size\" => \"1024x1024\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/images/generations":{"post":{"operationId":"createImageGeneration","tags":["AI"],"summary":"Generate images (OpenAI path)","description":"Same as POST /v1/images, at the path OpenAI clients use.\n\nScope `images`.","security":[{"apiKey":["images"]}],"x-scope":"images","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"},"example":{"model":"rp/image","prompt":"Logo for a coffee shop, flat style"}}}},"responses":{"200":{"description":"The images","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `upstream_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","upstream_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/images/generations \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"rp/image\",\"prompt\":\"Logo for a coffee shop, flat style\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst image = await rp.images.generate({\n  \"model\": \"rp/image\",\n  \"prompt\": \"Logo for a coffee shop, flat style\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/images/generations\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"model\": \"rp/image\",\n        \"prompt\": \"Logo for a coffee shop, flat style\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/images/generations\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"model\" => \"rp/image\",\n    \"prompt\" => \"Logo for a coffee shop, flat style\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/audio/speech":{"post":{"operationId":"createSpeech","tags":["AI"],"summary":"Text to speech","description":"Returns the audio file itself (MP3 or WAV), charged per character. For calls, send `stream: true`: the audio arrives as it is voiced (first sentence first) as `pcm` (16-bit LE, 24 kHz mono, the default for streams), `wav` (streaming header) or `mulaw` (8 kHz G.711, for telephony), charged on the characters voiced (fewer if you stop reading early). `voice` is one of the product's voices (`voices` in GET /v1/models; `default` or an OpenAI voice name also work); the voice used is in the `X-RelayPoint-Voice` header. `input` is up to 20,000 characters, voiced sentence by sentence into one file (billed once on the characters); `RelayPoint-Audio-Seconds` gives the WAV length and `timings: true` returns JSON with `audio_base64` and sentence `timings`. For longer texts use a job with `rp/tts` (up to 100,000 characters). Premium voices on your own ElevenLabs key: `model: \"rp/tts-pro\"` (or `provider: \"elevenlabs\"`) with the SpeechProRequest fields (`voice` is an ElevenLabs voice id, up to 10,000 characters); only the platform fee is charged and the response carries `RelayPoint-Billing-Mode: byok`, `RelayPoint-Platform-Fee-Usd` and `RelayPoint-Ai-Generated: true`. Without a key: `byok_required`. When ElevenLabs is down and fallback is on, `rp/tts` answers with `RelayPoint-Fallback-From: rp/tts-pro`.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"},"example":{"model":"rp/tts","input":"Your viewing is confirmed for Saturday at ten.","voice":"camille","response_format":"mp3"}}}},"responses":{"200":{"description":"The audio","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"audio/mpeg":{"schema":{"type":"string","contentMediaType":"audio/mpeg"}},"audio/wav":{"schema":{"type":"string","contentMediaType":"audio/wav"}},"audio/L16":{"schema":{"type":"string","contentMediaType":"audio/L16"}},"audio/basic":{"schema":{"type":"string","contentMediaType":"audio/basic"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `upstream_rejected`, `content_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","upstream_rejected","content_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`, `insufficient_provider_credit`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached","insufficient_provider_credit"]},"403":{"description":"`byok_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"424":{"description":"`byok_key_invalid`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_key_invalid"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/audio/speech \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"rp/tts\",\"input\":\"Your viewing is confirmed for Saturday at ten.\",\"voice\":\"camille\",\"response_format\":\"mp3\"}' \\\n  --output speech.mp3"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst audio = await rp.audio.speech.create({\n  \"model\": \"rp/tts\",\n  \"input\": \"Your viewing is confirmed for Saturday at ten.\",\n  \"voice\": \"camille\",\n  \"response_format\": \"mp3\"\n}); // ArrayBuffer"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/audio/speech\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"model\": \"rp/tts\",\n        \"input\": \"Your viewing is confirmed for Saturday at ten.\",\n        \"voice\": \"camille\",\n        \"response_format\": \"mp3\"\n    },\n    timeout=60,\n)\nopen(\"speech.mp3\", \"wb\").write(r.content)"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/audio/speech\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"model\" => \"rp/tts\",\n    \"input\" => \"Your viewing is confirmed for Saturday at ten.\",\n    \"voice\" => \"camille\",\n    \"response_format\" => \"mp3\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\nfile_put_contents(\"speech.mp3\", $response);"}]}},"/v1/audio/transcriptions":{"post":{"operationId":"createTranscription","tags":["AI"],"summary":"Speech to text","description":"Multipart upload (field `file`, up to 25 MB), charged per second of audio. `response_format=text` returns plain text. `rp/stt-pro` runs on your own ElevenLabs key (Scribe): `diarize=true` (and optionally `num_speakers`) labels who speaks in `words[].speaker`; only the platform fee is charged.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TranscriptionUpload"},"example":{"model":"rp/stt","language":"en"}}}},"responses":{"200":{"description":"The transcript","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcription"}},"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`, `insufficient_provider_credit`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached","insufficient_provider_credit"]},"403":{"description":"`byok_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"`unsupported_media_type`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"424":{"description":"`byok_key_invalid`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_key_invalid"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/audio/transcriptions \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -F file=@call.mp3 \\\n  -F model=rp/stt \\\n  -F language=en"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { text } = await rp.audio.transcriptions.create({ file: audioBlob, model: \"rp/stt\", language: \"en\" });"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nwith open(\"call.mp3\", \"rb\") as f:\n    r = requests.post(\n        \"https://api.relaypoints.online/v1/audio/transcriptions\",\n        headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n        files={\"file\": f},\n        data={\n  \"model\": \"rp/stt\",\n  \"language\": \"en\"\n},\n    )\nprint(r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/audio/transcriptions\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POSTFIELDS, array_merge([\n    \"model\" => \"rp/stt\",\n    \"language\" => \"en\",\n], [\"file\" => new CURLFile(\"call.mp3\")]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/jobs":{"post":{"operationId":"createJob","tags":["Jobs"],"summary":"Start a job","description":"Queues asynchronous work. `input` depends on the product (see the JobInput schemas): every input has an upper bound (`resolution`, `max_duration_seconds`, `duration_seconds`, `max_pages`) so the hold placed now covers the worst case; the job is charged at its real units when it finishes and the rest of the hold is released. Video is charged per second of output video (unit `video_second`). OCR takes `output_format` (`text`, `markdown_tables`, `json_tables`). `progress` (0–100) moves while the job runs. Outputs are kept for 30 days. Premium media on your own key — `rp/video-avatar-pro` and `rp/video-translate` (HeyGen), `rp/tts-pro` and `rp/voice-clone-pro` (ElevenLabs) — charge only the platform fee. `rp/voice-clone` clones a voice on RelayPoint itself: `name`, `sample_url` (10 s – 3 min of the owner speaking), `consent_audio_url` (the owner reading GET /v1/voice_clones/consent_statement), `consent`; the result's `voice_id` (vc_…) is a voice for rp/tts on your account only; public figures are refused (`content_rejected`), a consent recording that doesn't match is `consent_required` (`usage.billing_mode: byok`, `platform_fee_usd`, `list_equivalent_cost_usd`); voice clones and your own avatars need `consent` (`subject_name`, `attested_by`, `method`), else `consent_required`. Generated media has `ai_generated: true`.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRequest"},"example":{"model":"rp/video-avatar","input":{"image_url":"https://example.com/agent.jpg","text":"Welcome to 12 Oak Street.","resolution":"720p","max_duration_seconds":30},"metadata":{"listing":"L-2041"}}}}},"responses":{"202":{"description":"The queued job","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `consent_required`, `content_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","consent_required","content_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`byok_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/jobs \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"rp/video-avatar\",\"input\":{\"image_url\":\"https://example.com/agent.jpg\",\"text\":\"Welcome to 12 Oak Street.\",\"resolution\":\"720p\",\"max_duration_seconds\":30},\"metadata\":{\"listing\":\"L-2041\"}}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst job = await rp.jobs.create({\n  \"model\": \"rp/video-avatar\",\n  \"input\": {\n    \"image_url\": \"https://example.com/agent.jpg\",\n    \"text\": \"Welcome to 12 Oak Street.\",\n    \"resolution\": \"720p\",\n    \"max_duration_seconds\": 30\n  },\n  \"metadata\": {\n    \"listing\": \"L-2041\"\n  }\n});\nconst done = await rp.jobs.wait(job.id, { intervalMs: 5000, timeoutMs: 600000 });"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/jobs\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"model\": \"rp/video-avatar\",\n        \"input\": {\n            \"image_url\": \"https://example.com/agent.jpg\",\n            \"text\": \"Welcome to 12 Oak Street.\",\n            \"resolution\": \"720p\",\n            \"max_duration_seconds\": 30\n        },\n        \"metadata\": {\n            \"listing\": \"L-2041\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/jobs\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"model\" => \"rp/video-avatar\",\n    \"input\" => [\n        \"image_url\" => \"https://example.com/agent.jpg\",\n        \"text\" => \"Welcome to 12 Oak Street.\",\n        \"resolution\" => \"720p\",\n        \"max_duration_seconds\" => 30,\n    ],\n    \"metadata\" => [\n        \"listing\" => \"L-2041\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listJobs","tags":["Jobs"],"summary":"List jobs","description":"Newest first, for the key's mode (live or test).\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"A page of jobs","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/jobs?limit=20 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst jobs = await rp.jobs.list({\n  \"limit\": \"20\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/jobs?limit=20\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/jobs?limit=20\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/jobs/{id}":{"get":{"operationId":"getJob","tags":["Jobs"],"summary":"Get a job","description":"Status, outputs (signed URLs while kept), result and the final cost.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The job","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/jobs/job_5Tq9mW2rXa7 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst job = await rp.jobs.retrieve(\"job_5Tq9mW2rXa7\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/jobs/job_5Tq9mW2rXa7\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/jobs/job_5Tq9mW2rXa7\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/characters":{"post":{"operationId":"createCharacter","tags":["Video avatar"],"summary":"Create a character","description":"Generates an original AI presenter from a text description: a portrait and a presenter reference image with a fixed seed, reused by every video of the character so the identity stays the same. Asynchronous: the character is `pending` until `ready` (poll GET /v1/characters/{id}). Billed per character (`rp/character`); nothing is charged if it fails. Descriptions of real or famous people are refused.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterCreate"},"example":{"name":"Amara","description":"Friendly woman in her thirties with short natural hair, warm smile","clothing":"navy blazer over a white shirt","style":"studio","background":"bright modern office","gender":"female","voice_id":"aria"}}}},"responses":{"202":{"description":"The pending character","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Character"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `content_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","content_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/characters \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Amara\",\"description\":\"Friendly woman in her thirties with short natural hair, warm smile\",\"clothing\":\"navy blazer over a white shirt\",\"style\":\"studio\",\"background\":\"bright modern office\",\"gender\":\"female\",\"voice_id\":\"aria\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst character = await rp.characters.create({\n  \"name\": \"Amara\",\n  \"description\": \"Friendly woman in her thirties with short natural hair, warm smile\",\n  \"clothing\": \"navy blazer over a white shirt\",\n  \"style\": \"studio\",\n  \"background\": \"bright modern office\",\n  \"gender\": \"female\",\n  \"voice_id\": \"aria\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/characters\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"name\": \"Amara\",\n        \"description\": \"Friendly woman in her thirties with short natural hair, warm smile\",\n        \"clothing\": \"navy blazer over a white shirt\",\n        \"style\": \"studio\",\n        \"background\": \"bright modern office\",\n        \"gender\": \"female\",\n        \"voice_id\": \"aria\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/characters\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"name\" => \"Amara\",\n    \"description\" => \"Friendly woman in her thirties with short natural hair, warm smile\",\n    \"clothing\" => \"navy blazer over a white shirt\",\n    \"style\" => \"studio\",\n    \"background\" => \"bright modern office\",\n    \"gender\" => \"female\",\n    \"voice_id\" => \"aria\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listCharacters","tags":["Video avatar"],"summary":"List characters","description":"Your own characters plus the ready stock presenters, newest first. Filter by `age`, `gender`, `ethnicity`, `style`, `q` (name or tags) and `stock`. A sub-account sees its own characters and the stock library, never another account's.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"age","in":"query","required":false,"schema":{"type":"string","enum":["18-29","30-44","45-59","60+"]}},{"name":"gender","in":"query","required":false,"schema":{"type":"string","enum":["female","male"]}},{"name":"ethnicity","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"style","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"stock","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Characters","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/characters?gender=female&stock=true \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.characters.list({\n  \"gender\": \"female\",\n  \"stock\": \"true\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/characters?gender=female&stock=true\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/characters?gender=female&stock=true\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/characters/{id}":{"get":{"operationId":"getCharacter","tags":["Video avatar"],"summary":"Get a character","description":"Status and, once ready, signed URLs of the reference images (valid 1 hour).\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The character","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Character"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst character = await rp.characters.retrieve(\"chr_4Lp8sV2nQe1\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"deleteCharacter","tags":["Video avatar"],"summary":"Delete a character","description":"Deletes one of your characters and its stored images (and the photos and consent record of a trained character); a character still being made is stopped. Stock presenters can't be deleted.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Deleted","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.characters.delete(\"chr_4Lp8sV2nQe1\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/characters/{id}/variants":{"post":{"operationId":"createCharacterVariant","tags":["Video avatar"],"summary":"New outfit or background","description":"A new character with the same identity and seed as `{id}`, edited from its reference images to a new `clothing` and/or `background`. Billed like a character.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterVariant"},"example":{"clothing":"green kitenge dress","background":"outdoor market at golden hour"}}}},"responses":{"202":{"description":"The pending variant","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Character"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1/variants \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"clothing\":\"green kitenge dress\",\"background\":\"outdoor market at golden hour\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst variant = await rp.characters.variants.create(\"chr_4Lp8sV2nQe1\", {\n  \"clothing\": \"green kitenge dress\",\n  \"background\": \"outdoor market at golden hour\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1/variants\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"clothing\": \"green kitenge dress\",\n        \"background\": \"outdoor market at golden hour\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/characters/chr_4Lp8sV2nQe1/variants\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"clothing\" => \"green kitenge dress\",\n    \"background\" => \"outdoor market at golden hour\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/characters/train":{"post":{"operationId":"trainCharacter","tags":["Video avatar"],"summary":"Train a character from photos","description":"A character from 3–10 photos of a real adult who has consented. Multipart: `photos[]` (JPEG/PNG/WebP, each under 15 MB), `name`, `gender`, optional `age`, `role`, `voice_id`, and `consent`: a JSON string `{ \"attestation\": true, \"subject_name\", \"user_id\"?, \"text\"? }` confirming the person agreed (stored with the time, IP and key). Every photo is checked; minors (or anyone who may look under 21), public figures and unclear photos are refused before anything is charged. Billed per training (`rp/character-train`).\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CharacterTrainUpload"},"example":{"name":"Joseph","gender":"male","role":"Sales manager","consent":"{\"attestation\":true,\"subject_name\":\"Joseph K.\"}"}}}},"responses":{"202":{"description":"The pending character","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Character"}}}},"400":{"description":"`invalid_request`, `consent_required`, `content_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","consent_required","content_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/characters/train \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -F photos[]=@photo1.jpg \\\n  -F photos[]=@photo2.jpg \\\n  -F photos[]=@photo3.jpg \\\n  -F name=Joseph \\\n  -F gender=male \\\n  -F role=Sales manager \\\n  -F consent={\"attestation\":true,\"subject_name\":\"Joseph K.\"}"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst character = await rp.characters.train({ photos: [photo1, photo2, photo3], name: \"Joseph\", gender: \"male\", consent: { attestation: true, subject_name: \"Joseph K.\" } });"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nwith open(\"photo1.jpg\", \"rb\") as f:\n    r = requests.post(\n        \"https://api.relaypoints.online/v1/characters/train\",\n        headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n        files={\"photos[]\": f},\n        data={\n  \"name\": \"Joseph\",\n  \"gender\": \"male\",\n  \"role\": \"Sales manager\",\n  \"consent\": \"{\\\"attestation\\\":true,\\\"subject_name\\\":\\\"Joseph K.\\\"}\"\n},\n    )\nprint(r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/characters/train\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POSTFIELDS, array_merge([\n    \"name\" => \"Joseph\",\n    \"gender\" => \"male\",\n    \"role\" => \"Sales manager\",\n    \"consent\" => \"{\\\"attestation\\\":true,\\\"subject_name\\\":\\\"Joseph K.\\\"}\",\n], [\"photos[]\" => new CURLFile(\"photo1.jpg\")]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/voice_clones/consent_statement":{"get":{"operationId":"getConsentStatement","tags":["AI"],"summary":"Get the consent statement for a voice clone","description":"The sentence the voice owner reads aloud (word for word, 2–30 s) before their voice can be cloned with rp/voice-clone. `?language=` en-US (default), en-GB, en-AU, en-IN or en-ZA.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The statement","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentStatement"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/voice_clones/consent_statement \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { text } = await rp.voiceClones.consentStatement();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/voice_clones/consent_statement\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_clones/consent_statement\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/voice_clones":{"get":{"operationId":"listVoiceClones","tags":["AI"],"summary":"List your cloned voices","description":"Voices cloned on this account with `POST /v1/jobs` (model `rp/voice-clone`). Use `id` (vc_…) as `voice` on rp/tts. Clones are never shared with sub-accounts or a reseller.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Your clones","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCloneList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/voice_clones \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.voiceClones.list();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/voice_clones\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_clones\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/voice_clones/{id}":{"get":{"operationId":"getVoiceClone","tags":["AI"],"summary":"Retrieve a cloned voice","description":"One of your cloned voices.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The clone","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceClone"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/voice_clones/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst clone = await rp.voiceClones.retrieve(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/voice_clones/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_clones/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"deleteVoiceClone","tags":["AI"],"summary":"Delete a cloned voice","description":"Deletes the voice at the supplier and here; it can no longer be used. The consent record and recording are kept as evidence.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The deleted clone","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceClone"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/voice_clones/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.voiceClones.delete(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/voice_clones/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_clones/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/voice_live/sessions":{"post":{"operationId":"createVoiceLiveSession","tags":["AI"],"summary":"Start a real-time voice call","description":"Configures a two-way voice call with `rp/voice-live` and returns a one-time `client_secret` and the WebSocket to join it within 60 s: `url` (browsers and apps) or `stream_url` (Twilio-style media streams, which drop query strings). Caller audio goes in as binary frames (`pcm16`: 16-bit 16 kHz mono; `mulaw`: 8 kHz G.711, the default for `transport: \"twilio\"`); the assistant's voice comes back in the same format while it is still answering. JSON events: `session.started`, `input.speech_started` / `input.speech_stopped`, `response.started` (with `latency_ms`), `output_audio.clear` (barge-in: drop buffered audio), `transcript`, `tool.call` (answer with `{\"type\":\"tool.result\",\"call_id\",\"output\"}` or let `tool_webhook_url` answer), `handover`, `session.warning`, `session.ending`, `session.ended`. Built-in tools: `save_lead`, `book_meeting`, `hand_over`. `voice` may be one of your cloned voices (vc_…). Limits: `max_duration_seconds` (10–7200, a hard limit: the assistant says goodbye, then `time_limit`; the lower of it and `max_minutes` applies) and `silence_timeout_seconds` (default 30, 0 = never: no caller speech for that long, counted after the assistant stops talking → goodbye, then `silence_timeout`). Hang up with `{\"type\":\"session.end\"}` (Twilio streams: `stop`): the call ends at once with `client_ended` and billing stops at that second; work still in flight is not charged. The options with their limits and defaults are also in `GET /v1/catalog` → the rp/voice-live product's `session_options`. Billed per second of call ($0.05 per minute at list price) plus the speech-to-text, model and speech it uses; when credit runs out the assistant says goodbye and the call ends (`credit_exhausted`).\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLiveSessionCreate"},"example":{"instructions":"You answer calls for Sea Point Realty. Find out what the caller wants and book viewings.","voice":"zanele","language":"en-ZA","tools":["save_lead","book_meeting","hand_over"],"max_minutes":15,"max_duration_seconds":600,"silence_timeout_seconds":20,"greeting":"Good morning, Sea Point Realty, how can I help?"}}}},"responses":{"201":{"description":"The session and how to join it","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLiveSessionCreated"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/voice_live/sessions \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"instructions\":\"You answer calls for Sea Point Realty. Find out what the caller wants and book viewings.\",\"voice\":\"zanele\",\"language\":\"en-ZA\",\"tools\":[\"save_lead\",\"book_meeting\",\"hand_over\"],\"max_minutes\":15,\"max_duration_seconds\":600,\"silence_timeout_seconds\":20,\"greeting\":\"Good morning, Sea Point Realty, how can I help?\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst call = await rp.voiceLive.createSession({ instructions, voice: \"zanele\", tools: [\"book_meeting\"] });\nconst ws = new WebSocket(call.url);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/voice_live/sessions\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"instructions\": \"You answer calls for Sea Point Realty. Find out what the caller wants and book viewings.\",\n        \"voice\": \"zanele\",\n        \"language\": \"en-ZA\",\n        \"tools\": [\n            \"save_lead\",\n            \"book_meeting\",\n            \"hand_over\"\n        ],\n        \"max_minutes\": 15,\n        \"max_duration_seconds\": 600,\n        \"silence_timeout_seconds\": 20,\n        \"greeting\": \"Good morning, Sea Point Realty, how can I help?\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_live/sessions\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"instructions\" => \"You answer calls for Sea Point Realty. Find out what the caller wants and book viewings.\",\n    \"voice\" => \"zanele\",\n    \"language\" => \"en-ZA\",\n    \"tools\" => [\n        \"save_lead\",\n        \"book_meeting\",\n        \"hand_over\",\n    ],\n    \"max_minutes\" => 15,\n    \"max_duration_seconds\" => 600,\n    \"silence_timeout_seconds\" => 20,\n    \"greeting\" => \"Good morning, Sea Point Realty, how can I help?\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listVoiceLiveSessions","tags":["AI"],"summary":"List voice calls","description":"This account's calls, newest first: duration, turns, average answer latency, cost and usage per product, and why each ended.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Calls","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLiveSessionList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/voice_live/sessions \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.voiceLive.listSessions();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/voice_live/sessions\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_live/sessions\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/voice_live/sessions/{id}":{"get":{"operationId":"getVoiceLiveSession","tags":["AI"],"summary":"Retrieve a voice call","description":"One call of this account.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The call","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceLiveSession"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/voice_live/sessions/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst call = await rp.voiceLive.retrieveSession(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/voice_live/sessions/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voice_live/sessions/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/voices":{"get":{"operationId":"listVoices","tags":["Video avatar"],"summary":"List voices","description":"Every voice for avatar videos and `rp/tts`, with language, gender, accent and a short preview, plus the languages that have no licensed voice yet (upload your own `audio_url` for those).\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Voices","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/voices \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.voices.list();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/voices\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/voices\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/scripts/generate":{"post":{"operationId":"generateScript","tags":["Video avatar"],"summary":"Write a script","description":"A spoken script for a presenter from a short brief, sized to `length_seconds` in `language`, with its speaking time. Billed as `rp/text-pro` tokens.\n\nScope `chat`.","security":[{"apiKey":["chat"]}],"x-scope":"chat","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptRequest"},"example":{"prompt":"30-second advert for a savings account with no fees","style":"advertisement","length_seconds":30,"language":"fr"}}}},"responses":{"200":{"description":"The script","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/scripts/generate \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"30-second advert for a savings account with no fees\",\"style\":\"advertisement\",\"length_seconds\":30,\"language\":\"fr\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { script, estimated_seconds } = await rp.scripts.generate({\n  \"prompt\": \"30-second advert for a savings account with no fees\",\n  \"style\": \"advertisement\",\n  \"length_seconds\": 30,\n  \"language\": \"fr\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/scripts/generate\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"prompt\": \"30-second advert for a savings account with no fees\",\n        \"style\": \"advertisement\",\n        \"length_seconds\": 30,\n        \"language\": \"fr\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/scripts/generate\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"prompt\" => \"30-second advert for a savings account with no fees\",\n    \"style\" => \"advertisement\",\n    \"length_seconds\" => 30,\n    \"language\" => \"fr\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/video/avatar/plan":{"post":{"operationId":"planAvatarVideo","tags":["Video avatar"],"summary":"Plan scenes","description":"Splits a script into timed scenes with layouts; in `character_visuals` mode each scene also gets a visual prompt (billed as `rp/text-fast` tokens). Edit the scenes and send them back as `scenes` when rendering.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarPlanRequest"},"example":{"script":"Welcome to Relay Bank. Saving a little every month adds up quickly.","language":"en","mode":"character_visuals"}}}},"responses":{"200":{"description":"The plan","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarPlan"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/video/avatar/plan \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"script\":\"Welcome to Relay Bank. Saving a little every month adds up quickly.\",\"language\":\"en\",\"mode\":\"character_visuals\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst plan = await rp.video.avatar.plan({\n  \"script\": \"Welcome to Relay Bank. Saving a little every month adds up quickly.\",\n  \"language\": \"en\",\n  \"mode\": \"character_visuals\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/video/avatar/plan\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"script\": \"Welcome to Relay Bank. Saving a little every month adds up quickly.\",\n        \"language\": \"en\",\n        \"mode\": \"character_visuals\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/video/avatar/plan\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"script\" => \"Welcome to Relay Bank. Saving a little every month adds up quickly.\",\n    \"language\" => \"en\",\n    \"mode\" => \"character_visuals\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/video/avatar/estimate":{"post":{"operationId":"estimateAvatarVideo","tags":["Video avatar"],"summary":"Estimate a video","description":"The same body as a render; returns the expected length and priced lines for both modes, the maximum allowed and whether it fits. Free. Uploaded audio (`audio_url`) is downloaded and measured.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarRequest"},"example":{"mode":"character_visuals","character_id":"chr_4Lp8sV2nQe1","script":"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.","voice_id":"aria","language":"en","aspect_ratio":"9:16","resolution":"720p","captions":{"on":true,"style":"bold"},"music":{"track_id":"calm","volume":0.15},"media":[{"type":"logo","url":"https://example.com/logo.png","start_s":0,"end_s":4,"layout":"pip"}],"max_seconds":60,"metadata":{"campaign":"savings-q4"}}}}},"responses":{"200":{"description":"The estimate","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarEstimate"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"415":{"description":"`unsupported_media_type`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/video/avatar/estimate \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"mode\":\"character_visuals\",\"character_id\":\"chr_4Lp8sV2nQe1\",\"script\":\"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\"voice_id\":\"aria\",\"language\":\"en\",\"aspect_ratio\":\"9:16\",\"resolution\":\"720p\",\"captions\":{\"on\":true,\"style\":\"bold\"},\"music\":{\"track_id\":\"calm\",\"volume\":0.15},\"media\":[{\"type\":\"logo\",\"url\":\"https://example.com/logo.png\",\"start_s\":0,\"end_s\":4,\"layout\":\"pip\"}],\"max_seconds\":60,\"metadata\":{\"campaign\":\"savings-q4\"}}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst estimate = await rp.video.avatar.estimate({\n  \"mode\": \"character_visuals\",\n  \"character_id\": \"chr_4Lp8sV2nQe1\",\n  \"script\": \"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\n  \"voice_id\": \"aria\",\n  \"language\": \"en\",\n  \"aspect_ratio\": \"9:16\",\n  \"resolution\": \"720p\",\n  \"captions\": {\n    \"on\": true,\n    \"style\": \"bold\"\n  },\n  \"music\": {\n    \"track_id\": \"calm\",\n    \"volume\": 0.15\n  },\n  \"media\": [\n    {\n      \"type\": \"logo\",\n      \"url\": \"https://example.com/logo.png\",\n      \"start_s\": 0,\n      \"end_s\": 4,\n      \"layout\": \"pip\"\n    }\n  ],\n  \"max_seconds\": 60,\n  \"metadata\": {\n    \"campaign\": \"savings-q4\"\n  }\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/video/avatar/estimate\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"mode\": \"character_visuals\",\n        \"character_id\": \"chr_4Lp8sV2nQe1\",\n        \"script\": \"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\n        \"voice_id\": \"aria\",\n        \"language\": \"en\",\n        \"aspect_ratio\": \"9:16\",\n        \"resolution\": \"720p\",\n        \"captions\": {\n            \"on\": True,\n            \"style\": \"bold\"\n        },\n        \"music\": {\n            \"track_id\": \"calm\",\n            \"volume\": 0.15\n        },\n        \"media\": [\n            {\n                \"type\": \"logo\",\n                \"url\": \"https://example.com/logo.png\",\n                \"start_s\": 0,\n                \"end_s\": 4,\n                \"layout\": \"pip\"\n            }\n        ],\n        \"max_seconds\": 60,\n        \"metadata\": {\n            \"campaign\": \"savings-q4\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/video/avatar/estimate\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"mode\" => \"character_visuals\",\n    \"character_id\" => \"chr_4Lp8sV2nQe1\",\n    \"script\" => \"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\n    \"voice_id\" => \"aria\",\n    \"language\" => \"en\",\n    \"aspect_ratio\" => \"9:16\",\n    \"resolution\" => \"720p\",\n    \"captions\" => [\n        \"on\" => true,\n        \"style\" => \"bold\",\n    ],\n    \"music\" => [\n        \"track_id\" => \"calm\",\n        \"volume\" => 0.15,\n    ],\n    \"media\" => [\n        [\n            \"type\" => \"logo\",\n            \"url\" => \"https://example.com/logo.png\",\n            \"start_s\" => 0,\n            \"end_s\" => 4,\n            \"layout\" => \"pip\",\n        ],\n    ],\n    \"max_seconds\" => 60,\n    \"metadata\" => [\n        \"campaign\" => \"savings-q4\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/video/avatar":{"post":{"operationId":"createAvatarVideo","tags":["Video avatar"],"summary":"Render a video","description":"A talking-presenter video from a character (or `image_url`) and a `script`, edited `scenes` or your own `audio_url`. `character_only`: the presenter speaks the whole video. `character_visuals`: generated or your own visuals (`media`: images, videos, slides, logos) share the frame. The voice-over is read sentence by sentence and the captions (burned in and .srt) follow its sentence timings; music is ducked under the voice, and an \"AI-generated\" label is written into the file. One hold is placed per billed line before work starts; each line is charged on its real usage when the video is done, and every hold is released if it fails. Longer than `max_seconds` (or the platform maximum) is refused with `video_too_long`. Poll GET /v1/video/avatar/{id} or receive `video_avatar.completed` / `video_avatar.failed` webhooks.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarRequest"},"example":{"mode":"character_visuals","character_id":"chr_4Lp8sV2nQe1","script":"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.","voice_id":"aria","language":"en","aspect_ratio":"9:16","resolution":"720p","captions":{"on":true,"style":"bold"},"music":{"track_id":"calm","volume":0.15},"media":[{"type":"logo","url":"https://example.com/logo.png","start_s":0,"end_s":4,"layout":"pip"}],"max_seconds":60,"metadata":{"campaign":"savings-q4"}}}}},"responses":{"202":{"description":"The queued video","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatar"}}}},"400":{"description":"`invalid_request`, `unknown_product`, `video_too_long`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","unknown_product","video_too_long","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`, `spend_cap_reached`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance","spend_cap_reached"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"415":{"description":"`unsupported_media_type`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/video/avatar \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"mode\":\"character_visuals\",\"character_id\":\"chr_4Lp8sV2nQe1\",\"script\":\"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\"voice_id\":\"aria\",\"language\":\"en\",\"aspect_ratio\":\"9:16\",\"resolution\":\"720p\",\"captions\":{\"on\":true,\"style\":\"bold\"},\"music\":{\"track_id\":\"calm\",\"volume\":0.15},\"media\":[{\"type\":\"logo\",\"url\":\"https://example.com/logo.png\",\"start_s\":0,\"end_s\":4,\"layout\":\"pip\"}],\"max_seconds\":60,\"metadata\":{\"campaign\":\"savings-q4\"}}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst video = await rp.video.avatar.create({\n  \"mode\": \"character_visuals\",\n  \"character_id\": \"chr_4Lp8sV2nQe1\",\n  \"script\": \"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\n  \"voice_id\": \"aria\",\n  \"language\": \"en\",\n  \"aspect_ratio\": \"9:16\",\n  \"resolution\": \"720p\",\n  \"captions\": {\n    \"on\": true,\n    \"style\": \"bold\"\n  },\n  \"music\": {\n    \"track_id\": \"calm\",\n    \"volume\": 0.15\n  },\n  \"media\": [\n    {\n      \"type\": \"logo\",\n      \"url\": \"https://example.com/logo.png\",\n      \"start_s\": 0,\n      \"end_s\": 4,\n      \"layout\": \"pip\"\n    }\n  ],\n  \"max_seconds\": 60,\n  \"metadata\": {\n    \"campaign\": \"savings-q4\"\n  }\n});\nconst done = await rp.video.avatar.wait(video.id, { intervalMs: 5000, timeoutMs: 1800000 });"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/video/avatar\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"mode\": \"character_visuals\",\n        \"character_id\": \"chr_4Lp8sV2nQe1\",\n        \"script\": \"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\n        \"voice_id\": \"aria\",\n        \"language\": \"en\",\n        \"aspect_ratio\": \"9:16\",\n        \"resolution\": \"720p\",\n        \"captions\": {\n            \"on\": True,\n            \"style\": \"bold\"\n        },\n        \"music\": {\n            \"track_id\": \"calm\",\n            \"volume\": 0.15\n        },\n        \"media\": [\n            {\n                \"type\": \"logo\",\n                \"url\": \"https://example.com/logo.png\",\n                \"start_s\": 0,\n                \"end_s\": 4,\n                \"layout\": \"pip\"\n            }\n        ],\n        \"max_seconds\": 60,\n        \"metadata\": {\n            \"campaign\": \"savings-q4\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/video/avatar\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"mode\" => \"character_visuals\",\n    \"character_id\" => \"chr_4Lp8sV2nQe1\",\n    \"script\" => \"Welcome to Relay Bank. Saving a little every month adds up quickly. Set a budget and automate your savings.\",\n    \"voice_id\" => \"aria\",\n    \"language\" => \"en\",\n    \"aspect_ratio\" => \"9:16\",\n    \"resolution\" => \"720p\",\n    \"captions\" => [\n        \"on\" => true,\n        \"style\" => \"bold\",\n    ],\n    \"music\" => [\n        \"track_id\" => \"calm\",\n        \"volume\" => 0.15,\n    ],\n    \"media\" => [\n        [\n            \"type\" => \"logo\",\n            \"url\" => \"https://example.com/logo.png\",\n            \"start_s\" => 0,\n            \"end_s\" => 4,\n            \"layout\" => \"pip\",\n        ],\n    ],\n    \"max_seconds\" => 60,\n    \"metadata\" => [\n        \"campaign\" => \"savings-q4\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/video/avatar/{id}":{"get":{"operationId":"getAvatarVideo","tags":["Video avatar"],"summary":"Get a video","description":"Stage (`scripting`, `planning`, `voicing`, `visuals`, `rendering`, `composing`, `done`, `failed`), progress, cost so far per line and, when done, signed URLs of the MP4, thumbnail and captions.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The video","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatar"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/video/avatar/job_5Tq9mW2rXa7 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst video = await rp.video.avatar.retrieve(\"job_5Tq9mW2rXa7\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/video/avatar/job_5Tq9mW2rXa7\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/video/avatar/job_5Tq9mW2rXa7\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/video/avatar/settings":{"get":{"operationId":"getAvatarSettings","tags":["Video avatar"],"summary":"Get avatar settings","description":"Whether a visible \"AI-generated\" watermark is drawn on this account's videos (a reseller's setting covers its sub-accounts).\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Settings","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarSettings"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/video/avatar/settings \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst settings = await rp.video.avatar.settings.retrieve();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/video/avatar/settings\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/video/avatar/settings\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"patch":{"operationId":"updateAvatarSettings","tags":["Video avatar"],"summary":"Update avatar settings","description":"Turns the visible watermark on or off for this account (and, for a reseller, all its sub-accounts). Recorded in the audit log.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarSettingsUpdate"},"example":{"watermark":true}}}},"responses":{"200":{"description":"Settings","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAvatarSettings"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X PATCH https://api.relaypoints.online/v1/video/avatar/settings \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"watermark\":true}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.video.avatar.settings.update({\n  \"watermark\": true\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.patch(\n    \"https://api.relaypoints.online/v1/video/avatar/settings\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"watermark\": True\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/video/avatar/settings\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"watermark\" => true,\n]));\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/byok/heygen/assets":{"get":{"operationId":"listHeyGenAssets","tags":["Jobs"],"summary":"List HeyGen avatars and voices","description":"The avatars and voices of your HeyGen account (your own avatars have `owned: true`), for `rp/video-avatar-pro`. Cached for 10 minutes. On a key shared by your reseller, only stock avatars and voices are listed.\n\nScope `jobs`.","security":[{"apiKey":["jobs"]}],"x-scope":"jobs","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Avatars and voices","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeyGenAssets"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`byok_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"424":{"description":"`byok_key_invalid`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_key_invalid"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/byok/heygen/assets \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst assets = await rp.byok.heygen.assets();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/byok/heygen/assets\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/byok/heygen/assets\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/byok/elevenlabs/voices":{"get":{"operationId":"listElevenLabsVoices","tags":["AI"],"summary":"List ElevenLabs voices","description":"The voices of your ElevenLabs account, for `rp/tts-pro`. Cached for 10 minutes. On a key shared by your reseller, only premade voices are listed.\n\nScope `audio`.","security":[{"apiKey":["audio"]}],"x-scope":"audio","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Voices","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElevenLabsVoices"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`byok_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"424":{"description":"`byok_key_invalid`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["byok_key_invalid"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/byok/elevenlabs/voices \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.byok.elevenlabs.voices();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/byok/elevenlabs/voices\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/byok/elevenlabs/voices\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/models":{"get":{"operationId":"listModels","tags":["Account"],"summary":"List products","description":"The products this account can use, with its prices (custom prices and reseller mark-ups included) and, for chat, the token limits.\n\nAny API key.","security":[{"apiKey":[]}],"x-scope":null,"x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The products","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/models \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.models.list();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/models\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/models\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/balance":{"get":{"operationId":"getBalance","tags":["Account"],"summary":"Get the wallet balance","description":"Available credits, credits on hold, the amount owed when the wallet is below $0 (spending is then paused), month-to-date spend and the monthly cap.\n\nAny API key.","security":[{"apiKey":[]}],"x-scope":null,"x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The balance","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/balance \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst balance = await rp.balance.retrieve();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/balance\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/balance\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/usage":{"get":{"operationId":"listUsage","tags":["Account"],"summary":"List usage records","description":"One record per billed call or job, newest first, for the key's mode, with totals for the filter.\n\nScope `usage`.","security":[{"apiKey":["usage"]}],"x-scope":"usage","x-live-only":false,"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Start (inclusive), ISO 8601"},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"End (exclusive), ISO 8601"},{"name":"model","in":"query","required":false,"schema":{"type":"string","maxLength":100},"description":"Only this product id"},{"name":"include_sub_accounts","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]},"description":"Resellers: include usage of sub-accounts"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string","maxLength":100},"description":"Cursor: the last id of the previous page"},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"A page of usage","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/usage?from=2026-10-01T00%3A00%3A00Z&limit=50 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst usage = await rp.usage.list({\n  \"from\": \"2026-10-01T00:00:00Z\",\n  \"limit\": \"50\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/usage?from=2026-10-01T00%3A00%3A00Z&limit=50\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/usage?from=2026-10-01T00%3A00%3A00Z&limit=50\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/orders":{"get":{"operationId":"listOrders","tags":["Account"],"summary":"List orders","description":"Your purchases (reseller packages, credit top-ups, connection bundles), newest first, with status, amount, credits and invoice links.\n\nScope `billing`.","security":[{"apiKey":["billing"]}],"x-scope":"billing","x-live-only":false,"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["awaiting_payment","paid","failed","void","refunded","partially_refunded"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["credits","bundle","single_connection","addon"]},"description":"credits = credit top-ups and reseller packages; bundle, single_connection, addon = connections"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string","maxLength":100},"description":"Cursor: the last id of the previous page"},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"A page of orders","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/orders?limit=20&status=paid \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst orders = await rp.orders.list({\n  \"limit\": \"20\",\n  \"status\": \"paid\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/orders?limit=20&status=paid\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/orders?limit=20&status=paid\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/orders/{id}":{"get":{"operationId":"getOrder","tags":["Account"],"summary":"Get an order","description":"One of your orders.\n\nScope `billing`.","security":[{"apiKey":["billing"]}],"x-scope":"billing","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The order","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/orders/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst order = await rp.orders.retrieve(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/orders/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/orders/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/orders/{id}/invoice":{"get":{"operationId":"getOrderInvoice","tags":["Account"],"summary":"Download an invoice","description":"The invoice PDF of a paid (or refunded) order. Add `?lang=fr` or `?lang=pt` for French or Portuguese.\n\nScope `billing`.","security":[{"apiKey":["billing"]}],"x-scope":"billing","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The invoice PDF","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/orders/we_6Rm2tY8uHb4/invoice \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  --output download.bin"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst pdf = await rp.orders.invoice(\"we_6Rm2tY8uHb4\"); // ArrayBuffer"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/orders/we_6Rm2tY8uHb4/invoice\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nopen(\"download.bin\", \"wb\").write(r.content)"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/orders/we_6Rm2tY8uHb4/invoice\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\nfile_put_contents(\"download.bin\", $response);"}]}},"/v1/catalog":{"get":{"operationId":"listCatalog","tags":["Catalog"],"summary":"Get the catalog","description":"Everything a reseller or client needs to price and present RelayPoint in one response: products with this account's prices (custom prices and reseller mark-ups included), top-up packs and bonuses, plans, voices, limits, display FX rates, feature flags, service status, and `version` / `account_version`. Send the `ETag` back as `If-None-Match`: the answer is `304 Not Modified` until something changes. `data` is the connections catalogue (connections scope). Mark-up profiles and white-label names need the sub_accounts scope, the spend cap the billing scope. Changes are also pushed as webhooks (catalog.updated, pricing.updated, packs.updated, plans.updated, voices.updated, limits.updated, account.updated, service.status) and on GET /v1/events/stream.\n\nAny API key.","security":[{"apiKey":[]}],"x-scope":null,"x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The catalog (304 with If-None-Match while unchanged)","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/catalog \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst catalog = await rp.catalog.get();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/catalog\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/catalog\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/catalog/version":{"get":{"operationId":"getCatalogVersion","tags":["Catalog"],"summary":"Check the catalog version","description":"A cheap check: the catalog version, this account's version and the ETag. Supports If-None-Match (304).\n\nAny API key.","security":[{"apiKey":[]}],"x-scope":null,"x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The versions","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogVersion"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/catalog/version \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { version, account_version } = await rp.catalog.version();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/catalog/version\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/catalog/version\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/stock/media/{kind}/{file}":{"get":{"operationId":"getStockMedia","tags":["Catalog"],"summary":"Stock library preview","description":"Free previews of the stock library, linked from GET /v1/catalog: `voices/<id>.mp3` (a 6–8 s voice preview), `presenters/<id>.jpg` (the portrait) and `presenters/<id>.mp4` (the approved 5 s sample clip). Answers a 302 to a short-lived link; dropped voices, rejected presenters and media not generated yet are a 404. Stable URLs: store these, not the redirect target.\n\nAny API key, or none (public).","security":[],"x-scope":null,"x-live-only":false,"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The media (after a 302 redirect)","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"audio/mpeg":{"schema":{"type":"string","contentMediaType":"audio/mpeg"}},"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}},"video/mp4":{"schema":{"type":"string","contentMediaType":"video/mp4"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/stock/media/voices/zu_thandiwe.mp3 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  --output download.bin"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst res = await fetch(\"https://api.relaypoints.online/v1/stock/media/voices/zu_thandiwe.mp3\"); // free, no key"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/stock/media/voices/zu_thandiwe.mp3\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nopen(\"download.bin\", \"wb\").write(r.content)"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/stock/media/voices/zu_thandiwe.mp3\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\nfile_put_contents(\"download.bin\", $response);"}]}},"/v1/events/stream":{"get":{"operationId":"streamEvents","tags":["Catalog"],"summary":"Stream catalog events (SSE)","description":"Server-Sent Events with the same events as the webhooks: platform-wide ones and this account's own account.updated. Each event has `id:` (resume with the Last-Event-ID header or `?last_event_id=`), `event:` (its name) and `data:` (the event JSON). A comment heartbeat every 15 s; the stream closes after 5 minutes and EventSource reconnects by itself (`retry: 3000`).\n\nAny API key.","security":[{"apiKey":[]}],"x-scope":null,"x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"text/event-stream","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/CatalogEvent"},"x-stream":"server-sent events when stream=true"}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/events/stream \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nfor await (const e of rp.events.stream()) console.log(e.event, e.changed);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/events/stream\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/events/stream\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect_links":{"post":{"operationId":"createConnectLink","tags":["Connections"],"summary":"Create a connect link","description":"A single-use hosted page (branded with your name and logo) where the account owner signs in to the provider. Send `url` to them; you receive `connection.created` when they finish. With RelayPoint-Account the link is for one of your customers. Resellers need approved business verification (`kyc_required`).\n\nScope `connections`. Live keys only.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":true,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkCreate"},"example":{"catalog_slug":"gmail","label":"Agency inbox","redirect_url":"https://yourapp.example/connected","expires_in_hours":72}}}},"responses":{"201":{"description":"The link, with `url` (shown once)","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectLink"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`kyc_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["kyc_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/connect_links \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"catalog_slug\":\"gmail\",\"label\":\"Agency inbox\",\"redirect_url\":\"https://yourapp.example/connected\",\"expires_in_hours\":72}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nconst link = await rp.connectLinks.create({\n  \"catalog_slug\": \"gmail\",\n  \"label\": \"Agency inbox\",\n  \"redirect_url\": \"https://yourapp.example/connected\",\n  \"expires_in_hours\": 72\n});\nconsole.log(link.url);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/connect_links\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    json={\n        \"catalog_slug\": \"gmail\",\n        \"label\": \"Agency inbox\",\n        \"redirect_url\": \"https://yourapp.example/connected\",\n        \"expires_in_hours\": 72\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect_links\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"catalog_slug\" => \"gmail\",\n    \"label\" => \"Agency inbox\",\n    \"redirect_url\" => \"https://yourapp.example/connected\",\n    \"expires_in_hours\" => 72,\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listConnectLinks","tags":["Connections"],"summary":"List connect links","description":"Your latest 100 links (or a sub-account's with RelayPoint-Account). `url` is not returned again.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The links","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectLinkList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect_links \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst links = await rp.connectLinks.list();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect_links\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect_links\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect_links/{id}":{"get":{"operationId":"getConnectLink","tags":["Connections"],"summary":"Get a connect link","description":"Its status (open, used, expired, revoked) and the connection it created.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The link","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectLink"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect_links/cl_3Nv8pQ1sKd6 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst link = await rp.connectLinks.retrieve(\"cl_3Nv8pQ1sKd6\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect_links/cl_3Nv8pQ1sKd6\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect_links/cl_3Nv8pQ1sKd6\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"revokeConnectLink","tags":["Connections"],"summary":"Revoke a connect link","description":"An open link stops working at once.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The revoked link","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectLink"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/connect_links/cl_3Nv8pQ1sKd6 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.connectLinks.revoke(\"cl_3Nv8pQ1sKd6\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/connect_links/cl_3Nv8pQ1sKd6\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect_links/cl_3Nv8pQ1sKd6\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connections":{"get":{"operationId":"listConnections","tags":["Connections"],"summary":"List connections","description":"Connected accounts, without tokens or credentials. RelayPoint Connect: `end_user_id` lists one end user's connections in the key's mode (test keys see test connections).\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"include_sub_accounts","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]},"description":"Resellers: include connections of sub-accounts"},{"name":"include_disconnected","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"end_user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"RelayPoint Connect: only this end user's connections (in the key's mode: test keys see test connections)"},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The connections","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connections?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { data } = await rp.connections.list({\n  \"end_user_id\": \"agent_123\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connections?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"post":{"operationId":"createConnection","tags":["Connections"],"summary":"Connect with credentials","description":"For catalogue items that connect with API keys or passwords (`auth_type: manual`). The credentials are encrypted and never returned by this endpoint. OAuth items use connect links instead. Billed per connection per month (from your bundle, or the wallet).\n\nScope `connections`. Live keys only.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":true,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualCreate"},"example":{"catalog_slug":"slack","credentials":{"bot_token":"xoxb-…"}}}}},"responses":{"201":{"description":"The connection","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/connections \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"catalog_slug\":\"slack\",\"credentials\":{\"bot_token\":\"xoxb-…\"}}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nconst connection = await rp.connections.create({\n  \"catalog_slug\": \"slack\",\n  \"credentials\": {\n    \"bot_token\": \"xoxb-…\"\n  }\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/connections\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    json={\n        \"catalog_slug\": \"slack\",\n        \"credentials\": {\n            \"bot_token\": \"xoxb-…\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"catalog_slug\" => \"slack\",\n    \"credentials\" => [\n        \"bot_token\" => \"xoxb-…\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connections/{id}":{"get":{"operationId":"getConnection","tags":["Connections"],"summary":"Get a connection","description":"Status, account label and granted scopes.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The connection","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst connection = await rp.connections.retrieve(\"conn_8bQ2xV0yLmN4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"deleteConnection","tags":["Connections"],"summary":"Disconnect","description":"Revokes the tokens at the provider where possible and stops billing the connection.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The disconnected connection","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.connections.delete(\"conn_8bQ2xV0yLmN4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connections/{id}/request":{"post":{"operationId":"connectionRequest","tags":["Connections"],"summary":"Call the provider's API (recommended)","description":"RelayPoint calls the provider's API with the connection's access token, which never leaves RelayPoint (it is refreshed for you). `path` is a path on the provider's API host (e.g. `/gmail/v1/users/me/messages` or `/v1.0/me`) or a full https URL on an allowed host. Requests are limited to that provider's API hosts and, for Google, to the API paths the granted scopes cover; redirects are not followed; request bodies up to 1 MB, responses up to 5 MB, 30 s timeout. The provider's status, main headers and body are returned as data (a provider error is still HTTP 200 here). This is the recommended way to use a connection, especially for Meta and LinkedIn, whose tokens last about 60 days. Needs the `connections:request` scope (not included in `*`, live keys only), 30 calls per minute per key; every call (key, IP, method, host, path, status) is listed on the connection's page.\n\nScope `connections:request` (granted by name only: not included in `*`). Live keys only.","security":[{"apiKey":["connections:request"]}],"x-scope":"connections:request","x-live-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRequest"},"example":{"method":"GET","path":"/gmail/v1/users/me/messages","query":{"maxResults":"10","q":"is:unread"}}}}},"responses":{"200":{"description":"The provider's answer","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]},"504":{"description":"`upstream_timeout`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_timeout"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/request \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"method\":\"GET\",\"path\":\"/gmail/v1/users/me/messages\",\"query\":{\"maxResults\":\"10\",\"q\":\"is:unread\"}}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nconst res = await rp.connections.request(\"conn_8bQ2xV0yLmN4\", {\n  \"method\": \"GET\",\n  \"path\": \"/gmail/v1/users/me/messages\",\n  \"query\": {\n    \"maxResults\": \"10\",\n    \"q\": \"is:unread\"\n  }\n});\nconsole.log(res.status, res.body);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/request\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    json={\n        \"method\": \"GET\",\n        \"path\": \"/gmail/v1/users/me/messages\",\n        \"query\": {\n            \"maxResults\": \"10\",\n            \"q\": \"is:unread\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/request\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"method\" => \"GET\",\n    \"path\" => \"/gmail/v1/users/me/messages\",\n    \"query\" => [\n        \"maxResults\" => \"10\",\n        \"q\" => \"is:unread\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connections/{id}/credentials":{"get":{"operationId":"getConnectionCredentials","tags":["Connections"],"summary":"Get credentials","description":"OAuth connections: a short-lived access token and its expiry, refreshed first when less than 5 minutes remain; the refresh token and RelayPoint's OAuth client secrets are never returned. Manual connections: the stored credentials, only to the account that owns the connection or its reseller. Needs the `connections:credentials` scope (not included in `*`, live keys only), 30 per minute per key; every fetch is listed on the connection's page. Prefer POST /v1/connections/{id}/request. Cache the token until shortly before `expires_at`.\n\nScope `connections:credentials` (granted by name only: not included in `*`). Live keys only.","security":[{"apiKey":["connections:credentials"]}],"x-scope":"connections:credentials","x-live-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The credentials","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCredentials"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/credentials \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nconst creds = await rp.connections.credentials(\"conn_8bQ2xV0yLmN4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/credentials\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/credentials\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"post":{"operationId":"postConnectionCredentials","tags":["Connections"],"summary":"Get credentials (POST)","description":"Same as GET, for clients that avoid GET for secrets.\n\nScope `connections:credentials` (granted by name only: not included in `*`). Live keys only.","security":[{"apiKey":["connections:credentials"]}],"x-scope":"connections:credentials","x-live-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The credentials","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCredentials"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/credentials \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nconst creds = await rp.connections.credentials(\"conn_8bQ2xV0yLmN4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/credentials\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connections/conn_8bQ2xV0yLmN4/credentials\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\ncurl_setopt($ch, CURLOPT_POST, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/sessions":{"post":{"operationId":"createConnectSession","tags":["Connect"],"summary":"Create a connect session","description":"Server-side: lets one end user (your own id, e.g. `agent_123` or `company`) connect their accounts. Open the hosted popup in the browser with `RelayPointConnect.open({ publishableKey, sessionToken: token })`, or send the browser to `url` (full-page mode; with `redirect_url` it comes back with `?relaypoint_status=connected|error&connection=conn_…`). `providers` is `\"all\"` (the providers available to the account) or a list; an unavailable one is `provider_unavailable` with the reasons. The session can be used several times until it expires (5–1440 minutes, default 60). `token` and `url` are returned once. Live keys need an active RelayPoint Connections package (`package_required`); test sessions are free and offer \"Simulate connection\".\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSessionCreate"},"example":{"end_user_id":"agent_123","providers":["facebook","instagram"],"redirect_url":"https://portal.example.com/socials","expires_in_minutes":60}}}},"responses":{"201":{"description":"The session, with `token` and `url` (shown once)","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSession"}}}},"400":{"description":"`invalid_request`, `provider_unavailable`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","provider_unavailable","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`package_required`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["package_required"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/connect/sessions \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"providers\":[\"facebook\",\"instagram\"],\"redirect_url\":\"https://portal.example.com/socials\",\"expires_in_minutes\":60}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/sessions\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"providers\": [\n      \"facebook\",\n      \"instagram\"\n    ],\n    \"redirect_url\": \"https://portal.example.com/socials\",\n    \"expires_in_minutes\": 60\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/connect/sessions\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"providers\": [\n            \"facebook\",\n            \"instagram\"\n        ],\n        \"redirect_url\": \"https://portal.example.com/socials\",\n        \"expires_in_minutes\": 60\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/sessions\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"providers\" => [\n        \"facebook\",\n        \"instagram\",\n    ],\n    \"redirect_url\" => \"https://portal.example.com/socials\",\n    \"expires_in_minutes\" => 60,\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/sessions/{id}":{"get":{"operationId":"getConnectSession","tags":["Connect"],"summary":"Get a connect session","description":"Its status (`open` or `expired`) and `connections`: the ids of the connections made through it. The token is never returned again.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The session","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSession"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect/sessions/cs_9Xk2Lm4Qp7Rt \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/sessions/cs_9Xk2Lm4Qp7Rt\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect/sessions/cs_9Xk2Lm4Qp7Rt\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/sessions/cs_9Xk2Lm4Qp7Rt\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/hub-links":{"post":{"operationId":"createHubLink","tags":["Connect"],"summary":"Create a Social hub link","description":"A signed, single-use link (1–60 minutes, default 10) that opens the hosted Social hub for one end user, branded with your name, logo and colours, without a RelayPoint login. Opening it starts a 2-hour hub session. Create it when the person clicks \"Social hub\" in your portal and redirect them to `url`. Live keys need the RelayPoint Connections package (`package_required`).\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubLinkCreate"},"example":{"end_user_id":"agent_123","display_name":"Thandi M.","return_url":"https://portal.example.com","expires_in_minutes":10}}}},"responses":{"201":{"description":"The link (use it once)","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubLink"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`package_required`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["package_required"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/connect/hub-links \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"display_name\":\"Thandi M.\",\"return_url\":\"https://portal.example.com\",\"expires_in_minutes\":10}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/hub-links\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"display_name\": \"Thandi M.\",\n    \"return_url\": \"https://portal.example.com\",\n    \"expires_in_minutes\": 10\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/connect/hub-links\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"display_name\": \"Thandi M.\",\n        \"return_url\": \"https://portal.example.com\",\n        \"expires_in_minutes\": 10\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/hub-links\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"display_name\" => \"Thandi M.\",\n    \"return_url\" => \"https://portal.example.com\",\n    \"expires_in_minutes\" => 10,\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/status":{"get":{"operationId":"getConnectStatus","tags":["Connect"],"summary":"Check the Connect setup","description":"Whether the package is active, whether a publishable key is valid for this key's account and mode and allows an origin (`publishable_key`, `origin`), the browser script URL, and every provider with `available`, a `reason` when it isn't (`not_enabled`, `not_configured`, `awaiting_platform_approval`, `x_key_required`) and `notes` (`tiktok_private_only`, `youtube_quota`, `linkedin_member_only`, `x_own_app`, `x_relaypoint_app`).\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"publishable_key","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"origin","in":"query","required":false,"schema":{"type":"string","maxLength":300}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The setup status","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectStatus"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect/status?publishable_key=rp_pk_test_%E2%80%A6&origin=https%3A%2F%2Fwww.example.com \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/status?publishable_key=rp_pk_test_%E2%80%A6&origin=https%3A%2F%2Fwww.example.com\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect/status?publishable_key=rp_pk_test_%E2%80%A6&origin=https%3A%2F%2Fwww.example.com\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/status?publishable_key=rp_pk_test_%E2%80%A6&origin=https%3A%2F%2Fwww.example.com\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/settings":{"get":{"operationId":"getConnectSettings","tags":["Connect"],"summary":"Get the workspace's Connect settings","description":"`approval_required`, `ai_assist_enabled`, `timezone` (for best times), your own X app (`x_client_id`, and `x_client_secret_set` instead of the secret) and `x_use_relaypoint_app`.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The settings","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSettings"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect/settings \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/settings\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect/settings\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/settings\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"patch":{"operationId":"updateConnectSettings","tags":["Connect"],"summary":"Update the workspace's Connect settings","description":"Send only the fields to change. `x_client_id` and `x_client_secret` go together; the secret is stored encrypted and never returned.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSettingsUpdate"},"example":{"approval_required":true,"ai_assist_enabled":true,"timezone":"Africa/Johannesburg"}}}},"responses":{"200":{"description":"The settings","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSettings"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X PATCH https://api.relaypoints.online/v1/connect/settings \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"approval_required\":true,\"ai_assist_enabled\":true,\"timezone\":\"Africa/Johannesburg\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/settings\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"approval_required\": true,\n    \"ai_assist_enabled\": true,\n    \"timezone\": \"Africa/Johannesburg\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.patch(\n    \"https://api.relaypoints.online/v1/connect/settings\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"approval_required\": True,\n        \"ai_assist_enabled\": True,\n        \"timezone\": \"Africa/Johannesburg\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/settings\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"approval_required\" => true,\n    \"ai_assist_enabled\" => true,\n    \"timezone\" => \"Africa/Johannesburg\",\n]));\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/end_users":{"get":{"operationId":"listEndUsers","tags":["Connect"],"summary":"List end users","description":"The end users with a display name or a role in this mode.\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The end users","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect/end_users \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/end_users\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect/end_users\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/end_users\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/end_users/{id}":{"get":{"operationId":"getEndUser","tags":["Connect"],"summary":"Get an end user","description":"Its display name and role (`member` by default).\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The end user","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUser"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect/end_users/agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/end_users/agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect/end_users/agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/end_users/agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"patch":{"operationId":"updateEndUser","tags":["Connect"],"summary":"Set an end user's role or name","description":"Roles: `member` (default), `drafter` (with `approval_required` on, their posts wait in `pending_approval`) and `approver` (approves or rejects them).\n\nScope `connections`.","security":[{"apiKey":["connections"]}],"x-scope":"connections","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserUpdate"},"example":{"display_name":"Thandi M.","role":"approver"}}}},"responses":{"200":{"description":"The end user","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUser"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X PATCH https://api.relaypoints.online/v1/connect/end_users/agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"display_name\":\"Thandi M.\",\"role\":\"approver\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/connect/end_users/agent_123\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"display_name\": \"Thandi M.\",\n    \"role\": \"approver\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.patch(\n    \"https://api.relaypoints.online/v1/connect/end_users/agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"display_name\": \"Thandi M.\",\n        \"role\": \"approver\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/end_users/agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"display_name\" => \"Thandi M.\",\n    \"role\" => \"approver\",\n]));\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/connect/client/connections":{"get":{"operationId":"listClientConnections","tags":["Connect"],"summary":"List the session's connections (browser)","description":"Called from the browser by `RelayPointConnect.listConnections()`. Authenticate with the headers `RelayPoint-Publishable-Key` (rp_pk_live_… / rp_pk_test_…) and `RelayPoint-Session` (the connect session token), never with a secret key. CORS is allowed only for the publishable key's allowed origins; the session must be open and belong to the key's account and mode. Returns the connections of the session's end user.\n\nScope: none. Authenticated with a publishable key and a connect session token (headers), never a secret API key; CORS only for the key's allowed origins.","security":[{"publishableKey":[],"connectSession":[]}],"x-scope":null,"x-live-only":false,"parameters":[{"$ref":"#/components/parameters/PublishableKey"},{"$ref":"#/components/parameters/ConnectSession"}],"responses":{"200":{"description":"The end user's connections","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientConnectionList"}}}},"401":{"description":"`unauthorized`, `invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["unauthorized","invalid_api_key"]},"403":{"description":"`forbidden`, `domain_not_allowed`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","domain_not_allowed"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/connect/client/connections \\\n  -H \"RelayPoint-Publishable-Key: rp_pk_test_…\" \\\n  -H \"RelayPoint-Session: cst_…\" \\\n  -H \"Origin: https://www.example.com\""},{"lang":"javascript","label":"JavaScript","source":"<script src=\"https://app.relaypoints.online/js/relaypoint-connect.v1.js\" defer></script>\n<script type=\"module\">\n  // In the browser: the script calls /v1/connect/client/connections for you.\n  const { data } = await RelayPointConnect.listConnections({ publishableKey: \"rp_pk_test_…\", sessionToken: \"cst_…\" });\n\n  // Or with fetch (only from an allowed origin):\n  const res = await fetch(\"https://api.relaypoints.online/v1/connect/client/connections\", {\n    headers: { \"RelayPoint-Publishable-Key\": \"rp_pk_test_…\", \"RelayPoint-Session\": \"cst_…\" },\n  });\n  console.log((await res.json()).data);\n</script>"},{"lang":"python","label":"Python","source":"import requests\n\n# Normally called from the browser; useful to test an allowed origin.\nr = requests.get(\n    \"https://api.relaypoints.online/v1/connect/client/connections\",\n    headers={\"RelayPoint-Publishable-Key\": \"rp_pk_test_…\", \"RelayPoint-Session\": \"cst_…\", \"Origin\": \"https://www.example.com\"},\n    timeout=30,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n// Normally called from the browser; useful to test an allowed origin.\n$ch = curl_init(\"https://api.relaypoints.online/v1/connect/client/connections\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\"RelayPoint-Publishable-Key: rp_pk_test_…\", \"RelayPoint-Session: cst_…\", \"Origin: https://www.example.com\"]);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$data = json_decode(curl_exec($ch), true);\nprint_r($data);"}]}},"/v1/social/accounts":{"get":{"operationId":"listSocialAccounts","tags":["Social"],"summary":"List social accounts and destinations","description":"Each social connection of the end user with its `destinations`: Facebook Pages, Instagram accounts, LinkedIn member and company pages, YouTube channels, Business Profile locations, TikTok and X accounts. Use a destination id in `targets` to post to one of them.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The accounts","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccountList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/social/accounts?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/accounts?end_user_id=agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/social/accounts?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/accounts?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/posts":{"post":{"operationId":"createSocialPost","tags":["Social"],"summary":"Create a post","description":"Posts to several networks at once. `targets` (up to 20): a provider name (every destination of that provider among the end user's active connections) or `{ connection, destination? }`. One image or one video: `image_url` / `video_url` (public https, imported to the media library) or `media: [\"med_…\"]`. `overrides` per provider or connection id: `text`, `hashtags`, `link_url`, `title`. Every target is adapted first (text and hashtag limits, links, image crop and JPEG conversion, video size, YouTube title); if any target has errors the call is `validation_failed` with `targets[]` and nothing is published. `scheduled_at` (1 minute to 90 days ahead), `draft: true` (send later with /submit). A drafter's post waits in `pending_approval` when approvals are on. Webhooks: `social.post.published`, `social.post.failed`, `social.post.pending_approval`. Fair use: posts per account per day (`daily_limit_reached`).\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostCreate"},"example":{"end_user_id":"agent_123","text":"New listing in Umhlanga: 3 bed, sea views.","hashtags":["Umhlanga","SeaViews"],"image_url":"https://www.example.com/uploads/listing.jpg","link_url":"https://www.example.com/listing/123","overrides":{"x":{"text":"3 bed with sea views in Umhlanga"}},"targets":["facebook","instagram","linkedin"],"scheduled_at":"2026-11-20T08:00:00Z"}}}},"responses":{"201":{"description":"The post, with one entry per target","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`validation_failed`, `idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["validation_failed","idempotency_mismatch"]},"429":{"description":"`daily_limit_reached`, `rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["daily_limit_reached","rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/posts \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"text\":\"New listing in Umhlanga: 3 bed, sea views.\",\"hashtags\":[\"Umhlanga\",\"SeaViews\"],\"image_url\":\"https://www.example.com/uploads/listing.jpg\",\"link_url\":\"https://www.example.com/listing/123\",\"overrides\":{\"x\":{\"text\":\"3 bed with sea views in Umhlanga\"}},\"targets\":[\"facebook\",\"instagram\",\"linkedin\"],\"scheduled_at\":\"2026-11-20T08:00:00Z\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"text\": \"New listing in Umhlanga: 3 bed, sea views.\",\n    \"hashtags\": [\n      \"Umhlanga\",\n      \"SeaViews\"\n    ],\n    \"image_url\": \"https://www.example.com/uploads/listing.jpg\",\n    \"link_url\": \"https://www.example.com/listing/123\",\n    \"overrides\": {\n      \"x\": {\n        \"text\": \"3 bed with sea views in Umhlanga\"\n      }\n    },\n    \"targets\": [\n      \"facebook\",\n      \"instagram\",\n      \"linkedin\"\n    ],\n    \"scheduled_at\": \"2026-11-20T08:00:00Z\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/social/posts\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"text\": \"New listing in Umhlanga: 3 bed, sea views.\",\n        \"hashtags\": [\n            \"Umhlanga\",\n            \"SeaViews\"\n        ],\n        \"image_url\": \"https://www.example.com/uploads/listing.jpg\",\n        \"link_url\": \"https://www.example.com/listing/123\",\n        \"overrides\": {\n            \"x\": {\n                \"text\": \"3 bed with sea views in Umhlanga\"\n            }\n        },\n        \"targets\": [\n            \"facebook\",\n            \"instagram\",\n            \"linkedin\"\n        ],\n        \"scheduled_at\": \"2026-11-20T08:00:00Z\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"text\" => \"New listing in Umhlanga: 3 bed, sea views.\",\n    \"hashtags\" => [\n        \"Umhlanga\",\n        \"SeaViews\",\n    ],\n    \"image_url\" => \"https://www.example.com/uploads/listing.jpg\",\n    \"link_url\" => \"https://www.example.com/listing/123\",\n    \"overrides\" => [\n        \"x\" => [\n            \"text\" => \"3 bed with sea views in Umhlanga\",\n        ],\n    ],\n    \"targets\" => [\n        \"facebook\",\n        \"instagram\",\n        \"linkedin\",\n    ],\n    \"scheduled_at\" => \"2026-11-20T08:00:00Z\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listSocialPosts","tags":["Social"],"summary":"List posts","description":"Newest first, optionally for one end user and one status.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending_approval","rejected","scheduled","publishing","published","partially_published","failed","canceled"]}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The posts","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/social/posts?end_user_id=agent_123&status=scheduled&limit=25 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts?end_user_id=agent_123&status=scheduled&limit=25\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/social/posts?end_user_id=agent_123&status=scheduled&limit=25\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts?end_user_id=agent_123&status=scheduled&limit=25\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/posts/validate":{"post":{"operationId":"validateSocialPost","tags":["Social"],"summary":"Validate a post","description":"Same body as POST /v1/social/posts. Returns what each target would publish (adapted text, title, link, media changes) with its `errors` and `warnings`, without saving or publishing anything.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostCreate"},"example":{"end_user_id":"agent_123","text":"Open house on Saturday from 10:00 to 13:00.","targets":["instagram","x"]}}}},"responses":{"200":{"description":"The checks per target","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostValidation"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`validation_failed`, `idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["validation_failed","idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/posts/validate \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"text\":\"Open house on Saturday from 10:00 to 13:00.\",\"targets\":[\"instagram\",\"x\"]}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts/validate\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"text\": \"Open house on Saturday from 10:00 to 13:00.\",\n    \"targets\": [\n      \"instagram\",\n      \"x\"\n    ]\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/social/posts/validate\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"text\": \"Open house on Saturday from 10:00 to 13:00.\",\n        \"targets\": [\n            \"instagram\",\n            \"x\"\n        ]\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts/validate\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"text\" => \"Open house on Saturday from 10:00 to 13:00.\",\n    \"targets\" => [\n        \"instagram\",\n        \"x\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/posts/{id}":{"get":{"operationId":"getSocialPost","tags":["Social"],"summary":"Get a post","description":"With the status of each target (`pending`, `queued` with `next_attempt_at`, `processing`, `published` with `url`, `failed` with `error`) and its metrics.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The post","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"cancelSocialPost","tags":["Social"],"summary":"Cancel a post","description":"Cancels a draft, a scheduled post or one pending approval. Published posts stay on the networks.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The canceled post","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws\", {\n  method: \"DELETE\",\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/posts/{id}/approve":{"post":{"operationId":"approveSocialPost","tags":["Social"],"summary":"Approve a post","description":"`approver_end_user_id` must have the `approver` role. The post is then scheduled or published.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostApprove"},"example":{"approver_end_user_id":"manager_7"}}}},"responses":{"200":{"description":"The post","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/approve \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"approver_end_user_id\":\"manager_7\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/approve\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"approver_end_user_id\": \"manager_7\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/approve\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"approver_end_user_id\": \"manager_7\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/approve\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"approver_end_user_id\" => \"manager_7\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/posts/{id}/reject":{"post":{"operationId":"rejectSocialPost","tags":["Social"],"summary":"Reject a post","description":"`approver_end_user_id` must have the `approver` role; `reason` is shown to the author.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostReject"},"example":{"approver_end_user_id":"manager_7","reason":"Please add the asking price."}}}},"responses":{"200":{"description":"The post","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/reject \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"approver_end_user_id\":\"manager_7\",\"reason\":\"Please add the asking price.\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/reject\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"approver_end_user_id\": \"manager_7\",\n    \"reason\": \"Please add the asking price.\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/reject\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"approver_end_user_id\": \"manager_7\",\n        \"reason\": \"Please add the asking price.\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/reject\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"approver_end_user_id\" => \"manager_7\",\n    \"reason\" => \"Please add the asking price.\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/posts/{id}/submit":{"post":{"operationId":"submitSocialPost","tags":["Social"],"summary":"Submit a draft","description":"Validates the draft again, then schedules or publishes it (or sends it for approval).\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The post","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict"]},"422":{"description":"`validation_failed`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["validation_failed"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/submit \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/submit\", {\n  method: \"POST\",\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/submit\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/posts/sp_4Hn7Vq2Lx9Ws/submit\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POST, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/assist":{"post":{"operationId":"socialAssist","tags":["Social"],"summary":"AI assist","description":"Writes or improves post text: `caption`, `hashtags`, `rewrite`, `translate` (to `language`) or `listing_to_post` (from a property's details). Runs on RelayPoint's `rp/text-fast` and is billed from your AI Credits (`cost_usd`); free sample text in test mode. `feature_disabled` when the workspace switched AI assist off.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAssistRequest"},"example":{"task":"listing_to_post","listing":{"title":"3 bed apartment","suburb":"Umhlanga","price":"R 4 950 000","features":["sea views","pool"]},"tone":"friendly","language":"en","provider":"instagram"}}}},"responses":{"200":{"description":"The text","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAssist"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance"]},"403":{"description":"`feature_disabled`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["feature_disabled","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/assist \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"task\":\"listing_to_post\",\"listing\":{\"title\":\"3 bed apartment\",\"suburb\":\"Umhlanga\",\"price\":\"R 4 950 000\",\"features\":[\"sea views\",\"pool\"]},\"tone\":\"friendly\",\"language\":\"en\",\"provider\":\"instagram\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/assist\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"task\": \"listing_to_post\",\n    \"listing\": {\n      \"title\": \"3 bed apartment\",\n      \"suburb\": \"Umhlanga\",\n      \"price\": \"R 4 950 000\",\n      \"features\": [\n        \"sea views\",\n        \"pool\"\n      ]\n    },\n    \"tone\": \"friendly\",\n    \"language\": \"en\",\n    \"provider\": \"instagram\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/social/assist\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"task\": \"listing_to_post\",\n        \"listing\": {\n            \"title\": \"3 bed apartment\",\n            \"suburb\": \"Umhlanga\",\n            \"price\": \"R 4 950 000\",\n            \"features\": [\n                \"sea views\",\n                \"pool\"\n            ]\n        },\n        \"tone\": \"friendly\",\n        \"language\": \"en\",\n        \"provider\": \"instagram\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/assist\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"task\" => \"listing_to_post\",\n    \"listing\" => [\n        \"title\" => \"3 bed apartment\",\n        \"suburb\" => \"Umhlanga\",\n        \"price\" => \"R 4 950 000\",\n        \"features\" => [\n            \"sea views\",\n            \"pool\",\n        ],\n    ],\n    \"tone\" => \"friendly\",\n    \"language\" => \"en\",\n    \"provider\" => \"instagram\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/best_times":{"get":{"operationId":"getBestTimes","tags":["Social"],"summary":"Best times to post","description":"Per network: the end user's best hours of the week from their own engagement once there are 8 or more measured posts (`basis: history`), researched defaults before that (`basis: default`), and the next three times in the workspace's time zone.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"Suggested times","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BestTimes"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/social/best_times?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/best_times?end_user_id=agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/social/best_times?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/best_times?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/analytics":{"get":{"operationId":"getSocialAnalytics","tags":["Social"],"summary":"Unified analytics","description":"Totals (posts, impressions, reach, engagement, clicks, likes, comments, shares, views) across networks, grouped by `provider`, `connection` or `end_user`. Metrics are refreshed every 3 hours for posts from the last 30 days.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"from","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"description":"Unix seconds (default: 30 days ago)"},{"name":"to","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"group_by","in":"query","required":false,"schema":{"default":"provider","type":"string","enum":["connection","end_user","provider"]}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The analytics","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAnalytics"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/social/analytics?end_user_id=agent_123&group_by=provider \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/analytics?end_user_id=agent_123&group_by=provider\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/social/analytics?end_user_id=agent_123&group_by=provider\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/analytics?end_user_id=agent_123&group_by=provider\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/media":{"post":{"operationId":"uploadSocialMedia","tags":["Social"],"summary":"Add to the media library","description":"Multipart `file` with `end_user_id`, or JSON `{ end_user_id, url }` (a public https URL). Images: JPEG, PNG, WebP or GIF up to 20 MB. Videos: MP4, MOV or WebM up to 250 MB (100 MB through this endpoint). Use the id in a post's `media`.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SocialMediaUpload"},"example":{"end_user_id":"agent_123"}}}},"responses":{"201":{"description":"The media item","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"415":{"description":"`unsupported_media_type`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["unsupported_media_type"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/social/media \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -F file=@listing.jpg \\\n  -F end_user_id=agent_123"},{"lang":"javascript","label":"JavaScript","source":"import { readFile } from \"node:fs/promises\";\n\nconst form = new FormData();\nform.append(\"end_user_id\", \"agent_123\");\nform.append(\"file\", new Blob([await readFile(\"listing.jpg\")]), \"listing.jpg\");\nconst res = await fetch(\"https://api.relaypoints.online/v1/social/media\", {\n  method: \"POST\",\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n  body: form,\n});\nconsole.log(res.status, await res.json());"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nwith open(\"listing.jpg\", \"rb\") as f:\n    r = requests.post(\n        \"https://api.relaypoints.online/v1/social/media\",\n        headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n        files={\"file\": f},\n        data={\n  \"end_user_id\": \"agent_123\"\n},\n    )\nprint(r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/media\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POSTFIELDS, array_merge([\n    \"end_user_id\" => \"agent_123\",\n], [\"file\" => new CURLFile(\"listing.jpg\")]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listSocialMedia","tags":["Social"],"summary":"List the media library","description":"The end user's images and videos (uploads, URLs and Drive imports).\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The media","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/social/media?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/media?end_user_id=agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/social/media?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/media?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/social/media/{id}":{"delete":{"operationId":"deleteSocialMedia","tags":["Social"],"summary":"Delete a media item","description":"Removes it from the end user's library. Posts already published keep their media.\n\nScope `social`.","security":[{"apiKey":["social"]}],"x-scope":"social","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Deleted","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaDeleted"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/social/media/med_2Kp8Wd5Rz3Nf?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/social/media/med_2Kp8Wd5Rz3Nf?end_user_id=agent_123\", {\n  method: \"DELETE\",\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/social/media/med_2Kp8Wd5Rz3Nf?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/social/media/med_2Kp8Wd5Rz3Nf?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/drive/files":{"get":{"operationId":"listDriveFiles","tags":["Drive"],"summary":"List Drive files","description":"The files RelayPoint can see in the end user's Google Drive (`drive.file`: files it created or that were picked with Google Picker). Add `connection` when the end user has more than one Drive connection.\n\nScope `drive`.","security":[{"apiKey":["drive"]}],"x-scope":"drive","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"page_size","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"A page of files","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/drive/files?end_user_id=agent_123&q=listing&page_size=25 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/drive/files?end_user_id=agent_123&q=listing&page_size=25\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/drive/files?end_user_id=agent_123&q=listing&page_size=25\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/drive/files?end_user_id=agent_123&q=listing&page_size=25\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"post":{"operationId":"uploadDriveFile","tags":["Drive"],"summary":"Upload to Drive","description":"Multipart `file` (at most 10 MB) with `end_user_id`, and optionally `connection`, `name` and `folder_id`.\n\nScope `drive`.","security":[{"apiKey":["drive"]}],"x-scope":"drive","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DriveUpload"},"example":{"end_user_id":"agent_123"}}}},"responses":{"201":{"description":"The file","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFile"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/drive/files \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -F file=@brochure.pdf \\\n  -F end_user_id=agent_123"},{"lang":"javascript","label":"JavaScript","source":"import { readFile } from \"node:fs/promises\";\n\nconst form = new FormData();\nform.append(\"end_user_id\", \"agent_123\");\nform.append(\"file\", new Blob([await readFile(\"brochure.pdf\")]), \"brochure.pdf\");\nconst res = await fetch(\"https://api.relaypoints.online/v1/drive/files\", {\n  method: \"POST\",\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n  body: form,\n});\nconsole.log(res.status, await res.json());"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nwith open(\"brochure.pdf\", \"rb\") as f:\n    r = requests.post(\n        \"https://api.relaypoints.online/v1/drive/files\",\n        headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n        files={\"file\": f},\n        data={\n  \"end_user_id\": \"agent_123\"\n},\n    )\nprint(r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/drive/files\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POSTFIELDS, array_merge([\n    \"end_user_id\" => \"agent_123\",\n], [\"file\" => new CURLFile(\"brochure.pdf\")]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/drive/files/import":{"post":{"operationId":"importDriveFile","tags":["Drive"],"summary":"Import a Drive file to the media library","description":"Copies an image or video from the end user's Drive into their media library, ready for a post's `media`.\n\nScope `drive`.","security":[{"apiKey":["drive"]}],"x-scope":"drive","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveImport"},"example":{"end_user_id":"agent_123","file_id":"1aBcD2eFgH3iJkL4mNoP"}}}},"responses":{"201":{"description":"The media item","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/drive/files/import \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"file_id\":\"1aBcD2eFgH3iJkL4mNoP\"}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/drive/files/import\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"file_id\": \"1aBcD2eFgH3iJkL4mNoP\"\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/drive/files/import\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"file_id\": \"1aBcD2eFgH3iJkL4mNoP\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/drive/files/import\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"file_id\" => \"1aBcD2eFgH3iJkL4mNoP\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/drive/files/{id}":{"get":{"operationId":"getDriveFile","tags":["Drive"],"summary":"Get a Drive file","description":"The file's metadata.\n\nScope `drive`.","security":[{"apiKey":["drive"]}],"x-scope":"drive","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The file","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFile"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP?end_user_id=agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/drive/files/{id}/content":{"get":{"operationId":"downloadDriveFile","tags":["Drive"],"summary":"Download a Drive file","description":"The file's bytes (at most 25 MB), with its content type.\n\nScope `drive`.","security":[{"apiKey":["drive"]}],"x-scope":"drive","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The file","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"413":{"description":"`payload_too_large`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["payload_too_large"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP/content?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  --output download.bin"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP/content?end_user_id=agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst bytes = Buffer.from(await res.arrayBuffer());"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP/content?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nopen(\"download.bin\", \"wb\").write(r.content)"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/drive/files/1aBcD2eFgH3iJkL4mNoP/content?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\nfile_put_contents(\"download.bin\", $response);"}]}},"/v1/whatsapp/templates":{"get":{"operationId":"listWhatsAppTemplates","tags":["WhatsApp"],"summary":"List message templates","description":"The approved templates of the end user's WhatsApp Business account.\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The templates","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppTemplateList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/whatsapp/templates?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/templates?end_user_id=agent_123\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/whatsapp/templates?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/templates?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/whatsapp/contacts":{"post":{"operationId":"createWhatsAppContact","tags":["WhatsApp"],"summary":"Add or update a contact","description":"`phone` in international format. Record `opt_in` (`source`, `proof`, `at`) to send templates and broadcasts: keep what the person agreed to and how.\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppContactCreate"},"example":{"end_user_id":"agent_123","phone":"+27821234567","name":"Sipho N.","opt_in":{"source":"website enquiry form","proof":"Ticked 'Send me updates on WhatsApp' on /listing/123 at 2026-11-12T09:14:00Z"}}}}},"responses":{"201":{"description":"The contact","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppContact"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/whatsapp/contacts \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"phone\":\"+27821234567\",\"name\":\"Sipho N.\",\"opt_in\":{\"source\":\"website enquiry form\",\"proof\":\"Ticked 'Send me updates on WhatsApp' on /listing/123 at 2026-11-12T09:14:00Z\"}}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/contacts\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"phone\": \"+27821234567\",\n    \"name\": \"Sipho N.\",\n    \"opt_in\": {\n      \"source\": \"website enquiry form\",\n      \"proof\": \"Ticked 'Send me updates on WhatsApp' on /listing/123 at 2026-11-12T09:14:00Z\"\n    }\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/whatsapp/contacts\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"phone\": \"+27821234567\",\n        \"name\": \"Sipho N.\",\n        \"opt_in\": {\n            \"source\": \"website enquiry form\",\n            \"proof\": \"Ticked 'Send me updates on WhatsApp' on /listing/123 at 2026-11-12T09:14:00Z\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/contacts\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"phone\" => \"+27821234567\",\n    \"name\" => \"Sipho N.\",\n    \"opt_in\" => [\n        \"source\" => \"website enquiry form\",\n        \"proof\" => \"Ticked 'Send me updates on WhatsApp' on /listing/123 at 2026-11-12T09:14:00Z\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listWhatsAppContacts","tags":["WhatsApp"],"summary":"List contacts","description":"With `opted_in`, the opt-in proof, `window_open` (the 24-hour window) and unread counts. `opted_in=true` lists only opted-in contacts.\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"opted_in","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The contacts","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppContactList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/whatsapp/contacts?end_user_id=agent_123&opted_in=true \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/contacts?end_user_id=agent_123&opted_in=true\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/whatsapp/contacts?end_user_id=agent_123&opted_in=true\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/contacts?end_user_id=agent_123&opted_in=true\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/whatsapp/contacts/{id}":{"delete":{"operationId":"optOutWhatsAppContact","tags":["WhatsApp"],"summary":"Opt a contact out","description":"Records an opt-out: no more templates or broadcasts. Inbound \"STOP\", \"arrêt\" and \"parar\" do the same.\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The contact","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppContact"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/whatsapp/contacts/wac_6Tb3Yh8Ms1Qe?end_user_id=agent_123 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/contacts/wac_6Tb3Yh8Ms1Qe?end_user_id=agent_123\", {\n  method: \"DELETE\",\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/whatsapp/contacts/wac_6Tb3Yh8Ms1Qe?end_user_id=agent_123\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/contacts/wac_6Tb3Yh8Ms1Qe?end_user_id=agent_123\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/whatsapp/messages":{"post":{"operationId":"sendWhatsAppMessage","tags":["WhatsApp"],"summary":"Send a message","description":"Either an approved `template` (needs the contact's opt-in: `opt_in_required`) or free-form `text`, allowed only within 24 hours of the contact's last message (`window_closed`: send a template instead). Meta bills message fees to the end user's own WhatsApp Business account. Fair use: messages per number per day (`daily_limit_reached`).\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessageSend"},"example":{"end_user_id":"agent_123","contact":"wac_6Tb3Yh8Ms1Qe","template":{"name":"viewing_reminder","language":"en","components":[{"type":"body","parameters":[{"type":"text","text":"Saturday 10:00"}]}]}}}}},"responses":{"201":{"description":"The message","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppMessage"}}}},"400":{"description":"`invalid_request`, `opt_in_required`, `upstream_rejected`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","opt_in_required","upstream_rejected","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `window_closed`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","window_closed","idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`daily_limit_reached`, `rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["daily_limit_reached","rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]},"503":{"description":"`upstream_unavailable`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["upstream_unavailable"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/whatsapp/messages \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"contact\":\"wac_6Tb3Yh8Ms1Qe\",\"template\":{\"name\":\"viewing_reminder\",\"language\":\"en\",\"components\":[{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"Saturday 10:00\"}]}]}}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/messages\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"contact\": \"wac_6Tb3Yh8Ms1Qe\",\n    \"template\": {\n      \"name\": \"viewing_reminder\",\n      \"language\": \"en\",\n      \"components\": [\n        {\n          \"type\": \"body\",\n          \"parameters\": [\n            {\n              \"type\": \"text\",\n              \"text\": \"Saturday 10:00\"\n            }\n          ]\n        }\n      ]\n    }\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/whatsapp/messages\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"contact\": \"wac_6Tb3Yh8Ms1Qe\",\n        \"template\": {\n            \"name\": \"viewing_reminder\",\n            \"language\": \"en\",\n            \"components\": [\n                {\n                    \"type\": \"body\",\n                    \"parameters\": [\n                        {\n                            \"type\": \"text\",\n                            \"text\": \"Saturday 10:00\"\n                        }\n                    ]\n                }\n            ]\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/messages\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"contact\" => \"wac_6Tb3Yh8Ms1Qe\",\n    \"template\" => [\n        \"name\" => \"viewing_reminder\",\n        \"language\" => \"en\",\n        \"components\" => [\n            [\n                \"type\" => \"body\",\n                \"parameters\" => [\n                    [\n                        \"type\" => \"text\",\n                        \"text\" => \"Saturday 10:00\",\n                    ],\n                ],\n            ],\n        ],\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listWhatsAppMessages","tags":["WhatsApp"],"summary":"Get a conversation","description":"The messages with one contact (oldest first), and marks them read.\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"name":"end_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"description":"Your own id for the person or entity (e.g. agent_123, company)"},{"name":"connection","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"contact","in":"query","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The conversation","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConversation"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/whatsapp/messages?end_user_id=agent_123&contact=wac_6Tb3Yh8Ms1Qe \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/messages?end_user_id=agent_123&contact=wac_6Tb3Yh8Ms1Qe\", {\n  headers: { Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}` },\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/whatsapp/messages?end_user_id=agent_123&contact=wac_6Tb3Yh8Ms1Qe\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/messages?end_user_id=agent_123&contact=wac_6Tb3Yh8Ms1Qe\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/whatsapp/broadcasts":{"post":{"operationId":"createWhatsAppBroadcast","tags":["WhatsApp"],"summary":"Broadcast a template","description":"Sends an approved template to opted-in contacts only (all of them, or the listed `contacts`). The worker sends in paced batches within the daily limit; contacts without opt-in are skipped.\n\nScope `whatsapp`.","security":[{"apiKey":["whatsapp"]}],"x-scope":"whatsapp","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppBroadcastCreate"},"example":{"end_user_id":"agent_123","template":{"name":"new_listing_alert","language":"en"}}}}},"responses":{"201":{"description":"The queued broadcast","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppBroadcast"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/whatsapp/broadcasts \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"end_user_id\":\"agent_123\",\"template\":{\"name\":\"new_listing_alert\",\"language\":\"en\"}}'"},{"lang":"javascript","label":"JavaScript","source":"const res = await fetch(\"https://api.relaypoints.online/v1/whatsapp/broadcasts\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.RELAYPOINT_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"end_user_id\": \"agent_123\",\n    \"template\": {\n      \"name\": \"new_listing_alert\",\n      \"language\": \"en\"\n    }\n  }),\n});\nconst data = await res.json();\nconsole.log(res.status, data);"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/whatsapp/broadcasts\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"end_user_id\": \"agent_123\",\n        \"template\": {\n            \"name\": \"new_listing_alert\",\n            \"language\": \"en\"\n        }\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/whatsapp/broadcasts\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"end_user_id\" => \"agent_123\",\n    \"template\" => [\n        \"name\" => \"new_listing_alert\",\n        \"language\" => \"en\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/sub_accounts":{"post":{"operationId":"createSubAccount","tags":["Sub-accounts"],"summary":"Create a sub-account","description":"Reseller (platform) accounts only, after approved business verification (`kyc_required`). The sub-account starts with an empty wallet: transfer credits to it. `external_ref` is your own customer id.\n\nScope `sub_accounts`.","security":[{"apiKey":["sub_accounts"]}],"x-scope":"sub_accounts","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccountCreate"},"example":{"name":"Acme Realty","external_ref":"cust_1042","monthly_cap_usd":50,"country":"ZA"}}}},"responses":{"201":{"description":"The sub-account","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccount"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `kyc_required`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","kyc_required","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`conflict`, `idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["conflict","idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/sub_accounts \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Acme Realty\",\"external_ref\":\"cust_1042\",\"monthly_cap_usd\":50,\"country\":\"ZA\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst customer = await rp.subAccounts.create({\n  \"name\": \"Acme Realty\",\n  \"external_ref\": \"cust_1042\",\n  \"monthly_cap_usd\": 50,\n  \"country\": \"ZA\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/sub_accounts\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"name\": \"Acme Realty\",\n        \"external_ref\": \"cust_1042\",\n        \"monthly_cap_usd\": 50,\n        \"country\": \"ZA\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/sub_accounts\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"name\" => \"Acme Realty\",\n    \"external_ref\" => \"cust_1042\",\n    \"monthly_cap_usd\" => 50,\n    \"country\" => \"ZA\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listSubAccounts","tags":["Sub-accounts"],"summary":"List sub-accounts","description":"With balances and month-to-date spend.\n\nScope `sub_accounts`.","security":[{"apiKey":["sub_accounts"]}],"x-scope":"sub_accounts","x-live-only":false,"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"external_ref","in":"query","required":false,"schema":{"type":"string","maxLength":120}}],"responses":{"200":{"description":"A page of sub-accounts","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccountList"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/sub_accounts?external_ref=cust_1042 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst customers = await rp.subAccounts.list({\n  \"external_ref\": \"cust_1042\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/sub_accounts?external_ref=cust_1042\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/sub_accounts?external_ref=cust_1042\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/sub_accounts/{id}":{"get":{"operationId":"getSubAccount","tags":["Sub-accounts"],"summary":"Get a sub-account","description":"Its balance, cap and month-to-date spend.\n\nScope `sub_accounts`.","security":[{"apiKey":["sub_accounts"]}],"x-scope":"sub_accounts","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The sub-account","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccount"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst customer = await rp.subAccounts.retrieve(\"org_7Hk3Zr1pQs9W\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"patch":{"operationId":"updateSubAccount","tags":["Sub-accounts"],"summary":"Update a sub-account","description":"Name, reference, monthly cap (null for none), mark-up profile, billing email, or suspend/reactivate.\n\nScope `sub_accounts`.","security":[{"apiKey":["sub_accounts"]}],"x-scope":"sub_accounts","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccountUpdate"},"example":{"monthly_cap_usd":100,"status":"active"}}}},"responses":{"200":{"description":"The sub-account","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccount"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X PATCH https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"monthly_cap_usd\":100,\"status\":\"active\"}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst customer = await rp.subAccounts.update(\"org_7Hk3Zr1pQs9W\", {\n  \"monthly_cap_usd\": 100,\n  \"status\": \"active\"\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.patch(\n    \"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"monthly_cap_usd\": 100,\n        \"status\": \"active\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"monthly_cap_usd\" => 100,\n    \"status\" => \"active\",\n]));\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"closeSubAccount","tags":["Sub-accounts"],"summary":"Close a sub-account","description":"Moves its remaining credits back to your wallet and closes it.\n\nScope `sub_accounts`. Live keys only.","security":[{"apiKey":["sub_accounts"]}],"x-scope":"sub_accounts","x-live-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The closed sub-account","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccount"}}}},"400":{"description":"`invalid_request`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nawait rp.subAccounts.close(\"org_7Hk3Zr1pQs9W\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/sub_accounts/{id}/transfers":{"post":{"operationId":"transferCredits","tags":["Sub-accounts"],"summary":"Transfer credits","description":"Moves credits from your wallet to the sub-account (`to_sub_account`) or back (`to_parent`). Use an Idempotency-Key so a retry never transfers twice.\n\nScope `sub_accounts`. Live keys only.","security":[{"apiKey":["sub_accounts"]}],"x-scope":"sub_accounts","x-live-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"},"example":{"amount_usd":25,"direction":"to_sub_account","memo":"October allowance"}}}},"responses":{"201":{"description":"The transfer","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"402":{"description":"`insufficient_balance`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["insufficient_balance"]},"403":{"description":"`forbidden`, `ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["forbidden","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W/transfers \\\n  -H \"Authorization: Bearer $RELAYPOINT_LIVE_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"amount_usd\":25,\"direction\":\"to_sub_account\",\"memo\":\"October allowance\"}' \\\n  -H \"Idempotency-Key: allowance-2026-10-cust_1042\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_LIVE_KEY });\nawait rp.subAccounts.transfer(\"org_7Hk3Zr1pQs9W\", {\n  \"amount_usd\": 25,\n  \"direction\": \"to_sub_account\",\n  \"memo\": \"October allowance\"\n}, { idempotencyKey: \"allowance-2026-10-cust_1042\" });"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W/transfers\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_LIVE_KEY']}\"},\n    json={\n        \"amount_usd\": 25,\n        \"direction\": \"to_sub_account\",\n        \"memo\": \"October allowance\"\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/sub_accounts/org_7Hk3Zr1pQs9W/transfers\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_LIVE_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"amount_usd\" => 25,\n    \"direction\" => \"to_sub_account\",\n    \"memo\" => \"October allowance\",\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/webhook_endpoints":{"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"summary":"Add a webhook endpoint","description":"Registers a public https URL for signed events (`job.completed`, `job.failed`, `balance.low`, `order.paid`, `order.failed`, `connection.created`, `connection.expired`, `connection.disconnected`, `social.post.published`, `social.post.failed`, `social.post.pending_approval`, `whatsapp.message.received`, `whatsapp.message.status`, `sub_account.cap_reached`, `video_avatar.completed`, `video_avatar.failed`, `catalog.updated`, `pricing.updated`, `packs.updated`, `plans.updated`, `voices.updated`, `limits.updated`, `account.updated`, `service.status`, or `*`). The signing secret is returned once. Up to 10 endpoints per account.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointCreate"},"example":{"url":"https://yourapp.example/hooks/relaypoint","events":["job.completed","job.failed"]}}}},"responses":{"201":{"description":"The endpoint and its secret","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/webhook_endpoints \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://yourapp.example/hooks/relaypoint\",\"events\":[\"job.completed\",\"job.failed\"]}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst endpoint = await rp.webhookEndpoints.create({\n  \"url\": \"https://yourapp.example/hooks/relaypoint\",\n  \"events\": [\n    \"job.completed\",\n    \"job.failed\"\n  ]\n});\n// store endpoint.secret"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/webhook_endpoints\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"url\": \"https://yourapp.example/hooks/relaypoint\",\n        \"events\": [\n            \"job.completed\",\n            \"job.failed\"\n        ]\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"url\" => \"https://yourapp.example/hooks/relaypoint\",\n    \"events\" => [\n        \"job.completed\",\n        \"job.failed\",\n    ],\n]));\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"summary":"List webhook endpoints","description":"Without secrets.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The endpoints","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/webhook_endpoints \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst endpoints = await rp.webhookEndpoints.list();"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/webhook_endpoints\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/webhook_endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","tags":["Webhooks"],"summary":"Get a webhook endpoint","description":"With its 20 latest deliveries.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"}],"responses":{"200":{"description":"The endpoint","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDetail"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst endpoint = await rp.webhookEndpoints.retrieve(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.get(\n    \"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"patch":{"operationId":"updateWebhookEndpoint","tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"URL, events, description, or enable/disable.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointUpdate"},"example":{"events":["*"],"enabled":true}}}},"responses":{"200":{"description":"The endpoint","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"`invalid_request`, `invalid_json`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_request","invalid_json"]},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"409":{"description":"`idempotency_conflict`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_conflict"]},"422":{"description":"`idempotency_mismatch`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["idempotency_mismatch"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X PATCH https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"events\":[\"*\"],\"enabled\":true}'"},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.webhookEndpoints.update(\"we_6Rm2tY8uHb4\", {\n  \"events\": [\n    \"*\"\n  ],\n  \"enabled\": true\n});"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.patch(\n    \"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    json={\n        \"events\": [\n            \"*\"\n        ],\n        \"enabled\": True\n    },\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\n$headers[] = \"Content-Type: application/json\";\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([\n    \"events\" => [\n        \"*\",\n    ],\n    \"enabled\" => true,\n]));\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]},"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Stops deliveries to it.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Deleted","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X DELETE https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4 \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.webhookEndpoints.delete(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.delete(\n    \"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/webhook_endpoints/{id}/rotate_secret":{"post":{"operationId":"rotateWebhookSecret","tags":["Webhooks"],"summary":"Rotate the signing secret","description":"Returns the new secret once; deliveries are signed with it from now on.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The endpoint and its new secret","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4/rotate_secret \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nconst { secret } = await rp.webhookEndpoints.rotateSecret(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4/rotate_secret\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4/rotate_secret\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POST, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}},"/v1/webhook_endpoints/{id}/test":{"post":{"operationId":"testWebhookEndpoint","tags":["Webhooks"],"summary":"Send a test event","description":"Queues a signed `ping` event to this endpoint.\n\nScope `webhooks`.","security":[{"apiKey":["webhooks"]}],"x-scope":"webhooks","x-live-only":false,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RelayPointAccount"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"Queued","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTest"}}}},"401":{"description":"`invalid_api_key`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["invalid_api_key"]},"403":{"description":"`ip_not_allowed`, `domain_not_allowed`, `missing_scope`, `account_suspended`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["ip_not_allowed","domain_not_allowed","missing_scope","account_suspended"]},"404":{"description":"`not_found`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["not_found"]},"429":{"description":"`rate_limited`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["rate_limited"]},"500":{"description":"`internal_error`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-error-codes":["internal_error"]}},"x-codeSamples":[{"lang":"curl","label":"curl","source":"curl -X POST https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4/test \\\n  -H \"Authorization: Bearer $RELAYPOINT_API_KEY\""},{"lang":"javascript","label":"JavaScript","source":"import { RelayPoint } from \"@relaypoint/sdk\";\n\nconst rp = new RelayPoint({ apiKey: process.env.RELAYPOINT_API_KEY });\nawait rp.webhookEndpoints.test(\"we_6Rm2tY8uHb4\");"},{"lang":"python","label":"Python","source":"import os\nimport requests\n\nr = requests.post(\n    \"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4/test\",\n    headers={\"Authorization\": f\"Bearer {os.environ['RELAYPOINT_API_KEY']}\"},\n    timeout=60,\n)\nprint(r.status_code, r.json())"},{"lang":"php","label":"PHP","source":"<?php\n$ch = curl_init(\"https://api.relaypoints.online/v1/webhook_endpoints/we_6Rm2tY8uHb4/test\");\n$headers = [\"Authorization: Bearer \" . getenv(\"RELAYPOINT_API_KEY\")];\ncurl_setopt($ch, CURLOPT_POST, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n$response = curl_exec($ch);\n$data = json_decode($response, true);\nprint_r($data);"}]}}},"webhooks":{"event":{"post":{"summary":"Webhook event","description":"RelayPoint POSTs signed events to your endpoints: `job.completed`, `job.failed`, `balance.low`, `order.paid`, `order.failed`, `connection.created`, `connection.expired`, `connection.disconnected`, `social.post.published`, `social.post.failed`, `social.post.pending_approval`, `whatsapp.message.received`, `whatsapp.message.status`, `sub_account.cap_reached`, `video_avatar.completed`, `video_avatar.failed`, `catalog.updated`, `pricing.updated`, `packs.updated`, `plans.updated`, `voices.updated`, `limits.updated`, `account.updated`, `service.status`, and `ping` from the test button. Verify the `RelayPoint-Signature` header with your endpoint's secret (`verifyWebhook` in the SDK) and answer 2xx within 10 seconds; failed deliveries are retried with backoff (8 attempts over about two days). The header is `t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`; reject timestamps older than 5 minutes. Catalog events (catalog.updated, pricing.updated, packs.updated, plans.updated, voices.updated, limits.updated, account.updated, service.status) carry `{ id, type, event, version, changed, occurred_at, created }` instead of `data` (schema CatalogEvent); they are sent within seconds of the change, and GET /v1/catalog gives the new values. RelayPoint Connect events: `social.post.published`: A social post was published on every target, or on some of them (`status: partially_published`). `data` is the post (SocialPost). `social.post.failed`: A social post failed on at least one network after the retries. `data` is the post with each target's `error`. An in-app notification is also sent. `social.post.pending_approval`: A drafter's post waits for an approver. `data` is the post. `whatsapp.message.received`: An inbound WhatsApp message. `data` is the message (WhatsAppMessage, `direction: in`). `whatsapp.message.status`: A sent WhatsApp message changed status (sent, delivered, read, failed). `data` is the message.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["job.completed","job.failed","balance.low","order.paid","order.failed","connection.created","connection.expired","connection.disconnected","social.post.published","social.post.failed","social.post.pending_approval","whatsapp.message.received","whatsapp.message.status","sub_account.cap_reached","video_avatar.completed","video_avatar.failed","catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status","ping"]},"created":{"type":"integer"},"data":{"type":"object"},"event":{"type":"string"},"version":{"type":"integer"},"changed":{"type":"array","items":{"type":"string"}},"occurred_at":{"type":"string"}},"required":["id","type","created"]}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"rp_live_… / rp_test_…","description":"API key from the dashboard.","x-scopes":{"chat":"chat","embeddings":"embeddings","images":"images","jobs":"jobs","audio":"audio","usage":"usage","billing":"billing","sub_accounts":"sub_accounts","connections":"connections","webhooks":"webhooks","connections:credentials":"connections:credentials: granted by name only (not included in \"*\"), live keys only","connections:request":"connections:request: granted by name only (not included in \"*\"), live keys only","social":"social","drive":"drive","whatsapp":"whatsapp"}},"publishableKey":{"type":"apiKey","in":"header","name":"RelayPoint-Publishable-Key","description":"RelayPoint Connect publishable key (rp_pk_live_… / rp_pk_test_…): safe in the browser, works only from its allowed origins. Dashboard › API keys › Publishable keys."},"connectSession":{"type":"apiKey","in":"header","name":"RelayPoint-Session","description":"A connect session token (cst_…) from POST /v1/connect/sessions, created on your server."}},"parameters":{"RelayPointAccount":{"name":"RelayPoint-Account","in":"header","required":false,"description":"Resellers: the id of one of your sub-accounts to act for (usage is billed to its wallet).","schema":{"type":"string","examples":["org_7Hk3Zr1pQs9W"]}},"PublishableKey":{"name":"RelayPoint-Publishable-Key","in":"header","required":true,"description":"Your publishable key (rp_pk_live_… / rp_pk_test_…).","schema":{"type":"string"}},"ConnectSession":{"name":"RelayPoint-Session","in":"header","required":true,"description":"The connect session token (cst_…).","schema":{"type":"string"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Your unique id for this request (up to 255 characters). Retrying with the same key returns the first response (header `Idempotent-Replayed: true`) and never charges twice; reusing it with a different body is `idempotency_mismatch`.","schema":{"type":"string","maxLength":255}}},"headers":{"X-Request-Id":{"description":"Quote it to support.","schema":{"type":"string"}},"RateLimit-Remaining":{"description":"Requests left in the current window (with RateLimit-Limit and RateLimit-Reset).","schema":{"type":"integer"}}},"schemas":{"ToolCall":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"arguments":{"type":"string","maxLength":200000,"description":"The arguments as a JSON string"}},"required":["name","arguments"]}},"required":["id","type","function"]},"ChatUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"product":{"type":"string","description":"The RelayPoint product id that was billed"},"units":{"type":"number","description":"Billed units in `unit` (thousands of tokens)"},"unit":{"type":"string","const":"1k_tokens"},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What this call cost (0.000000 with test keys). US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"billing_mode":{"type":"string","enum":["credits","byok"],"description":"credits: RelayPoint open models, paid from your wallet; byok: your own key (the provider bills the model usage)"},"provider":{"type":"string","enum":["relaypoint","anthropic","openai"],"description":"Who served the request"},"platform_fee_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"BYOK: RelayPoint's platform fee (included in cost_usd); 0.000000 for credits. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"list_equivalent_cost_usd":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"BYOK: roughly what the provider bills you at its public prices. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},{"type":"null"}]},"fallback_from":{"description":"Set when your provider was unavailable and RelayPoint open models answered (opt-in fallback)","type":"string","enum":["anthropic","openai"]}},"required":["prompt_tokens","completion_tokens","total_tokens","product","units","unit","cost_usd","billing_mode","provider","platform_fee_usd","list_equivalent_cost_usd"],"additionalProperties":false},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_json","unknown_product","upstream_rejected","consent_required","content_rejected","video_too_long","provider_unavailable","opt_in_required","unauthorized","invalid_api_key","insufficient_balance","spend_cap_reached","insufficient_provider_credit","package_required","forbidden","feature_disabled","ip_not_allowed","domain_not_allowed","missing_scope","account_suspended","kyc_required","byok_required","not_found","method_not_allowed","conflict","idempotency_conflict","idempotency_mismatch","validation_failed","window_closed","daily_limit_reached","payload_too_large","byok_key_invalid","unsupported_media_type","rate_limited","internal_error","upstream_unavailable","upstream_timeout"]},"message":{"type":"string","description":"Human-readable explanation, safe to log"},"request_id":{"type":"string","description":"Quote it to support (also in the X-Request-Id header)"},"details":{"description":"invalid_request: up to 10 field problems","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"amount_owed_usd":{"description":"insufficient_balance: what the wallet owes when it is below $0","type":"number"},"required_usd":{"description":"insufficient_balance: credits the request needs","type":"number"},"available_usd":{"description":"insufficient_balance: credits available","type":"number"},"verify_url":{"description":"kyc_required: where the account completes business verification","type":"string"},"fields":{"description":"Manual connections: per-field problems","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"targets":{"type":"array","items":{"$ref":"#/components/schemas/SocialPostValidation/properties/targets/items"},"description":"validation_failed: each failing target with its `errors` and `warnings`"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"reason":{"type":"string"}}},"description":"provider_unavailable: the providers that can't be connected yet and why"},"provider_error":{"type":"string","description":"upstream_*: the network's own error code"}},"required":["code","message","request_id"],"additionalProperties":false},"Balance":{"type":"object","properties":{"object":{"type":"string","const":"balance"},"account":{"type":"string"},"currency":{"type":"string","const":"USD"},"available_usd":{"type":"number"},"held_usd":{"type":"number","description":"Reserved for running calls and jobs"},"amount_owed_usd":{"type":"number","description":"Above 0 when the wallet is below $0; spending is paused until it is paid"},"spending_paused":{"type":"boolean"},"month_to_date_usd":{"type":"number"},"monthly_cap_usd":{"type":["number","null"]},"reseller_profit_usd":{"description":"Resellers: mark-up earned and not yet withdrawn","type":"number"}},"required":["object","account","currency","available_usd","held_usd","amount_owed_usd","spending_paused","month_to_date_usd","monthly_cap_usd"],"additionalProperties":false},"CatalogEvent":{"type":"object","properties":{"id":{"type":"string","description":"cev_<sequence>; the SSE `id:` is the sequence number"},"type":{"type":"string"},"event":{"type":"string","enum":["catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The catalog version after the change (account.updated: the account's version)"},"changed":{"type":"array","items":{"type":"string"},"description":"Changed keys, e.g. products.rp/tts.price, packs.<id>.bonus, availability.rp/tts, limits.monthly_cap"},"occurred_at":{"type":"string"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","type","event","version","changed","occurred_at","created"],"additionalProperties":false},"CatalogItem":{"type":"object","properties":{"slug":{"type":"string"},"object":{"type":"string","const":"catalog_item"},"name":{"type":"string"},"names":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Name per language (en, fr, pt)"},"category":{"type":"string"},"auth_type":{"type":"string","enum":["oauth","manual","builtin"]},"phase":{"type":"string"},"availability":{"type":"string","description":"available, test (local sign-in only), planned, on_request or included"},"billing":{"type":"string","enum":["connection","ai"],"description":"connection: billed per connection per month (bundle pool first); ai: billed as AI usage"},"monthly_price_usd":{"description":"Monthly price of one connection outside your bundle pool, in USD (null for AI-billed items)","type":["number","null"]},"fields":{"description":"Manual items: the credentials to send","type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"secret":{"type":"boolean"},"optional":{"type":"boolean"},"type":{"type":"string"}},"required":["key","label","secret","optional","type"],"additionalProperties":false}}},"required":["slug","object","name","names","category","auth_type","phase","availability","billing","monthly_price_usd"],"additionalProperties":false},"CatalogList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogItem"},"description":"The connections catalogue (needs the connections scope; empty otherwise)"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Catalog version: bumped by every change that affects clients"},"account_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"This account's own version (custom prices, mark-ups, names, caps)"},"etag":{"type":"string","description":"Same as the ETag header: send it as If-None-Match to get 304 while nothing changed"},"generated_at":{"type":"string"},"currency":{"type":"string","const":"USD"},"products":{"type":"array","items":{"$ref":"#/components/schemas/CatalogProduct"}},"packs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"name":{"type":"string"},"price_usd":{"anyOf":[{"type":"string","description":"US dollars as a decimal string with 6 decimals"},{"type":"null"}]},"credit_usd":{"anyOf":[{"type":"string","description":"US dollars as a decimal string with 6 decimals"},{"type":"null"}]},"bonus_pct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"custom_amount":{"type":"boolean"},"minimum_usd":{"anyOf":[{"type":"string","description":"US dollars as a decimal string with 6 decimals"},{"type":"null"}]}},"required":["id","sku","name","price_usd","credit_usd","bonus_pct","custom_amount","minimum_usd"],"additionalProperties":false},"description":"Credit top-up packs for this account type"},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"kind":{"type":"string"},"name":{"type":"string"},"price_usd":{"type":"string","description":"US dollars as a decimal string with 6 decimals"},"connections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthly":{"type":"boolean"}},"required":["id","sku","kind","name","price_usd","connections","monthly"],"additionalProperties":false}},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"gender":{"type":"string"},"accent":{"type":["string","null"]},"default":{"type":"boolean"},"products":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean"}},"required":["id","name","language","gender","accent","default","products","available"],"additionalProperties":false}},"languages_without_voice":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"name":{"type":"string"}},"required":["language","name"],"additionalProperties":false}},"limits":{"type":"object","properties":{"video_avatar_max_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rate_limit_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthly_cap_usd":{"description":"Needs the billing scope","anyOf":[{"type":"string","description":"US dollars as a decimal string with 6 decimals"},{"type":"null"}]},"kyc_threshold_usd":{"type":"string","description":"US dollars as a decimal string with 6 decimals"},"max_webhook_endpoints":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["video_avatar_max_seconds","rate_limit_per_minute","kyc_threshold_usd","max_webhook_endpoints"],"additionalProperties":false},"fx_rates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"Display-only exchange rates (1 USD = rate)"},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"service_status":{"type":"object","properties":{"maintenance":{"type":"object","properties":{"active":{"type":"boolean"},"message":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["active","message"],"additionalProperties":false},"services":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"state":{"type":"string"}},"required":["key","state"],"additionalProperties":false}}},"required":["maintenance","services"],"additionalProperties":false},"account":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"sub_account":{"type":"boolean"},"status":{"type":"string"},"markup_profiles":{"description":"Resellers, with the sub_accounts scope","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"white_label_names":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","type","sub_account","status"],"additionalProperties":false}},"required":["object","data","version","account_version","etag","generated_at","currency","products","packs","plans","voices","languages_without_voice","limits","fx_rates","features","service_status","account"],"additionalProperties":false},"CatalogProduct":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"type":{"type":"string"},"unit":{"type":"string"},"unit_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_usd":{"anyOf":[{"type":"string","description":"US dollars as a decimal string with 6 decimals"},{"type":"null"}]},"list_price_usd":{"anyOf":[{"type":"string","description":"US dollars as a decimal string with 6 decimals"},{"type":"null"}]},"available":{"type":"boolean"},"session_options":{"description":"Real-time products (rp/voice-live): what a call can set (max_minutes, max_duration_seconds, silence_timeout_seconds, end_of_turn_ms with min/max/default), the hang-up message, audio formats, transports, built-in tools and end reasons (also: end_of_turn modes, affective_dialog, proactive_audio, backchannels, normalize locales, phone_band, style_tags)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"speech_options":{"description":"Speech products (rp/tts, rp/tts-standard): per-sentence style (segments with emotion / pace / energy and their allowed values), which tier honours which field, and the spoken-text normaliser (normalize, locales)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","name","category","type","unit","unit_size","price_usd","list_price_usd","available"],"additionalProperties":false,"description":"`price_usd`: what this account pays per `unit_size` units (custom price and reseller mark-up included)."},"CatalogVersion":{"type":"object","properties":{"object":{"type":"string","const":"catalog_version"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"account_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"etag":{"type":"string"}},"required":["object","version","account_version","etag"],"additionalProperties":false},"Character":{"type":"object","properties":{"id":{"type":"string","description":"chr_…"},"object":{"type":"string","const":"character"},"stock":{"type":"boolean","description":"true for RelayPoint's ready stock presenters (original AI-generated people)"},"kind":{"type":"string","enum":["generated","trained","stock"]},"status":{"type":"string","enum":["pending","ready","failed","disabled"]},"name":{"type":"string"},"description":{"type":"string"},"clothing":{"type":"string"},"style":{"type":"string"},"background":{"type":["string","null"]},"gender":{"type":["string","null"]},"age_band":{"type":["string","null"]},"ethnicity":{"type":["string","null"]},"role":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"voice_id":{"description":"Default voice for this character (GET /v1/voices)","type":["string","null"]},"parent_id":{"description":"Variants: the character they were made from (same identity and seed)","type":["string","null"]},"reference":{"anyOf":[{"type":"object","properties":{"portrait_url":{"type":["string","null"]},"presenter_url":{"type":["string","null"]},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["portrait_url","presenter_url","seed"],"additionalProperties":false},{"type":"null"}],"description":"Reference images (signed URLs, 1 hour) once ready"},"photo_checks":{"description":"Trained characters: the result of the photo checks (adult, not a public figure, one clear face)"},"consent_recorded":{"type":"boolean","const":true},"job_id":{"type":["string","null"]},"error":{"type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","stock","kind","status","name","description","clothing","style","background","gender","age_band","ethnicity","role","tags","voice_id","parent_id","reference","job_id","error","created"],"additionalProperties":false},"CharacterList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Character"}}},"required":["object","data"],"additionalProperties":false},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"model":{"type":"string","description":"The RelayPoint product id you asked for"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"description":"The answer; null when the model only asks for tool calls","type":["string","null"]},"tool_calls":{"description":"Functions the model wants called; answer each id with a role tool message","type":"array","items":{"$ref":"#/components/schemas/ToolCall"}}},"required":["role","content"],"additionalProperties":false},"finish_reason":{"type":"string","enum":["stop","length","tool_calls"]}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"$ref":"#/components/schemas/ChatUsage"}},"required":["id","object","created","model","choices","usage"],"additionalProperties":false},"ChatCompletionChunk":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion.chunk"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":"string"}},"additionalProperties":false},"finish_reason":{"type":["string","null"]}},"required":["index","delta","finish_reason"],"additionalProperties":false}},"usage":{"description":"On the last chunk only","$ref":"#/components/schemas/ChatUsage"}},"required":["id","object","created","model","choices"],"additionalProperties":false,"description":"One `data:` line of the server-sent event stream; the stream ends with `data: [DONE]`."},"ConnectLink":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"connect_link"},"account":{"type":"string","description":"The account the connection will belong to"},"catalog_slug":{"type":"string"},"label":{"type":["string","null"]},"redirect_url":{"type":["string","null"]},"status":{"type":"string","enum":["open","used","expired","revoked"]},"connection":{"type":["string","null"]},"expires_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"url":{"description":"The hosted page to send the account owner to (returned once, on create)","type":"string"}},"required":["id","object","account","catalog_slug","label","redirect_url","status","connection","expires_at","created"],"additionalProperties":false},"ConnectLinkList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectLink"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"Connection":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"connection"},"account":{"type":"string"},"catalog_slug":{"type":"string"},"status":{"type":"string","enum":["pending","active","expired","error","disconnected"]},"account_label":{"type":["string","null"]},"external_account_id":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"billing":{"type":"string","enum":["pool","wallet"]},"connect_link":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"disconnected":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]}},"required":["id","object","account","catalog_slug","status","account_label","external_account_id","scopes","billing","connect_link","last_error","created","disconnected"],"additionalProperties":false,"description":"Never contains tokens or credentials."},"ConnectionCredentials":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","const":"connection_credentials"},"connection":{"type":"string"},"type":{"type":"string","const":"oauth2"},"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}],"description":"Refreshed first when less than 5 minutes remain"}},"required":["object","connection","type","access_token","token_type","expires_at"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","const":"connection_credentials"},"connection":{"type":"string"},"type":{"type":"string","const":"manual"},"credentials":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["object","connection","type","credentials"],"additionalProperties":false}],"description":"OAuth: a short-lived access token and its expiry, never the refresh token. Manual: the stored credentials."},"ConnectionList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"ConnectionResponse":{"type":"object","properties":{"object":{"type":"string","const":"connection_response"},"connection":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The provider's HTTP status"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"content-type, etag, location, retry-after and the provider's rate-limit headers"},"body":{"description":"Parsed JSON, text, or base64 (see body_encoding)"},"body_encoding":{"type":"string","enum":["json","text","base64"]}},"required":["object","connection","status","headers","body","body_encoding"],"additionalProperties":false},"ConsentStatement":{"type":"object","properties":{"object":{"type":"string","const":"consent_statement"},"language":{"type":"string"},"text":{"type":"string"},"instructions":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}}},"required":["object","language","text","instructions","languages"],"additionalProperties":false},"Deleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false},"ElevenLabsVoices":{"type":"object","properties":{"object":{"type":"string","const":"list"},"provider":{"type":"string","const":"elevenlabs"},"shared_key":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","description":"premade, cloned, generated, professional"},"labels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"preview_url":{"type":["string","null"]}},"required":["id","name","category","labels","preview_url"],"additionalProperties":false}},"cached_for_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","provider","shared_key","data","cached_for_seconds"],"additionalProperties":false},"EmbeddingList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"model":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"embedding"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"embedding":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"string","description":"base64 float32 when encoding_format=base64"}]}},"required":["object","index","embedding"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What this call cost. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""}},"required":["prompt_tokens","total_tokens","cost_usd"],"additionalProperties":false}},"required":["object","model","data","usage"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."},"HeyGenAssets":{"type":"object","properties":{"object":{"type":"string","const":"heygen_assets"},"provider":{"type":"string","const":"heygen"},"shared_key":{"type":"boolean","description":"true: your reseller's key (stock avatars and voices only)"},"avatars":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"preview_image_url":{"type":["string","null"]},"preview_video_url":{"type":["string","null"]},"default_voice_id":{"type":["string","null"]},"owned":{"type":"boolean","description":"Your own avatar (consent needed)"}},"required":["id","name","type","preview_image_url","preview_video_url","default_voice_id","owned"],"additionalProperties":false}},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"gender":{"type":"string"},"preview_audio_url":{"type":["string","null"]},"owned":{"type":"boolean"}},"required":["id","name","language","gender","preview_audio_url","owned"],"additionalProperties":false}},"cached_for_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","provider","shared_key","avatars","voices","cached_for_seconds"],"additionalProperties":false},"ImageResponse":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"model":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"file_id":{"type":"string"},"expires_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"b64_json":{"type":"string"}},"additionalProperties":false}},"usage":{"type":"object","properties":{"images":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What this call cost. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""}},"required":["images","cost_usd"],"additionalProperties":false}},"required":["created","model","data","usage"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"job"},"model":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","expired"]},"progress":{"type":"integer","minimum":0,"maximum":100,"description":"0–100, updated by the worker while the job runs; 100 when it succeeded"},"account":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"started":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"completed":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"outputs":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string"},"name":{"type":"string"},"content_type":{"type":"string"},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"url":{"description":"Signed download URL while outputs are kept","type":["string","null"]}},"required":["file_id","name","content_type","size","url"],"additionalProperties":false}},"outputs_expire_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"result":{"anyOf":[{},{"type":"null"}],"description":"Product-specific. OCR: { pages, format, text, tables? } (tables with json_tables: [{ page, header, rows }])"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"usage":{"anyOf":[{"type":"object","properties":{"units":{"type":"number","description":"Billed units in the product's unit (video: seconds of output video)"},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What this call cost. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"billing_mode":{"type":"string","enum":["credits","byok"]},"provider":{"description":"relaypoint, or heygen / elevenlabs for premium media on your own key","type":"string"},"platform_fee_usd":{"description":"BYOK: the RelayPoint platform fee (the provider bills the usage)","type":"string"},"list_equivalent_cost_usd":{"description":"BYOK: what the provider would bill at its public prices","type":["string","null"]}},"required":["units","cost_usd"],"additionalProperties":false},{"type":"null"}]},"billing_mode":{"type":"string","enum":["credits","byok"]},"provider":{"type":"string"},"fallback_from":{"description":"Set when the provider was unavailable and the closest house product ran instead (opt-in)","type":"string"},"ai_generated":{"description":"true for generated media: label it as AI-generated where the law requires","type":"boolean"}},"required":["id","object","model","status","progress","account","metadata","created","started","completed","outputs","outputs_expire_at","result","error","usage"],"additionalProperties":false},"JobList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string","description":"Product id, e.g. rp/text-pro"},"object":{"type":"string","const":"model"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"owned_by":{"type":"string","const":"relaypoint"},"name":{"type":"string","description":"Display name (a reseller's white-label name for its customers)"},"category":{"type":"string"},"type":{"type":"string"},"unit":{"type":"string"},"unit_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_usd":{"description":"Your price per unit_size units; null for products that run only on your own key (the provider bills the usage, RelayPoint the platform fee)","type":["number","null"]},"default_max_tokens":{"description":"Chat: output tokens used when max_tokens is omitted","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_tokens":{"description":"Chat: the most output tokens per request","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"supports_tools":{"description":"Chat: tool calling (tools, tool_choice) is supported","type":"boolean"},"byok":{"description":"Text products that can run on your own Claude or OpenAI key (the `provider` field); `true` for premium media that runs only on your own HeyGen or ElevenLabs key","anyOf":[{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","enum":["anthropic","openai"]}},"required":{"type":"boolean","description":"true: runs only on your own key"},"connected":{"type":"boolean"}},"required":["providers","required"],"additionalProperties":false},{"type":"boolean","const":true}]},"provider":{"description":"Premium media: the provider whose key it needs","type":"string","enum":["heygen","elevenlabs"]},"connected":{"description":"Premium media: this account (or its reseller, when shared) has a key for the provider","type":"boolean"},"fallback_product":{"description":"Premium media: the house product used when the provider is down and fallback is on","type":["string","null"]},"voices":{"description":"Speech products: the voices for `voice` (\"default\" is the one with default: true; OpenAI voice names are accepted as aliases)","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string","description":"BCP 47, e.g. en-US"},"gender":{"type":"string","enum":["female","male"]},"default":{"type":"boolean"}},"required":["id","name","language","gender","default"],"additionalProperties":false}},"output_formats":{"description":"rp/ocr: values of input.output_format","type":"array","items":{"type":"string","enum":["text","markdown_tables","json_tables"]}}},"required":["id","object","created","owned_by","name","category","type","unit","unit_size","price_usd"],"additionalProperties":false},"ModelList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}},"required":["object","data"],"additionalProperties":false},"Order":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"order"},"account":{"type":"string"},"number":{"type":"string","description":"Order number shown on the invoice"},"reference":{"type":"string"},"kind":{"type":"string","enum":["credits","bundle","single_connection","addon"],"description":"credits = credit top-up or reseller package"},"description":{"type":"string"},"status":{"type":"string","enum":["awaiting_payment","paid","failed","void","refunded","partially_refunded"]},"currency":{"type":"string","const":"USD"},"amount_usd":{"type":"number"},"credits_usd":{"type":"number","description":"Credits added to the wallet (bonus included)"},"connections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunded_usd":{"type":"number"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"paid_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"invoice":{"type":"object","properties":{"number":{"description":"Ciel invoice number","type":["string","null"]},"pay_url":{"description":"Payment page while the order awaits payment","type":["string","null"]},"pdf_url":{"description":"Invoice PDF (API key auth, `billing` scope) once paid","type":["string","null"]},"currency":{"description":"Currency of the Ciel invoice (Ciel's company currency, e.g. ZAR). Credits stay in USD.","type":["string","null"]},"amount":{"description":"Amount of the Ciel invoice in its currency","type":["number","null"]},"fx_rate":{"description":"1 USD = fx_rate in the invoice currency, fixed when the order was created","type":["number","null"]}},"required":["number","pay_url","pdf_url","currency","amount","fx_rate"],"additionalProperties":false}},"required":["id","object","account","number","reference","kind","description","status","currency","amount_usd","credits_usd","connections","refunded_usd","created","paid_at","invoice"],"additionalProperties":false},"OrderList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"has_more":{"type":"boolean"},"total_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","data","has_more","total_count"],"additionalProperties":false},"Script":{"type":"object","properties":{"object":{"type":"string","const":"script"},"script":{"type":"string"},"language":{"type":"string"},"style":{"type":"string"},"estimated_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Speaking time of the script"},"usage":{"type":"object","properties":{"tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What this call cost. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""}},"required":["tokens","cost_usd"],"additionalProperties":false}},"required":["object","script","language","style","estimated_seconds","usage"],"additionalProperties":false},"SubAccount":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"sub_account"},"name":{"type":"string"},"external_ref":{"type":["string","null"]},"status":{"type":"string","enum":["active","suspended","closed"]},"country":{"type":"string"},"billing_email":{"type":["string","null"]},"monthly_cap_usd":{"type":["number","null"]},"markup_profile_id":{"type":["string","null"]},"balance":{"type":"object","properties":{"available_usd":{"type":"number"},"held_usd":{"type":"number"},"amount_owed_usd":{"type":"number"}},"required":["available_usd","held_usd","amount_owed_usd"],"additionalProperties":false},"month_to_date_usd":{"type":"number"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","name","external_ref","status","country","billing_email","monthly_cap_usd","markup_profile_id","balance","month_to_date_usd","created"],"additionalProperties":false},"SubAccountList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SubAccount"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"Transcription":{"type":"object","properties":{"text":{"type":"string"},"language":{"description":"verbose_json only","type":["string","null"]},"duration":{"description":"verbose_json only: seconds","type":"number"},"model":{"description":"verbose_json only","type":"string"},"words":{"description":"rp/stt-pro with verbose_json or diarize=true: words with timings and speaker labels","type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"speaker":{"type":["string","null"]}},"required":["text","start","end","speaker"],"additionalProperties":false}},"fallback_from":{"description":"Set when the provider was unavailable and the house product answered (fallback is opt-in)","type":"string"},"usage":{"type":"object","properties":{"seconds":{"type":"number"},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What this call cost. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"billing_mode":{"type":"string","const":"byok"},"provider":{"type":"string"},"platform_fee_usd":{"type":"string"},"list_equivalent_cost_usd":{"type":"string"}},"required":["seconds","cost_usd"],"additionalProperties":false}},"required":["text","usage"],"additionalProperties":false},"Transfer":{"type":"object","properties":{"object":{"type":"string","const":"transfer"},"id":{"type":"string"},"sub_account":{"type":"string"},"direction":{"type":"string","enum":["to_sub_account","to_parent"]},"amount_usd":{"type":"number"},"sub_account_balance":{"type":"object","properties":{"available_usd":{"type":"number"},"held_usd":{"type":"number"},"amount_owed_usd":{"type":"number"}},"required":["available_usd","held_usd","amount_owed_usd"],"additionalProperties":false}},"required":["object","id","sub_account","direction","amount_usd","sub_account_balance"],"additionalProperties":false},"UsageList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageRecord"}},"has_more":{"type":"boolean"},"totals":{"type":"object","properties":{"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_usd":{"type":"number"}},"required":["requests","price_usd"],"additionalProperties":false}},"required":["object","data","has_more","totals"],"additionalProperties":false},"UsageRecord":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"usage"},"request_id":{"type":"string"},"account":{"type":"string"},"model":{"type":"string"},"units":{"type":"number"},"price_usd":{"type":"number"},"status":{"type":"string","enum":["ok","error"]},"cached":{"type":"boolean"},"latency_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"job_id":{"type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","request_id","account","model","units","price_usd","status","cached","latency_ms","job_id","created"],"additionalProperties":false},"VideoAvatar":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"video_avatar"},"mode":{"type":"string","enum":["character_only","character_visuals"]},"status":{"type":"string","enum":["queued","scripting","planning","voicing","visuals","rendering","composing","done","failed"]},"progress":{"type":"integer","minimum":0,"maximum":100},"account":{"type":"string"},"character_id":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"cost_so_far_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Charged so far (the final cost once done; 0 when failed). US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"lines":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"units":{"type":"number"},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"This line. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"status":{"type":"string","enum":["held","settled","released"]}},"required":["product","units","cost_usd","status"],"additionalProperties":false},"description":"One billed line per product used (voice-over, lip sync, visuals, composing…); each has its own hold"},"scenes":{"type":"array","items":{"type":"object","properties":{"start_s":{"type":"number"},"end_s":{"type":"number"},"text":{"type":"string"},"layout":{"type":"string","enum":["presenter","fullscreen","side","pip"],"description":"How the presenter and the scene's visual share the frame"},"visual_prompt":{"type":"string"}},"required":["start_s","end_s","text","layout","visual_prompt"],"additionalProperties":false}},"segments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"start_s":{"type":"number"},"end_s":{"type":"number"},"status":{"type":"string","enum":["pending","running","done"]}},"required":["index","start_s","end_s","status"],"additionalProperties":false}},"result":{"anyOf":[{"type":"object","properties":{"mp4_url":{"type":["string","null"]},"thumbnail_url":{"type":["string","null"]},"srt_url":{"type":["string","null"]},"duration_s":{"type":["number","null"]}},"required":["mp4_url","thumbnail_url","srt_url","duration_s"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"ai_generated":{"type":"boolean","const":true},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"completed":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"outputs_expire_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]}},"required":["id","object","mode","status","progress","account","character_id","metadata","cost_so_far_usd","lines","scenes","segments","result","error","ai_generated","created","completed","outputs_expire_at"],"additionalProperties":false},"VideoAvatarEstimate":{"type":"object","properties":{"object":{"type":"string","const":"video_avatar.estimate"},"seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"by_mode":{"type":"object","properties":{"character_only":{"type":"object","properties":{"total":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Estimated total for this mode. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"lines":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"units":{"type":"number"},"unit":{"type":"string"},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"This line. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""}},"required":["product","units","unit","cost_usd"],"additionalProperties":false}}},"required":["total","lines"],"additionalProperties":false},"character_visuals":{"type":"object","properties":{"total":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"Estimated total for this mode. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""},"lines":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"units":{"type":"number"},"unit":{"type":"string"},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"This line. US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""}},"required":["product","units","unit","cost_usd"],"additionalProperties":false}}},"required":["total","lines"],"additionalProperties":false}},"required":["character_only","character_visuals"],"additionalProperties":false},"max_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The longest video allowed for this request (your max_seconds, never above the platform maximum)"},"fits":{"type":"boolean"}},"required":["object","seconds","by_mode","max_seconds","fits"],"additionalProperties":false},"VideoAvatarPlan":{"type":"object","properties":{"object":{"type":"string","const":"video_avatar.plan"},"mode":{"type":"string","enum":["character_only","character_visuals"]},"language":{"type":"string"},"estimated_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scenes":{"type":"array","items":{"type":"object","properties":{"start_s":{"type":"number"},"end_s":{"type":"number"},"text":{"type":"string"},"layout":{"type":"string","enum":["presenter","fullscreen","side","pip"],"description":"How the presenter and the scene's visual share the frame"},"visual_prompt":{"type":"string"}},"required":["start_s","end_s","text","layout","visual_prompt"],"additionalProperties":false},"description":"Edit and send back as `scenes` on POST /v1/video/avatar"},"usage":{"type":"object","properties":{"tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cost_usd":{"type":"string","pattern":"^-?\\d+\\.\\d{6}$","description":"What planning cost (character_visuals only). US dollars as a decimal string with 6 decimals, e.g. \"0.012500\""}},"required":["tokens","cost_usd"],"additionalProperties":false}},"required":["object","mode","language","estimated_seconds","scenes","usage"],"additionalProperties":false},"VideoAvatarSettings":{"type":"object","properties":{"object":{"type":"string","const":"video_avatar.settings"},"watermark":{"type":"boolean","description":"A visible \"AI-generated\" mark is drawn on this account's videos"},"watermark_own":{"type":"boolean"},"watermark_set_by_parent":{"type":"boolean","description":"Set by the reseller for all its sub-accounts"}},"required":["object","watermark","watermark_own","watermark_set_by_parent"],"additionalProperties":false},"VoiceClone":{"type":"object","properties":{"id":{"type":"string","description":"vc_…: use it as `voice` on rp/tts"},"object":{"type":"string","const":"voice_clone"},"name":{"type":"string"},"language":{"type":"string"},"status":{"type":"string","enum":["ready","deleted"]},"sample_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"consent":{"type":"object","properties":{"attested":{"type":"boolean","description":"The consent checkbox was ticked"},"text":{"description":"The checkbox wording","type":["string","null"]},"at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"recording":{"type":"boolean","description":"The owner's spoken consent recording is kept as evidence"}},"required":["attested","text","at","recording"],"additionalProperties":false},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"deleted":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]}},"required":["id","object","name","language","status","sample_seconds","consent","created","deleted"],"additionalProperties":false},"VoiceCloneList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceClone"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"VoiceList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"voice"},"name":{"type":"string"},"language":{"type":"string","description":"BCP 47, e.g. sw-KE"},"gender":{"type":"string","enum":["female","male"]},"accent":{"type":["string","null"]},"engine":{"type":"string","enum":["kokoro","chatterbox","ultra"]},"default":{"type":"boolean"},"preview_url":{"description":"A short sample (signed URL, 1 hour), or null until generated","type":["string","null"]},"products":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean","description":"A route can speak it right now on rp/tts"},"tiers":{"type":"object","properties":{"ultra":{"type":"boolean"},"standard":{"type":"boolean"}},"required":["ultra","standard"],"additionalProperties":false,"description":"Spoken now by rp/tts (ultra) / rp/tts-standard (standard)"}},"required":["id","object","name","language","gender","accent","engine","default","preview_url","products","available","tiers"],"additionalProperties":false}},"languages_without_voice":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"name":{"type":"string"},"note":{"type":"string"}},"required":["language","name","note"],"additionalProperties":false}}},"required":["object","data","languages_without_voice"],"additionalProperties":false},"VoiceLiveSession":{"type":"object","properties":{"object":{"type":"string","const":"voice_live.session"},"id":{"type":"string"},"model":{"type":"string","const":"rp/voice-live"},"status":{"type":"string","enum":["created","active","ended"]},"voice":{"type":"string"},"language":{"type":"string"},"transport":{"type":"string","enum":["websocket","twilio"]},"audio_format":{"type":"string","enum":["pcm16","mulaw"]},"sample_rate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_duration_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The call's hard limit in seconds (the lower of max_duration_seconds and max_minutes)"},"silence_timeout_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seconds without caller speech before the call ends (0 = never)"},"tools":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"engine":{"anyOf":[{"type":"string","enum":["native","cascade"]},{"type":"null"}],"description":"native: speech-to-speech; cascade: speech-to-text, model, text-to-speech"},"expires_at":{"type":"string","description":"Join before this time (60 s after creation)"},"started_at":{"type":["string","null"]},"ended_at":{"type":["string","null"]},"end_reason":{"description":"caller_hangup, client_ended (session.end), credit_exhausted, time_limit, silence_timeout, handover, idle, upstream_unavailable, server_shutdown","type":["string","null"]},"seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"turns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"avg_latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Average time from the caller stopping to the first audio of the answer"},"cost_usd":{"type":"string","description":"US dollars as a decimal string with 6 decimals"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"units":{"type":"number"},"cost_usd":{"type":"string","description":"US dollars as a decimal string with 6 decimals"}},"required":["units","cost_usd"],"additionalProperties":false}},"created_at":{"type":"string"}},"required":["object","id","model","status","voice","language","transport","audio_format","sample_rate","max_minutes","max_duration_seconds","silence_timeout_seconds","tools","metadata","engine","expires_at","started_at","ended_at","end_reason","seconds","turns","avg_latency_ms","cost_usd","usage","created_at"],"additionalProperties":false},"VoiceLiveSessionCreated":{"type":"object","properties":{"object":{"type":"string","const":"voice_live.session"},"id":{"type":"string"},"model":{"type":"string","const":"rp/voice-live"},"status":{"type":"string","enum":["created","active","ended"]},"voice":{"type":"string"},"language":{"type":"string"},"transport":{"type":"string","enum":["websocket","twilio"]},"audio_format":{"type":"string","enum":["pcm16","mulaw"]},"sample_rate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_duration_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The call's hard limit in seconds (the lower of max_duration_seconds and max_minutes)"},"silence_timeout_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seconds without caller speech before the call ends (0 = never)"},"tools":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"engine":{"anyOf":[{"type":"string","enum":["native","cascade"]},{"type":"null"}],"description":"native: speech-to-speech; cascade: speech-to-text, model, text-to-speech"},"expires_at":{"type":"string","description":"Join before this time (60 s after creation)"},"started_at":{"type":["string","null"]},"ended_at":{"type":["string","null"]},"end_reason":{"description":"caller_hangup, client_ended (session.end), credit_exhausted, time_limit, silence_timeout, handover, idle, upstream_unavailable, server_shutdown","type":["string","null"]},"seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"turns":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"avg_latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Average time from the caller stopping to the first audio of the answer"},"cost_usd":{"type":"string","description":"US dollars as a decimal string with 6 decimals"},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"units":{"type":"number"},"cost_usd":{"type":"string","description":"US dollars as a decimal string with 6 decimals"}},"required":["units","cost_usd"],"additionalProperties":false}},"created_at":{"type":"string"},"client_secret":{"type":"string","description":"One-time secret to join the call (within 60 s). Keep it out of logs."},"url":{"type":"string","description":"wss:// URL to join from a browser or app (secret in the query string)"},"stream_url":{"type":"string","description":"wss:// URL with the secret in the path, for Twilio-style media streams"},"webhook_secret":{"description":"Signs tool-call webhooks (RelayPoint-Signature), when tool_webhook_url is set","type":"string"}},"required":["object","id","model","status","voice","language","transport","audio_format","sample_rate","max_minutes","max_duration_seconds","silence_timeout_seconds","tools","metadata","engine","expires_at","started_at","ended_at","end_reason","seconds","turns","avg_latency_ms","cost_usd","usage","created_at","client_secret","url","stream_url"],"additionalProperties":false},"VoiceLiveSessionList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceLiveSession"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["job.completed","job.failed","balance.low","order.paid","order.failed","connection.created","connection.expired","connection.disconnected","social.post.published","social.post.failed","social.post.pending_approval","whatsapp.message.received","whatsapp.message.status","sub_account.cap_reached","video_avatar.completed","video_avatar.failed","catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status","*"]}},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","url","events","description","enabled","created"],"additionalProperties":false},"WebhookEndpointDetail":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["job.completed","job.failed","balance.low","order.paid","order.failed","connection.created","connection.expired","connection.disconnected","social.post.published","social.post.failed","social.post.pending_approval","whatsapp.message.received","whatsapp.message.status","sub_account.cap_reached","video_avatar.completed","video_avatar.failed","catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status","*"]}},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"recent_deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event_id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_status_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_attempt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","event_id","type","status","attempts","last_status_code","next_attempt","created"],"additionalProperties":false}}},"required":["id","object","url","events","description","enabled","created","recent_deliveries"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"WebhookEndpointWithSecret":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["job.completed","job.failed","balance.low","order.paid","order.failed","connection.created","connection.expired","connection.disconnected","social.post.published","social.post.failed","social.post.pending_approval","whatsapp.message.received","whatsapp.message.status","sub_account.cap_reached","video_avatar.completed","video_avatar.failed","catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status","*"]}},"description":{"type":["string","null"]},"enabled":{"type":"boolean"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"secret":{"type":"string","description":"whsec_… signing secret, shown only here"}},"required":["id","object","url","events","description","enabled","created","secret"],"additionalProperties":false},"WebhookTest":{"type":"object","properties":{"object":{"type":"string","const":"webhook_test"},"endpoint":{"type":"string"},"delivery_id":{"type":["string","null"]}},"required":["object","endpoint","delivery_id"],"additionalProperties":false},"ConnectSession":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"connect_session"},"end_user_id":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"providers":{"type":"array","items":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]}},"status":{"type":"string","enum":["open","expired"]},"token":{"description":"cst_…: only in the create response. Pass it to RelayPointConnect.open() in the browser.","type":"string"},"url":{"description":"The hosted connect page (full-page mode): only in the create response","type":"string"},"connections":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","end_user_id","mode","providers","status","connections","expires_at","created"],"additionalProperties":false},"HubLink":{"type":"object","properties":{"object":{"type":"string","const":"hub_link"},"url":{"type":"string","description":"Redirect the person to it; it works once"},"end_user_id":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"expires_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["object","url","end_user_id","mode","expires_at"],"additionalProperties":false},"ConnectStatus":{"type":"object","properties":{"object":{"type":"string","const":"connect_status"},"account":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"mode":{"type":"string","enum":["live","test"]},"package_active":{"type":"boolean","description":"Always true in test mode"},"publishable_key":{"anyOf":[{"type":"object","properties":{"valid":{"type":"boolean"},"mode":{"anyOf":[{"type":"string","enum":["live","test"]},{"type":"null"}]},"origin_allowed":{"type":["boolean","null"]},"allowed_origins":{"type":"array","items":{"type":"string"}}},"required":["valid","mode","origin_allowed","allowed_origins"],"additionalProperties":false},{"type":"null"}]},"script_url":{"type":"string"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]},"catalog_slug":{"type":"string"},"available":{"type":"boolean"},"reason":{"anyOf":[{"type":"string","enum":["not_enabled","not_configured","awaiting_platform_approval","x_key_required"]},{"type":"null"}]},"notes":{"type":"array","items":{"type":"string"}}},"required":["provider","catalog_slug","available","reason","notes"],"additionalProperties":false}}},"required":["object","account","mode","package_active","publishable_key","script_url","providers"],"additionalProperties":false},"ConnectSettings":{"type":"object","properties":{"object":{"type":"string","const":"connect_settings"},"approval_required":{"type":"boolean"},"ai_assist_enabled":{"type":"boolean"},"timezone":{"type":"string"},"x_client_id":{"type":["string","null"]},"x_client_secret_set":{"type":"boolean"},"x_use_relaypoint_app":{"type":"boolean"}},"required":["object","approval_required","ai_assist_enabled","timezone","x_client_id","x_client_secret_set","x_use_relaypoint_app"],"additionalProperties":false},"EndUser":{"type":"object","properties":{"object":{"type":"string","const":"end_user"},"end_user_id":{"type":"string"},"display_name":{"type":["string","null"]},"role":{"type":"string","enum":["member","drafter","approver"]}},"required":["object","end_user_id","display_name","role"],"additionalProperties":false},"EndUserList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EndUser"}}},"required":["object","data"],"additionalProperties":false},"ClientConnectionList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"anyOf":[{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]},{"type":"null"}]},"account_label":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","provider","account_label","status"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"SocialAccountList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"connection":{"type":"string"},"provider":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]},"account_label":{"type":["string","null"]},"status":{"type":"string"},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"],"additionalProperties":false}},"error":{"type":["string","null"]}},"required":["connection","provider","account_label","status","destinations","error"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"SocialPost":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"social_post"},"end_user_id":{"type":"string"},"author_end_user_id":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"text":{"type":"string"},"title":{"type":["string","null"]},"hashtags":{"type":"array","items":{"type":"string"}},"image_url":{"type":["string","null"]},"video_url":{"type":["string","null"]},"media":{"type":"array","items":{"type":"string"}},"link_url":{"type":["string","null"]},"overrides":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["draft","pending_approval","rejected","scheduled","publishing","published","partially_published","failed","canceled"]},"scheduled_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"approved_by":{"type":["string","null"]},"approved_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"rejected_reason":{"type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"targets":{"type":"array","items":{"type":"object","properties":{"connection":{"type":"string"},"provider":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]},"destination":{"type":"string"},"destination_name":{"type":["string","null"]},"status":{"type":"string","enum":["pending","queued","processing","published","failed"]},"external_id":{"description":"The network's post id (test_… in test mode)","type":["string","null"]},"url":{"type":["string","null"]},"privacy":{"type":["string","null"]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_attempt_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}],"description":"queued: when it is retried (rate limits and outages: after 2, 10 and 30 minutes; YouTube quota: after the daily reset)"},"metrics":{"anyOf":[{"type":"object","properties":{"impressions":{"type":"number"},"reach":{"type":"number"},"engagement":{"type":"number"},"clicks":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"views":{"type":"number"}},"additionalProperties":false},{"type":"null"}]}},"required":["connection","provider","destination","destination_name","status","external_id","url","privacy","error","attempts","next_attempt_at","metrics"],"additionalProperties":false}}},"required":["id","object","end_user_id","author_end_user_id","mode","text","title","hashtags","image_url","video_url","media","link_url","overrides","status","scheduled_at","published_at","approved_by","approved_at","rejected_reason","created","targets"],"additionalProperties":false},"SocialPostList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SocialPost"}}},"required":["object","data"],"additionalProperties":false},"SocialPostValidation":{"type":"object","properties":{"object":{"type":"string","const":"social_post_validation"},"ok":{"type":"boolean"},"media":{"type":["string","null"]},"targets":{"type":"array","items":{"type":"object","properties":{"connection":{"type":"string"},"provider":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]},"destination":{"type":"string"},"destination_name":{"type":["string","null"]},"ok":{"type":"boolean"},"text":{"type":"string","description":"The text as it will be published (adapted)"},"title":{"type":["string","null"]},"link_url":{"type":["string","null"]},"privacy":{"type":["string","null"]},"media":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["image","video"]},"adapt":{"type":"array","items":{"type":"string"}}},"required":["kind","adapt"],"additionalProperties":false},{"type":"null"}]},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"description":"e.g. media_required, media_type, title_required, video_too_large, empty"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"description":"e.g. text_shortened, hashtags_trimmed, too_many_hashtags, link_not_clickable, image_cropped, image_resized, media_dropped, title_from_text, tiktok_private_only"}},"required":["connection","provider","destination","destination_name","ok","text","title","link_url","privacy","media","errors","warnings"],"additionalProperties":false}}},"required":["object","ok","media","targets"],"additionalProperties":false},"SocialAssist":{"type":"object","properties":{"object":{"type":"string","const":"social_assist"},"task":{"type":"string"},"text":{"type":"string"},"hashtags":{"type":"array","items":{"type":"string"}},"model":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"cost_usd":{"type":"string","description":"Charged to your AI Credits (0 in test mode)"}},"required":["object","task","text","hashtags","model","mode","cost_usd"],"additionalProperties":false},"BestTimes":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]},"basis":{"type":"string","enum":["history","default"]},"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 = Monday … 7 = Sunday"},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["weekday","hour"],"additionalProperties":false}},"next":{"type":"array","items":{"type":"string","format":"date-time"}}},"required":["provider","basis","timezone","slots","next"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"SocialAnalytics":{"type":"object","properties":{"object":{"type":"string","const":"social_analytics"},"from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"to":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"group_by":{"type":"string","enum":["provider","connection","end_user"]},"totals":{"type":"object","properties":{"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"impressions":{"type":"number"},"reach":{"type":"number"},"engagement":{"type":"number"},"clicks":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"views":{"type":"number"}},"required":["posts","impressions","reach","engagement","clicks","likes","comments","shares","views"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"impressions":{"type":"number"},"reach":{"type":"number"},"engagement":{"type":"number"},"clicks":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"},"views":{"type":"number"},"key":{"type":"string"},"provider":{"type":"string"},"label":{"type":"string"}},"required":["posts","impressions","reach","engagement","clicks","likes","comments","shares","views","key"],"additionalProperties":false}}},"required":["object","from","to","group_by","totals","data"],"additionalProperties":false},"Media":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"media"},"end_user_id":{"type":"string"},"kind":{"type":"string","enum":["image","video"]},"source":{"type":"string"},"name":{"type":["string","null"]},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"drive_file_id":{"type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","end_user_id","kind","source","name","mime_type","size","width","height","drive_file_id","created"],"additionalProperties":false},"MediaList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Media"}}},"required":["object","data"],"additionalProperties":false},"MediaDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"media"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":false},"DriveFile":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"drive_file"},"name":{"type":"string"},"mime_type":{"type":"string"},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"modified":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"web_url":{"type":["string","null"]},"icon_url":{"type":["string","null"]},"thumbnail_url":{"type":["string","null"]}},"required":["id","object","name","mime_type","size","modified","web_url","icon_url","thumbnail_url"],"additionalProperties":false},"DriveFileList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DriveFile"}},"next_page_token":{"type":["string","null"]}},"required":["object","data","next_page_token"],"additionalProperties":false},"WhatsAppTemplateList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"status":{"type":"string"},"components":{"type":"array","items":{}}},"required":["name","language"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"WhatsAppContact":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"whatsapp_contact"},"phone":{"type":"string"},"name":{"type":["string","null"]},"opted_in":{"type":"boolean"},"opt_in":{"anyOf":[{"type":"object","properties":{"at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},"source":{"type":["string","null"]},"proof":{"type":["string","null"]}},"required":["at","source","proof"],"additionalProperties":false},{"type":"null"}]},"opted_out_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"},{"type":"null"}]},"window_open":{"type":"boolean","description":"Free-form text is allowed (within 24 hours of the contact's last message)"},"unread":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","phone","name","opted_in","opt_in","opted_out_at","last_inbound_at","window_open","unread"],"additionalProperties":false},"WhatsAppContactList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppContact"}}},"required":["object","data"],"additionalProperties":false},"WhatsAppMessage":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"whatsapp_message"},"contact":{"type":"string"},"direction":{"type":"string","enum":["in","out"]},"type":{"type":"string"},"text":{"type":["string","null"]},"template":{"type":["string","null"]},"status":{"type":"string","description":"queued, sent, delivered, read, failed or received"},"error":{"type":["string","null"]},"broadcast":{"type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","contact","direction","type","text","template","status","error","broadcast","created"],"additionalProperties":false},"WhatsAppConversation":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppMessage"}},"contact":{"$ref":"#/components/schemas/WhatsAppContact"}},"required":["object","data","contact"],"additionalProperties":false},"WhatsAppBroadcast":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"whatsapp_broadcast"},"template":{"type":"string"},"language":{"type":"string"},"status":{"type":"string","description":"queued, sending, done or canceled"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds"}},"required":["id","object","template","language","status","total","sent","failed","skipped","created"],"additionalProperties":false},"ToolDefinition":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":10000},"parameters":{"description":"JSON Schema of the arguments","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["name"]}},"required":["type","function"]},"ChatRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":100,"description":"RelayPoint product id, e.g. rp/text-pro"},"messages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"anyOf":[{"anyOf":[{"type":"string","maxLength":200000},{"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"object","properties":{"url":{"type":"string","maxLength":10000000}},"required":["url"]}},"required":["type","image_url"]}]}}]},{"type":"null"}]},"name":{"type":"string","maxLength":64},"tool_call_id":{"description":"role tool: the id of the tool call this message answers","type":"string","maxLength":100},"tool_calls":{"description":"role assistant: the tool calls of an earlier answer, sent back as they came","maxItems":128,"type":"array","items":{"$ref":"#/components/schemas/ToolCall"}}},"required":["role","content"]}},"max_tokens":{"type":"integer","minimum":1,"maximum":32768},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":32768},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"stop":{"anyOf":[{"type":"string","maxLength":200},{"maxItems":4,"type":"array","items":{"type":"string","maxLength":200}}]},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stream":{"type":"boolean"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_object"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":10000},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["name"]}},"required":["type","json_schema"]}]},"tools":{"description":"Functions the model may call. Not supported with stream: true.","maxItems":128,"type":"array","items":{"$ref":"#/components/schemas/ToolDefinition"}},"tool_choice":{"description":"Default auto when tools are sent","anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"required":["name"]}},"required":["type","function"]}]},"parallel_tool_calls":{"description":"false asks for at most one tool call per answer","type":"boolean"},"provider":{"description":"Text products: who serves this request. relaypoint = RelayPoint open models (prepaid credits); anthropic / openai = your own key (only the platform fee is charged). Default: your routing preference.","type":"string","enum":["relaypoint","anthropic","openai"]},"user":{"type":"string","maxLength":200}},"required":["model","messages"]},"EmbeddingsRequest":{"type":"object","properties":{"model":{"default":"rp/embed","type":"string","minLength":1,"maxLength":100},"input":{"anyOf":[{"type":"string","minLength":1,"maxLength":100000},{"minItems":1,"maxItems":2048,"type":"array","items":{"type":"string","minLength":1,"maxLength":100000}}]},"encoding_format":{"default":"float","type":"string","enum":["float","base64"]},"user":{"type":"string","maxLength":200}},"required":["input"]},"ImageRequest":{"type":"object","properties":{"model":{"default":"rp/image","type":"string","minLength":1,"maxLength":100},"prompt":{"type":"string","minLength":1,"maxLength":4000},"n":{"default":1,"type":"integer","minimum":1,"maximum":4},"size":{"default":"1024x1024","type":"string","enum":["256x256","512x512","768x768","1024x1024","1024x1792","1792x1024"]},"response_format":{"default":"url","type":"string","enum":["url","b64_json"]},"user":{"type":"string","maxLength":200}},"required":["prompt"]},"SpeechRequest":{"type":"object","properties":{"model":{"default":"rp/tts","type":"string","minLength":1,"maxLength":100},"input":{"type":"string","minLength":1,"maxLength":20000},"segments":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000},"emotion":{"type":"string","enum":["neutral","warm","cheerful","excited","calm","empathetic","apologetic","serious","confident","reassuring","sad"]},"pace":{"type":"string","enum":["slow","relaxed","normal","brisk","fast"]},"energy":{"type":"string","enum":["low","normal","high"]}},"required":["text"],"additionalProperties":false}},"style":{"type":"object","properties":{"emotion":{"type":"string","enum":["neutral","warm","cheerful","excited","calm","empathetic","apologetic","serious","confident","reassuring","sad"]},"pace":{"type":"string","enum":["slow","relaxed","normal","brisk","fast"]},"energy":{"type":"string","enum":["low","normal","high"]}},"additionalProperties":false},"normalize":{"type":"boolean"},"language":{"type":"string","pattern":"^[a-z]{2}([-_][A-Za-z]{2})?$"},"voice":{"default":"default","type":"string","minLength":1,"maxLength":64},"response_format":{"default":"mp3","type":"string","enum":["wav","mp3","pcm","mulaw"]},"stream":{"type":"boolean"},"timings":{"type":"boolean"},"pronunciations":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100},"say":{"type":"string","minLength":1,"maxLength":200}},"required":["text","say"]}}}},"VoiceLiveSessionCreate":{"type":"object","properties":{"model":{"default":"rp/voice-live","type":"string","const":"rp/voice-live"},"instructions":{"default":"You are a friendly, helpful assistant.","type":"string","maxLength":16000},"voice":{"default":"default","type":"string","maxLength":64},"language":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2})?$"},"tools":{"default":[],"maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","enum":["save_lead","book_meeting","hand_over"]},{"type":"object","properties":{"type":{"default":"function","type":"string","const":"function"},"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":1000},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"]}]}},"audio_format":{"type":"string","enum":["pcm16","mulaw"]},"transport":{"default":"websocket","type":"string","enum":["websocket","twilio"]},"max_minutes":{"default":30,"type":"integer","minimum":1,"maximum":120},"max_duration_seconds":{"type":"integer","minimum":10,"maximum":7200},"silence_timeout_seconds":{"default":30,"type":"integer","minimum":0,"maximum":600},"end_of_turn_ms":{"default":450,"type":"integer","minimum":200,"maximum":2000},"end_of_turn":{"type":"object","properties":{"mode":{"default":"semantic","type":"string","enum":["semantic","silence"]},"min_ms":{"default":250,"type":"integer","minimum":150,"maximum":1000},"max_ms":{"default":1400,"type":"integer","minimum":500,"maximum":3000}},"additionalProperties":false},"fillers":{"type":"boolean"},"backchannels":{"type":"boolean"},"affective_dialog":{"default":true,"type":"boolean"},"proactive_audio":{"default":true,"type":"boolean"},"normalize":{"default":true,"type":"boolean"},"phone_band":{"default":"auto","anyOf":[{"type":"string","const":"auto"},{"type":"boolean"}]},"greeting":{"type":"string","maxLength":500},"tool_webhook_url":{"type":"string","maxLength":2000},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}}},"additionalProperties":false},"TranscriptionUpload":{"type":"object","properties":{"model":{"default":"rp/stt","type":"string","minLength":1,"maxLength":100},"language":{"type":"string","minLength":2,"maxLength":12},"response_format":{"default":"json","type":"string","enum":["json","text","verbose_json"]},"diarize":{"type":"string","enum":["true","false"]},"num_speakers":{"type":"integer","minimum":1,"maximum":32},"file":{"type":"string","description":"The audio file (multipart file field), up to 25 MB","format":"binary","contentMediaType":"application/octet-stream"}},"required":["file"]},"JobRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":100},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Product-specific input: rp/video-avatar → JobInput_rp_video_avatar, rp/video-gen → JobInput_rp_video_gen, rp/tts → JobInput_rp_tts, rp/voice-clone → JobInput_rp_voice_clone, rp/tts-standard → JobInput_rp_tts_standard, rp/image-pro → JobInput_rp_image_pro, rp/video-pro → JobInput_rp_video_pro, rp/video-avatar-pro-house → JobInput_rp_video_avatar_pro_house, rp/music → JobInput_rp_music, rp/tts-premium → JobInput_rp_tts_premium, rp/ocr → JobInput_rp_ocr, rp/video-avatar-pro → JobInput_rp_video_avatar_pro, rp/video-translate → JobInput_rp_video_translate, rp/tts-pro → JobInput_rp_tts_pro, rp/voice-clone-pro → JobInput_rp_voice_clone_pro.","x-job-inputs":{"rp/video-avatar":{"$ref":"#/components/schemas/JobInput_rp_video_avatar"},"rp/video-gen":{"$ref":"#/components/schemas/JobInput_rp_video_gen"},"rp/tts":{"$ref":"#/components/schemas/JobInput_rp_tts"},"rp/voice-clone":{"$ref":"#/components/schemas/JobInput_rp_voice_clone"},"rp/tts-standard":{"$ref":"#/components/schemas/JobInput_rp_tts_standard"},"rp/image-pro":{"$ref":"#/components/schemas/JobInput_rp_image_pro"},"rp/video-pro":{"$ref":"#/components/schemas/JobInput_rp_video_pro"},"rp/video-avatar-pro-house":{"$ref":"#/components/schemas/JobInput_rp_video_avatar_pro_house"},"rp/music":{"$ref":"#/components/schemas/JobInput_rp_music"},"rp/tts-premium":{"$ref":"#/components/schemas/JobInput_rp_tts_premium"},"rp/ocr":{"$ref":"#/components/schemas/JobInput_rp_ocr"},"rp/video-avatar-pro":{"$ref":"#/components/schemas/JobInput_rp_video_avatar_pro"},"rp/video-translate":{"$ref":"#/components/schemas/JobInput_rp_video_translate"},"rp/tts-pro":{"$ref":"#/components/schemas/JobInput_rp_tts_pro"},"rp/voice-clone-pro":{"$ref":"#/components/schemas/JobInput_rp_voice_clone_pro"}}},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500}}},"required":["model","input"]},"LinkCreate":{"type":"object","properties":{"catalog_slug":{"type":"string","minLength":1,"maxLength":120,"description":"Catalogue item, e.g. gmail (see GET /v1/catalog)"},"label":{"type":"string","maxLength":120},"redirect_url":{"description":"Where the account owner is sent after connecting","type":"string","maxLength":2000,"format":"uri"},"expires_in_hours":{"default":72,"type":"integer","minimum":1,"maximum":720}},"required":["catalog_slug"]},"ManualCreate":{"type":"object","properties":{"catalog_slug":{"type":"string","minLength":1,"maxLength":120},"credentials":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"string","maxLength":4000},"description":"The item's fields (see `fields` in GET /v1/catalog)"}},"required":["catalog_slug","credentials"]},"ConnectionRequest":{"type":"object","properties":{"method":{"default":"GET","type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","minLength":1,"maxLength":2000,"description":"Path on the provider's API host (e.g. /v1.0/me) or a full https URL on an allowed host"},"query":{"type":"object","propertyNames":{"type":"string","maxLength":200},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":4000}}]}},"headers":{"description":"Only accept, content-type, if-match, if-none-match, prefer and a few provider headers are forwarded","type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"string","maxLength":500}},"body":{"description":"JSON body (objects are sent as application/json; strings as given)"}},"required":["path"]},"SubAccountCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"external_ref":{"description":"Your own customer id (unique per reseller)","type":"string","minLength":1,"maxLength":120},"monthly_cap_usd":{"anyOf":[{"type":"number","minimum":0,"maximum":10000000},{"type":"null"}]},"markup_profile_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"description":"ISO 3166-1 alpha-2","type":"string","minLength":2,"maxLength":2},"billing_email":{"anyOf":[{"type":"string","maxLength":200,"format":"email"},{"type":"null"}]}},"required":["name"]},"SubAccountUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"external_ref":{"description":"Your own customer id (unique per reseller)","type":"string","minLength":1,"maxLength":120},"monthly_cap_usd":{"anyOf":[{"type":"number","minimum":0,"maximum":10000000},{"type":"null"}]},"markup_profile_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"description":"ISO 3166-1 alpha-2","type":"string","minLength":2,"maxLength":2},"billing_email":{"anyOf":[{"type":"string","maxLength":200,"format":"email"},{"type":"null"}]},"status":{"type":"string","enum":["active","suspended"]}}},"TransferRequest":{"type":"object","properties":{"amount_usd":{"type":"number","exclusiveMinimum":0,"maximum":10000000},"direction":{"default":"to_sub_account","type":"string","enum":["to_sub_account","to_parent"]},"memo":{"type":"string","maxLength":200}},"required":["amount_usd"]},"EndpointCreate":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"events":{"default":["*"],"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","enum":["job.completed","job.failed","balance.low","order.paid","order.failed","connection.created","connection.expired","connection.disconnected","social.post.published","social.post.failed","social.post.pending_approval","whatsapp.message.received","whatsapp.message.status","sub_account.cap_reached","video_avatar.completed","video_avatar.failed","catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status","*"]}},"description":{"type":"string","maxLength":200}},"required":["url"]},"EndpointUpdate":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"events":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","enum":["job.completed","job.failed","balance.low","order.paid","order.failed","connection.created","connection.expired","connection.disconnected","social.post.published","social.post.failed","social.post.pending_approval","whatsapp.message.received","whatsapp.message.status","sub_account.cap_reached","video_avatar.completed","video_avatar.failed","catalog.updated","pricing.updated","packs.updated","plans.updated","voices.updated","limits.updated","account.updated","service.status","*"]}},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"enabled":{"type":"boolean"}}},"SpeechProRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","const":"elevenlabs"},"input":{"type":"string","minLength":1,"maxLength":10000},"voice":{"type":"string","minLength":1,"maxLength":120,"description":"An ElevenLabs voice id of the account (see GET /v1/byok/elevenlabs/voices)"},"response_format":{"default":"mp3","type":"string","enum":["mp3","wav","opus"]},"elevenlabs_model":{"default":"eleven_multilingual_v2","type":"string","pattern":"^[a-z0-9_]{3,60}$"},"language_code":{"type":"string","minLength":2,"maxLength":8}},"required":["model","input","voice"]},"CharacterCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":3,"maxLength":800},"clothing":{"default":"","type":"string","maxLength":300},"style":{"default":"realistic","type":"string","enum":["realistic","studio","cinematic","illustrated"]},"background":{"default":"","type":"string","maxLength":300},"gender":{"type":"string","enum":["female","male"]},"voice_id":{"type":"string","maxLength":64}},"required":["name","description"]},"CharacterVariant":{"type":"object","properties":{"clothing":{"type":"string","maxLength":300},"background":{"type":"string","maxLength":300}}},"CharacterTrainUpload":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"gender":{"type":"string","enum":["female","male"]},"age":{"type":"integer","minimum":1,"maximum":120},"role":{"type":"string","maxLength":120},"voice_id":{"type":"string","maxLength":64},"consent":{"type":"string","minLength":2,"maxLength":4000},"photos[]":{"minItems":3,"maxItems":10,"type":"array","items":{"type":"string","format":"binary","contentMediaType":"image/*"},"description":"3–10 photos (multipart file fields)"}},"required":["name","gender","consent","photos[]"]},"ScriptRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":4000},"style":{"default":"auto","type":"string","enum":["auto","advertisement","informative","storytelling","tutorial","sales","announcement"]},"length_seconds":{"default":30,"type":"integer","minimum":5,"maximum":600},"language":{"default":"en","type":"string","minLength":2,"maxLength":12}},"required":["prompt"]},"VideoAvatarPlanRequest":{"type":"object","properties":{"script":{"type":"string","minLength":1,"maxLength":20000},"language":{"default":"en","type":"string","minLength":2,"maxLength":12},"mode":{"default":"character_only","type":"string","enum":["character_only","character_visuals"]}},"required":["script"]},"VideoAvatarRequest":{"type":"object","properties":{"mode":{"default":"character_only","type":"string","enum":["character_only","character_visuals"]},"character_id":{"type":"string","minLength":1,"maxLength":64},"image_url":{"type":"string","maxLength":2000,"format":"uri"},"script":{"type":"string","minLength":1,"maxLength":20000},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"voice_id":{"type":"string","maxLength":64},"language":{"default":"en","type":"string","minLength":2,"maxLength":12},"aspect_ratio":{"default":"16:9","type":"string","enum":["9:16","16:9","1:1"]},"framing":{"default":"presenter","type":"string","enum":["head","presenter"]},"quality":{"default":"ultra","type":"string","enum":["ultra","standard"]},"resolution":{"default":"1080p","type":"string","enum":["480p","720p","1080p"]},"background":{"type":"object","properties":{"type":{"type":"string","enum":["character","color","image","blur"]},"value":{"type":"string","maxLength":2000}},"required":["type"]},"media":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","slide","logo"]},"url":{"type":"string","maxLength":2000,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":120},"bullets":{"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"slide":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"bullets":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}}},"required":["title"]},"start_s":{"type":"number","minimum":0,"maximum":3600},"end_s":{"type":"number","minimum":0,"maximum":3600},"layout":{"default":"fullscreen","type":"string","enum":["fullscreen","side","pip","lower-third"]}},"required":["type","start_s","end_s"]}},"scenes":{"minItems":1,"maxItems":120,"type":"array","items":{"type":"object","properties":{"start_s":{"default":0,"type":"number","minimum":0,"maximum":3600},"end_s":{"default":0,"type":"number","minimum":0,"maximum":3600},"text":{"type":"string","minLength":1,"maxLength":2000},"visual_prompt":{"default":"","type":"string","maxLength":1000},"layout":{"type":"string","enum":["presenter","fullscreen","side","pip"]}},"required":["text"]}},"visuals_motion":{"default":false,"type":"boolean"},"captions":{"type":"object","properties":{"on":{"default":true,"type":"boolean"},"style":{"default":"classic","type":"string","enum":["classic","bold","minimal"]}}},"music":{"type":"object","properties":{"track_id":{"type":"string","enum":["calm","bright","warm","pulse"]},"volume":{"default":0.15,"type":"number","minimum":0,"maximum":1}},"required":["track_id"]},"max_seconds":{"type":"integer","minimum":1,"maximum":3600},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}},"pronunciations":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100},"say":{"type":"string","minLength":1,"maxLength":200}},"required":["text","say"]}}}},"VideoAvatarSettingsUpdate":{"type":"object","properties":{"watermark":{"type":"boolean"}},"required":["watermark"]},"ConnectSessionCreate":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"providers":{"default":"all","description":"\"all\" (the providers available to the account) or a list","anyOf":[{"type":"string","const":"all"},{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["facebook","instagram","linkedin","google_drive","tiktok","youtube","google_business","x","whatsapp"]}}]},"redirect_url":{"description":"Full-page mode: where the browser returns after connecting","type":"string","maxLength":2000,"format":"uri"},"expires_in_minutes":{"default":60,"type":"integer","minimum":5,"maximum":1440}},"required":["end_user_id"]},"HubLinkCreate":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"display_name":{"type":"string","maxLength":120},"return_url":{"description":"The hub's back link (your portal)","type":"string","maxLength":2000,"format":"uri"},"expires_in_minutes":{"default":10,"type":"integer","minimum":1,"maximum":60}},"required":["end_user_id"]},"EndUserUpdate":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"role":{"description":"drafter: posts wait for an approver when approvals are on","type":"string","enum":["member","drafter","approver"]}}},"ConnectSettingsUpdate":{"type":"object","properties":{"approval_required":{"type":"boolean"},"ai_assist_enabled":{"type":"boolean"},"timezone":{"description":"IANA time zone, e.g. Africa/Johannesburg","type":"string","maxLength":64},"x_client_id":{"description":"Your own X developer app (OAuth 2.0 client id). Callback URL to register: <app>/connect/callback","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"x_client_secret":{"description":"Stored encrypted; never returned","anyOf":[{"type":"string","maxLength":400},{"type":"null"}]},"x_use_relaypoint_app":{"description":"Without your own key: use RelayPoint's X app (monthly post cap per account)","type":"boolean"}}},"SocialPostCreate":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Whose connections it posts to"},"author_end_user_id":{"description":"Who wrote it (default end_user_id). A drafter's post waits for an approver.","type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},"text":{"default":"","type":"string","maxLength":10000},"title":{"description":"YouTube title (default: the first line of the text)","type":"string","maxLength":100},"hashtags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":100}},"image_url":{"type":"string","maxLength":2000,"format":"uri"},"video_url":{"type":"string","maxLength":2000,"format":"uri"},"media":{"description":"A media library id (POST /v1/social/media) instead of image_url / video_url","maxItems":1,"type":"array","items":{"type":"string","maxLength":64}},"link_url":{"type":"string","maxLength":2000,"format":"uri"},"overrides":{"description":"Per network (facebook, instagram…) or per connection id: text, hashtags, link_url, title","type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","properties":{"text":{"type":"string","maxLength":10000},"hashtags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":100}},"link_url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"title":{"type":"string","maxLength":100}}}},"targets":{"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"string","enum":["facebook","instagram","linkedin","tiktok","youtube","google_business","x"]},{"type":"object","properties":{"connection":{"type":"string","maxLength":64},"destination":{"type":"string","maxLength":200}},"required":["connection"]}]}},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}],"description":"ISO 8601 or unix seconds"},"privacy":{"description":"YouTube: public, unlisted, private. TikTok: SELF_ONLY until RelayPoint's TikTok audit passes.","type":"string","maxLength":40},"draft":{"description":"Save without publishing (POST /v1/social/posts/{id}/submit later)","type":"boolean"}},"required":["end_user_id","targets"]},"SocialPostApprove":{"type":"object","properties":{"approver_end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"}},"required":["approver_end_user_id"]},"SocialPostReject":{"type":"object","properties":{"approver_end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"reason":{"type":"string","maxLength":500}},"required":["approver_end_user_id"]},"SocialAssistRequest":{"type":"object","properties":{"task":{"type":"string","enum":["caption","hashtags","rewrite","translate","listing_to_post"]},"text":{"type":"string","maxLength":4000},"listing":{"description":"listing_to_post: the property's details (title, price, bedrooms, suburb, features…)","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tone":{"type":"string","enum":["professional","friendly","enthusiastic","luxury","concise"]},"language":{"type":"string","enum":["en","fr","pt"]},"provider":{"description":"Write for this network's limits","type":"string","enum":["facebook","instagram","linkedin","tiktok","youtube","google_business","x"]}},"required":["task"]},"SocialMediaFromUrl":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["end_user_id","url"]},"SocialMediaUpload":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"file":{"type":"string","description":"The image or video (multipart file field). Or send JSON (SocialMediaFromUrl) instead.","format":"binary","contentMediaType":"application/octet-stream"},"name":{"type":"string","maxLength":200}},"required":["end_user_id","file"]},"DriveUpload":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"file":{"type":"string","description":"The file (multipart file field), at most 10 MB","format":"binary","contentMediaType":"application/octet-stream"},"connection":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":200},"folder_id":{"type":"string","maxLength":200}},"required":["end_user_id","file"]},"DriveImport":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"connection":{"type":"string","maxLength":64},"file_id":{"type":"string","maxLength":200}},"required":["end_user_id","file_id"]},"WhatsAppContactCreate":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"connection":{"type":"string","maxLength":64},"phone":{"type":"string","maxLength":32,"description":"International format, e.g. +27821234567"},"name":{"type":"string","maxLength":120},"opt_in":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":200,"description":"Where they opted in (e.g. website enquiry form)"},"proof":{"type":"string","minLength":1,"maxLength":2000,"description":"What they agreed to and how (checkbox wording, form URL, timestamp, message id…)"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}],"description":"ISO 8601 or unix seconds"}},"required":["source","proof"]}},"required":["end_user_id","phone"]},"WhatsAppMessageSend":{"anyOf":[{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"connection":{"type":"string","maxLength":64},"contact":{"type":"string","maxLength":64},"template":{"type":"object","properties":{"name":{"type":"string","maxLength":512},"language":{"default":"en","type":"string","maxLength":15},"components":{"maxItems":20,"type":"array","items":{}}},"required":["name"]}},"required":["end_user_id","contact","template"]},{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"connection":{"type":"string","maxLength":64},"contact":{"type":"string","maxLength":64},"text":{"type":"string","minLength":1,"maxLength":4096}},"required":["end_user_id","contact","text"]}]},"WhatsAppBroadcastCreate":{"type":"object","properties":{"end_user_id":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your own id for the person or entity (e.g. agent_123, company)"},"connection":{"type":"string","maxLength":64},"template":{"type":"object","properties":{"name":{"type":"string","maxLength":512},"language":{"default":"en","type":"string","maxLength":15},"components":{"maxItems":20,"type":"array","items":{}}},"required":["name"]},"contacts":{"description":"Default: every opted-in contact","maxItems":500,"type":"array","items":{"type":"string","maxLength":64}}},"required":["end_user_id","template"]},"JobInput_rp_video_avatar":{"type":"object","properties":{"image_url":{"type":"string","maxLength":2000,"format":"uri"},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"text":{"type":"string","minLength":1,"maxLength":5000},"voice":{"type":"string","maxLength":64},"resolution":{"default":"720p","type":"string","enum":["480p","720p","1080p"]},"max_duration_seconds":{"default":60,"type":"integer","minimum":1,"maximum":300}},"required":["image_url"]},"JobInput_rp_video_gen":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":2000},"image_url":{"type":"string","maxLength":2000,"format":"uri"},"duration_seconds":{"default":5,"type":"integer","minimum":1,"maximum":30},"resolution":{"default":"720p","type":"string","enum":["480p","720p","1080p"]},"aspect_ratio":{"default":"16:9","type":"string","enum":["16:9","9:16","1:1"]}},"required":["prompt"]},"JobInput_rp_tts":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000},"voice":{"default":"default","type":"string","maxLength":64},"format":{"default":"mp3","type":"string","enum":["wav","mp3"]},"pronunciations":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100},"say":{"type":"string","minLength":1,"maxLength":200}},"required":["text","say"]}},"style":{"type":"object","properties":{"emotion":{"type":"string","enum":["neutral","warm","cheerful","excited","calm","empathetic","apologetic","serious","confident","reassuring","sad"]},"pace":{"type":"string","enum":["slow","relaxed","normal","brisk","fast"]},"energy":{"type":"string","enum":["low","normal","high"]}},"additionalProperties":false},"normalize":{"type":"boolean"},"language":{"type":"string","pattern":"^[a-z]{2}([-_][A-Za-z]{2})?$"}},"required":["text"]},"JobInput_rp_voice_clone":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80,"description":"A name for the voice (shown to you only)"},"sample_url":{"type":"string","maxLength":2000,"format":"uri","description":"10 s – 3 min of the voice owner speaking alone, no music (WAV, MP3, M4A…)"},"consent_audio_url":{"type":"string","maxLength":2000,"format":"uri","description":"The voice owner reading the consent statement (GET /v1/voice_clones/consent_statement), 2–30 s"},"consent_language":{"default":"en-US","type":"string","enum":["en-US","en-GB","en-AU","en-IN","en-ZA"]},"language":{"default":"en","description":"The language the voice will mostly speak","type":"string","minLength":2,"maxLength":12},"consent":{"type":"object","properties":{"subject_name":{"type":"string","minLength":2,"maxLength":200,"description":"The person whose voice or likeness is used"},"attested_by":{"type":"string","minLength":2,"maxLength":200,"description":"Who confirms the consent (name or email)"},"method":{"type":"string","enum":["written","recorded_verbal","in_app","self"],"description":"How consent was given: written (signed), recorded_verbal, in_app (checkbox in your product), self (the subject is the requester)"},"evidence_file_id":{"description":"Optional: a file id of the signed consent or recording","type":"string","maxLength":80},"attestation":{"type":"boolean","const":true,"description":"The consent checkbox in your product, ticked by the voice owner or for them with their agreement"},"text":{"description":"The wording shown next to the checkbox (default: RelayPoint's standard consent text)","type":"string","minLength":10,"maxLength":1000}},"required":["subject_name","attested_by","method","attestation"]}},"required":["name","sample_url","consent_audio_url","consent"]},"JobInput_rp_tts_standard":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000},"voice":{"default":"default","type":"string","maxLength":64},"format":{"default":"mp3","type":"string","enum":["wav","mp3"]},"pronunciations":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100},"say":{"type":"string","minLength":1,"maxLength":200}},"required":["text","say"]}},"style":{"type":"object","properties":{"emotion":{"type":"string","enum":["neutral","warm","cheerful","excited","calm","empathetic","apologetic","serious","confident","reassuring","sad"]},"pace":{"type":"string","enum":["slow","relaxed","normal","brisk","fast"]},"energy":{"type":"string","enum":["low","normal","high"]}},"additionalProperties":false},"normalize":{"type":"boolean"},"language":{"type":"string","pattern":"^[a-z]{2}([-_][A-Za-z]{2})?$"}},"required":["text"]},"JobInput_rp_image_pro":{"type":"object","properties":{"model":{"description":"A model of this product (GET /v1/models → models); its default when omitted.","type":"string","maxLength":64},"tier":{"description":"Resolution or quality of the model (its tiers in GET /v1/models); the model's default when omitted.","type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":5000},"text":{"description":"Text to speak (rp/tts-premium) or the script a presenter says (models without audio input).","type":"string","minLength":1,"maxLength":15000},"lyrics":{"type":"string","maxLength":3500},"image_urls":{"description":"Reference images (image edits) or the first frame (video).","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"last_image_url":{"type":"string","maxLength":2000,"format":"uri"},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"character_id":{"description":"rp/video-avatar-pro-house: one of your Video Avatar characters (consented) or a stock presenter.","type":"string","maxLength":64},"duration_seconds":{"type":"integer","minimum":1,"maximum":300},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4"]},"num_images":{"default":1,"type":"integer","minimum":1,"maximum":4},"voice":{"type":"string","maxLength":64},"language":{"type":"string","minLength":2,"maxLength":12}},"description":"Input of rp/image-pro (a Pro product): `model` from its list in GET /v1/models, then the fields that model takes."},"JobInput_rp_video_pro":{"type":"object","properties":{"model":{"description":"A model of this product (GET /v1/models → models); its default when omitted.","type":"string","maxLength":64},"tier":{"description":"Resolution or quality of the model (its tiers in GET /v1/models); the model's default when omitted.","type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":5000},"text":{"description":"Text to speak (rp/tts-premium) or the script a presenter says (models without audio input).","type":"string","minLength":1,"maxLength":15000},"lyrics":{"type":"string","maxLength":3500},"image_urls":{"description":"Reference images (image edits) or the first frame (video).","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"last_image_url":{"type":"string","maxLength":2000,"format":"uri"},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"character_id":{"description":"rp/video-avatar-pro-house: one of your Video Avatar characters (consented) or a stock presenter.","type":"string","maxLength":64},"duration_seconds":{"type":"integer","minimum":1,"maximum":300},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4"]},"num_images":{"default":1,"type":"integer","minimum":1,"maximum":4},"voice":{"type":"string","maxLength":64},"language":{"type":"string","minLength":2,"maxLength":12}},"description":"Input of rp/video-pro (a Pro product): `model` from its list in GET /v1/models, then the fields that model takes."},"JobInput_rp_video_avatar_pro_house":{"type":"object","properties":{"model":{"description":"A model of this product (GET /v1/models → models); its default when omitted.","type":"string","maxLength":64},"tier":{"description":"Resolution or quality of the model (its tiers in GET /v1/models); the model's default when omitted.","type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":5000},"text":{"description":"Text to speak (rp/tts-premium) or the script a presenter says (models without audio input).","type":"string","minLength":1,"maxLength":15000},"lyrics":{"type":"string","maxLength":3500},"image_urls":{"description":"Reference images (image edits) or the first frame (video).","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"last_image_url":{"type":"string","maxLength":2000,"format":"uri"},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"character_id":{"description":"rp/video-avatar-pro-house: one of your Video Avatar characters (consented) or a stock presenter.","type":"string","maxLength":64},"duration_seconds":{"type":"integer","minimum":1,"maximum":300},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4"]},"num_images":{"default":1,"type":"integer","minimum":1,"maximum":4},"voice":{"type":"string","maxLength":64},"language":{"type":"string","minLength":2,"maxLength":12}},"description":"Input of rp/video-avatar-pro-house (a Pro product): `model` from its list in GET /v1/models, then the fields that model takes."},"JobInput_rp_music":{"type":"object","properties":{"model":{"description":"A model of this product (GET /v1/models → models); its default when omitted.","type":"string","maxLength":64},"tier":{"description":"Resolution or quality of the model (its tiers in GET /v1/models); the model's default when omitted.","type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":5000},"text":{"description":"Text to speak (rp/tts-premium) or the script a presenter says (models without audio input).","type":"string","minLength":1,"maxLength":15000},"lyrics":{"type":"string","maxLength":3500},"image_urls":{"description":"Reference images (image edits) or the first frame (video).","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"last_image_url":{"type":"string","maxLength":2000,"format":"uri"},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"character_id":{"description":"rp/video-avatar-pro-house: one of your Video Avatar characters (consented) or a stock presenter.","type":"string","maxLength":64},"duration_seconds":{"type":"integer","minimum":1,"maximum":300},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4"]},"num_images":{"default":1,"type":"integer","minimum":1,"maximum":4},"voice":{"type":"string","maxLength":64},"language":{"type":"string","minLength":2,"maxLength":12}},"description":"Input of rp/music (a Pro product): `model` from its list in GET /v1/models, then the fields that model takes."},"JobInput_rp_tts_premium":{"type":"object","properties":{"model":{"description":"A model of this product (GET /v1/models → models); its default when omitted.","type":"string","maxLength":64},"tier":{"description":"Resolution or quality of the model (its tiers in GET /v1/models); the model's default when omitted.","type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":5000},"text":{"description":"Text to speak (rp/tts-premium) or the script a presenter says (models without audio input).","type":"string","minLength":1,"maxLength":15000},"lyrics":{"type":"string","maxLength":3500},"image_urls":{"description":"Reference images (image edits) or the first frame (video).","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"last_image_url":{"type":"string","maxLength":2000,"format":"uri"},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"character_id":{"description":"rp/video-avatar-pro-house: one of your Video Avatar characters (consented) or a stock presenter.","type":"string","maxLength":64},"duration_seconds":{"type":"integer","minimum":1,"maximum":300},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4"]},"num_images":{"default":1,"type":"integer","minimum":1,"maximum":4},"voice":{"type":"string","maxLength":64},"language":{"type":"string","minLength":2,"maxLength":12}},"description":"Input of rp/tts-premium (a Pro product): `model` from its list in GET /v1/models, then the fields that model takes."},"JobInput_rp_ocr":{"type":"object","properties":{"document_url":{"type":"string","maxLength":2000,"format":"uri"},"pages":{"type":"integer","minimum":1,"maximum":500},"max_pages":{"default":50,"type":"integer","minimum":1,"maximum":500},"language":{"type":"string","minLength":2,"maxLength":12},"output_format":{"default":"text","description":"text: plain text (tables as tab-separated lines); markdown_tables: Markdown with tables; json_tables: plain text plus the tables as JSON in result.tables","type":"string","enum":["text","markdown_tables","json_tables"]}},"required":["document_url"]},"JobInput_rp_video_avatar_pro":{"type":"object","properties":{"avatar_id":{"type":"string","minLength":1,"maxLength":120,"description":"A HeyGen avatar (look) id: stock or your own (see GET /v1/byok/heygen/assets)"},"script":{"type":"string","minLength":1,"maxLength":5000},"audio_url":{"type":"string","maxLength":2000,"format":"uri"},"voice_id":{"description":"A HeyGen voice id (required with script unless the avatar has a default voice)","type":"string","minLength":1,"maxLength":120},"background":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"color"},"value":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","const":"image"},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["type","url"]}]},"resolution":{"default":"1080p","type":"string","enum":["720p","1080p","4k"]},"aspect_ratio":{"default":"16:9","type":"string","enum":["16:9","9:16","1:1","4:5","5:4"]},"engine":{"default":"avatar_iv","type":"string","enum":["avatar_iii","avatar_iv","avatar_v"]},"max_duration_seconds":{"default":300,"type":"integer","minimum":1,"maximum":1800},"title":{"type":"string","maxLength":200},"consent":{"description":"Required for your own (custom / digital-twin) avatars","type":"object","properties":{"subject_name":{"type":"string","minLength":2,"maxLength":200,"description":"The person whose voice or likeness is used"},"attested_by":{"type":"string","minLength":2,"maxLength":200,"description":"Who confirms the consent (name or email)"},"method":{"type":"string","enum":["written","recorded_verbal","in_app","self"],"description":"How consent was given: written (signed), recorded_verbal, in_app (checkbox in your product), self (the subject is the requester)"},"evidence_file_id":{"description":"Optional: a file id of the signed consent or recording","type":"string","maxLength":80}},"required":["subject_name","attested_by","method"]},"fallback_image_url":{"description":"Optional: a portrait used by rp/video-avatar if HeyGen is down and fallback is on","type":"string","maxLength":2000,"format":"uri"}},"required":["avatar_id"]},"JobInput_rp_video_translate":{"type":"object","properties":{"video_url":{"type":"string","maxLength":2000,"format":"uri"},"output_language":{"type":"string","minLength":2,"maxLength":60,"description":"Target language as HeyGen names it, e.g. 'Portuguese (Brazil)', 'French', 'English'"},"mode":{"default":"lipsync_speed","type":"string","enum":["audio_only","lipsync_speed","lipsync_precision"]},"input_language":{"type":"string","minLength":2,"maxLength":60},"max_duration_seconds":{"default":600,"type":"integer","minimum":1,"maximum":3600},"title":{"type":"string","maxLength":200}},"required":["video_url","output_language"]},"JobInput_rp_tts_pro":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500000},"voice_id":{"type":"string","minLength":1,"maxLength":120,"description":"An ElevenLabs voice id (see GET /v1/byok/elevenlabs/voices)"},"model":{"default":"eleven_multilingual_v2","type":"string","pattern":"^[a-z0-9_]{3,60}$"},"language_code":{"type":"string","minLength":2,"maxLength":8},"format":{"default":"mp3","type":"string","enum":["mp3","wav","opus"]},"stability":{"type":"number","minimum":0,"maximum":1},"similarity_boost":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0,"maximum":1},"speed":{"type":"number","minimum":0.5,"maximum":2}},"required":["text","voice_id"]},"JobInput_rp_voice_clone_pro":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"sample_urls":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"},"description":"Audio samples of the voice (each up to 10 MB)"},"remove_background_noise":{"default":false,"type":"boolean"},"consent":{"type":"object","properties":{"subject_name":{"type":"string","minLength":2,"maxLength":200,"description":"The person whose voice or likeness is used"},"attested_by":{"type":"string","minLength":2,"maxLength":200,"description":"Who confirms the consent (name or email)"},"method":{"type":"string","enum":["written","recorded_verbal","in_app","self"],"description":"How consent was given: written (signed), recorded_verbal, in_app (checkbox in your product), self (the subject is the requester)"},"evidence_file_id":{"description":"Optional: a file id of the signed consent or recording","type":"string","maxLength":80}},"required":["subject_name","attested_by","method"]}},"required":["name","sample_urls","consent"]}}},"x-error-codes":[{"code":"invalid_request","status":400},{"code":"invalid_json","status":400},{"code":"unknown_product","status":400},{"code":"upstream_rejected","status":400},{"code":"consent_required","status":400},{"code":"content_rejected","status":400},{"code":"video_too_long","status":400},{"code":"provider_unavailable","status":400},{"code":"opt_in_required","status":400},{"code":"unauthorized","status":401},{"code":"invalid_api_key","status":401},{"code":"insufficient_balance","status":402},{"code":"spend_cap_reached","status":402},{"code":"insufficient_provider_credit","status":402},{"code":"package_required","status":402},{"code":"forbidden","status":403},{"code":"feature_disabled","status":403},{"code":"ip_not_allowed","status":403},{"code":"domain_not_allowed","status":403},{"code":"missing_scope","status":403},{"code":"account_suspended","status":403},{"code":"kyc_required","status":403},{"code":"byok_required","status":403},{"code":"not_found","status":404},{"code":"method_not_allowed","status":405},{"code":"conflict","status":409},{"code":"idempotency_conflict","status":409},{"code":"idempotency_mismatch","status":422},{"code":"validation_failed","status":422},{"code":"window_closed","status":409},{"code":"daily_limit_reached","status":429},{"code":"payload_too_large","status":413},{"code":"byok_key_invalid","status":424},{"code":"unsupported_media_type","status":415},{"code":"rate_limited","status":429},{"code":"internal_error","status":500},{"code":"upstream_unavailable","status":503},{"code":"upstream_timeout","status":504}]}