{"openapi":"3.1.0","info":{"title":"Nexora AI Call Open API","version":"1.0.0","description":"Messaging, voice, Verify, Lookup and short links for Thailand. `/v1` only ever grows: fields are added, never changed; deprecations are announced at least 12 months ahead with Deprecation and Sunset headers. Test keys (`sv_test_`) run against a sandbox with its own play-money wallet and magic numbers.","contact":{"name":"Nexora AI Call developer support","url":"https://nexora-ai-call.com/developers"}},"servers":[{"url":"https://nexora-ai-call.com"}],"tags":[{"name":"account"},{"name":"admin-ai"},{"name":"admin-api"},{"name":"admin-approvals"},{"name":"admin-audit"},{"name":"admin-boss"},{"name":"admin-collab"},{"name":"admin-compliance"},{"name":"admin-config"},{"name":"admin-finance"},{"name":"admin-ka"},{"name":"admin-ops"},{"name":"admin-org"},{"name":"admin-payments"},{"name":"admin-pricing"},{"name":"admin-privacy"},{"name":"admin-risk"},{"name":"admin-sales"},{"name":"admin-shell"},{"name":"admin-support"},{"name":"admin-telecom"},{"name":"agent"},{"name":"agents"},{"name":"ai"},{"name":"announcements"},{"name":"api-keys"},{"name":"appointments"},{"name":"auth"},{"name":"balance"},{"name":"bulk"},{"name":"caller-ids"},{"name":"calls"},{"name":"compat"},{"name":"connectors"},{"name":"consents"},{"name":"contacts"},{"name":"coupons"},{"name":"dev"},{"name":"developer"},{"name":"developers"},{"name":"documents"},{"name":"events"},{"name":"exports"},{"name":"hub"},{"name":"kb"},{"name":"key-accounts"},{"name":"kyc"},{"name":"legal"},{"name":"limits"},{"name":"links"},{"name":"lookups"},{"name":"me"},{"name":"members"},{"name":"messages"},{"name":"migrate"},{"name":"notifications"},{"name":"numbers"},{"name":"onboarding"},{"name":"packages"},{"name":"packs"},{"name":"payments"},{"name":"payments-simulator"},{"name":"pricing"},{"name":"referral"},{"name":"risk"},{"name":"senders"},{"name":"signing"},{"name":"subscriptions"},{"name":"support"},{"name":"tasks"},{"name":"tax-documents"},{"name":"tenants"},{"name":"trial"},{"name":"trust"},{"name":"verify"},{"name":"wallet"},{"name":"webhooks"}],"paths":{"/2010-04-01/Accounts/{sid}/Calls.json":{"get":{"operationId":"getCompatTwilioCallsJson","summary":"Twilio-compatible: list calls","tags":["compat"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Calls.json' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'To=+66000000001' \\\n  --data-urlencode 'From=+6620000000' \\\n  --data-urlencode 'Url=https://example.com/voice.xml'"}]},"post":{"operationId":"postCompatTwilioCallsJson","summary":"Twilio-compatible: place a call (To, From, Url|Twiml, StatusCallback, MachineDetection); needs an Idempotency-Key header","tags":["compat"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Calls.json' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'To=+66000000001' \\\n  --data-urlencode 'From=+6620000000' \\\n  --data-urlencode 'Url=https://example.com/voice.xml'"}]}},"/2010-04-01/Accounts/{sid}/Calls/{csid}":{"get":{"operationId":"getCompatTwilioCallsCsid","summary":"Twilio-compatible: fetch a call (SID.json)","tags":["compat"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"csid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Calls/CSID' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'To=+66000000001' \\\n  --data-urlencode 'From=+6620000000' \\\n  --data-urlencode 'Url=https://example.com/voice.xml'"}]}},"/2010-04-01/Accounts/{sid}/Messages.json":{"get":{"operationId":"getCompatTwilioMessagesJson","summary":"Twilio-compatible: list messages","tags":["compat"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Messages.json' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'To=+66000000001' \\\n  --data-urlencode 'From=ACME' \\\n  --data-urlencode 'Body=Hello from Nexora AI Call'"}]},"post":{"operationId":"postCompatTwilioMessagesJson","summary":"Twilio-compatible: send a message (form-encoded To, From, Body, StatusCallback)","description":"Basic auth: username = account SID (or key id), password = API key. Optional X-Twilio-Signature is verified with the key's HMAC secret. Extension field Category = otp | transactional | marketing.","tags":["compat"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Messages.json' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'To=+66000000001' \\\n  --data-urlencode 'From=ACME' \\\n  --data-urlencode 'Body=Hello from Nexora AI Call'"}]}},"/2010-04-01/Accounts/{sid}/Messages/{msid}":{"get":{"operationId":"getCompatTwilioMessagesMsid","summary":"Twilio-compatible: fetch a message (SID.json)","tags":["compat"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"msid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Messages/MSID' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'To=+66000000001' \\\n  --data-urlencode 'From=ACME' \\\n  --data-urlencode 'Body=Hello from Nexora AI Call'"}]}},"/api/v1/account/exports":{"get":{"operationId":"getAccountExports","summary":"Your data export packs","tags":["account"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"exports:create","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/account/exports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAccountExports","summary":"Request a full data export pack","tags":["account"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"exports:create","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/exports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/account/exports/{id}/link":{"post":{"operationId":"postAccountExportsIdLink","summary":"Issue a download link for a ready export","tags":["account"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"exports:create","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/exports/ID/link' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/account/freeze":{"get":{"operationId":"getAccountFreeze","summary":"Emergency-freeze status and the statements of earlier freezes","tags":["account"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/account/freeze' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAccountFreeze","summary":"Emergency freeze","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["voice","sms","api","keys","autotopup"]}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:freeze","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/freeze' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/account/freeze/unlock":{"post":{"operationId":"postAccountFreezeUnlock","summary":"Send the original-channel code to ask for an unfreeze","tags":["account"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:freeze","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/freeze/unlock' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAccountFreezeUnlock","summary":"Confirm the code and file the unfreeze request","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:freeze","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/account/freeze/unlock' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\"}'"}]}},"/api/v1/account/leave":{"get":{"operationId":"getAccountLeave","summary":"Leave-the-platform preview and closing status","tags":["account"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/account/leave' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAccountLeave","summary":"Close the account (30-day recovery window)","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"numbers":{"default":"keep_30d","type":"string","enum":["keep_30d","port_out"]},"portOut":{"type":"object","properties":{"numberIds":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":40}},"gainingCarrier":{"type":"string","maxLength":120}},"required":["numberIds"]},"exportJobId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"confirm":{"type":"boolean","const":true}},"required":["confirm"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/leave' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"confirm\":true}'"}]}},"/api/v1/account/leave/certificate":{"get":{"operationId":"getAccountLeaveCertificate","summary":"Deletion and retention certificate (PDF)","tags":["account"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/account/leave/certificate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/account/leave/loa":{"get":{"operationId":"getAccountLeaveLoa","summary":"Sender-ID LOA letter (PDF)","tags":["account"],"parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["th","en","zh"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/account/leave/loa' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/account/leave/recover":{"post":{"operationId":"postAccountLeaveRecover","summary":"Recover a closing account","tags":["account"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/leave/recover' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/account/leave/refunds":{"post":{"operationId":"postAccountLeaveRefunds","summary":"Request the refund of every refundable payment","tags":["account"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"account:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/leave/refunds' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/account/recover":{"post":{"operationId":"postAccountRecover","summary":"Start account recovery (personal)","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","minLength":5,"maxLength":200},"method":{"type":"string","enum":["original_channel","evidence"]}},"required":["identifier","method"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"identifier\":\"string\",\"method\":\"original_channel\"}'"}]}},"/api/v1/account/recover/complete":{"post":{"operationId":"postAccountRecoverComplete","summary":"Finish the recovery after the cool-down","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":120}},"required":["token"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/complete' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\"}'"}]}},"/api/v1/account/recover/contact":{"post":{"operationId":"postAccountRecoverContact","summary":"Send a code to the NEW phone / e-mail","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":120},"newContact":{"type":"string","minLength":5,"maxLength":200}},"required":["token","newContact"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/contact' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\",\"newContact\":\"string\"}'"}]}},"/api/v1/account/recover/documents":{"post":{"operationId":"postAccountRecoverDocuments","summary":"Upload company-recovery documents","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":120},"ownerProof":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"authorisationLetter":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"videoVerifiedRef":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["token","ownerProof","authorisationLetter"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/documents' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\",\"ownerProof\":\"string\",\"authorisationLetter\":\"string\"}'"}]}},"/api/v1/account/recover/evidence":{"post":{"operationId":"postAccountRecoverEvidence","summary":"New-contact code + ID + selfie + last top-up amount","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":120},"code":{"type":"string","pattern":"^\\d{6}$"},"idNumber":{"type":"string","minLength":10,"maxLength":20},"fullName":{"type":"string","minLength":2,"maxLength":160},"front":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"selfie":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"lastTopupBaht":{"anyOf":[{"type":"number","minimum":0,"maximum":10000000},{"type":"null"}]},"scenario":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]}},"required":["token","code","idNumber","fullName","front","selfie"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/evidence' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\",\"code\":\"123456\",\"idNumber\":\"string\",\"fullName\":\"string\",\"front\":\"string\",\"selfie\":\"string\"}'"}]}},"/api/v1/account/recover/object":{"post":{"operationId":"postAccountRecoverObject","summary":"Object to a recovery (not me)","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","minLength":16,"maxLength":200}},"required":["ref"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/object' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ref\":\"string\"}'"}]}},"/api/v1/account/recover/otp":{"post":{"operationId":"postAccountRecoverOtp","summary":"Prove the existing contact with its code (starts the cool-down)","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":120},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["token","code"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/otp' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\",\"code\":\"123456\"}'"}]}},"/api/v1/account/recover/status":{"post":{"operationId":"postAccountRecoverStatus","summary":"Where is my recovery?","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":120}},"required":["token"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/account/recover/status' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\"}'"}]}},"/api/v1/admin/ai/calls":{"get":{"operationId":"getAdminAiCalls","summary":"AI call analysis dashboard: calls with turns, hand-off, degradation, QA and cost","tags":["admin-ai"],"parameters":[{"name":"from","in":"query","required":false,"schema":{}},{"name":"to","in":"query","required":false,"schema":{}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"handoff","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"degraded","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"review","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/calls' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/calls/{id}":{"get":{"operationId":"getAdminAiCallsId","summary":"One AI call: transcript, QA, vendors used (with country), cost lines, call-backs","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/calls/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/calls/{id}/simulate":{"post":{"operationId":"postAdminAiCallsIdSimulate","summary":"Play a caller script into an AI call on a simulated provider","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"script":{"minItems":1,"maxItems":40,"type":"array","items":{"anyOf":[{"type":"string","maxLength":500},{"type":"object","properties":{"say":{"type":"string","maxLength":500},"speechSec":{"type":"number","minimum":0,"maximum":60}},"required":["say"],"additionalProperties":false},{"type":"object","properties":{"dtmf":{"type":"string","pattern":"^[0-9*#]$"}},"required":["dtmf"],"additionalProperties":false},{"type":"object","properties":{"silence":{"type":"boolean","const":true}},"required":["silence"],"additionalProperties":false},{"type":"object","properties":{"amd":{"type":"string","enum":["human","machine","unknown"]}},"required":["amd"],"additionalProperties":false},{"type":"object","properties":{"hangup":{"type":"boolean","const":true}},"required":["hangup"],"additionalProperties":false}]}}},"required":["script"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/calls/ID/simulate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"script\":[\"string\"]}'"}]}},"/api/v1/admin/ai/calls/{id}/whisper":{"post":{"operationId":"postAdminAiCallsIdWhisper","summary":"Whisper an instruction to the AI on a running call (staff only; audited)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":3,"maxLength":300},"reason":{"type":"string","minLength":5,"maxLength":200}},"required":["text","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/calls/ID/whisper' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"text\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/ai/costs":{"get":{"operationId":"getAdminAiCosts","summary":"AI vendor cost by vendor, tenant and day","tags":["admin-ai"],"parameters":[{"name":"from","in":"query","required":false,"schema":{}},{"name":"to","in":"query","required":false,"schema":{}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/costs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminAiCosts","summary":"Post unposted vendor usage to the cost-of-sales ledger now","tags":["admin-ai"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/costs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/health":{"get":{"operationId":"getAdminAiHealth","summary":"Vendor health: breaker state, error rate and latency from probes and live traffic","tags":["admin-ai"],"parameters":[{"name":"windowMin","in":"query","required":false,"schema":{"default":60,"type":"integer","minimum":1,"maximum":1440}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/health' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminAiHealth","summary":"Probe every active AI vendor now","tags":["admin-ai"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/health' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/qa":{"get":{"operationId":"getAdminAiQa","summary":"QA scores of AI calls; the review queue first","tags":["admin-ai"],"parameters":[{"name":"review","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"max","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/qa' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/qa/{callId}":{"post":{"operationId":"postAdminAiQaCallId","summary":"Close a QA review or score the call again","tags":["admin-ai"],"parameters":[{"name":"callId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["reviewed","rescore"]},"note":{"type":"string","maxLength":300}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/qa/CALLID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"reviewed\"}'"}]}},"/api/v1/admin/ai/residency":{"put":{"operationId":"putAdminAiResidency","summary":"Set the processing regions allowed for the platform (empty scope) or one tenant","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopeKey":{"default":"","type":"string","maxLength":80},"allowedRegions":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","pattern":"^[a-z]{2,8}$"}},"note":{"type":"string","maxLength":200}},"required":["allowedRegions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ai/residency' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"allowedRegions\":[\"string\"]}'"}]}},"/api/v1/admin/ai/routing":{"get":{"operationId":"getAdminAiRouting","summary":"Vendor routing profiles (tenant > package > global) and residency policies","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/routing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminAiRouting","summary":"Save a vendor chain for a scope, kind and language","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global","package","tenant"]},"scopeKey":{"default":"","type":"string","maxLength":80},"kind":{"type":"string","enum":["llm","asr","tts"]},"language":{"default":"*","type":"string","enum":["*","th","zh","en","my"]},"chain":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"budgetMs":{"type":"integer","minimum":100,"maximum":30000},"extraction":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"note":{"type":"string","maxLength":200}},"required":["scope","kind","chain"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ai/routing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"global\",\"kind\":\"llm\",\"chain\":[\"string\"]}'"}]}},"/api/v1/admin/ai/routing/{id}":{"delete":{"operationId":"deleteAdminAiRoutingId","summary":"Delete a routing profile (the global default chain cannot be deleted)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/admin/ai/routing/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/routing/preview":{"get":{"operationId":"getAdminAiRoutingPreview","summary":"What a call of this tenant / package / language would use right now, and which vendors were excluded and why","tags":["admin-ai"],"parameters":[{"name":"tenantId","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"packageCode","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"language","in":"query","required":false,"schema":{"default":"th","type":"string","enum":["th","zh","en","my"]}},{"name":"sensitive","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/routing/preview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ai/vendors":{"get":{"operationId":"getAdminAiVendors","summary":"AI vendors (LLM / ASR / TTS) with breaker, health, DPA and pricing (no secrets)","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ai/vendors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminAiVendors","summary":"Register an AI vendor","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60,"pattern":"^[a-z0-9][a-z0-9._-]*$"},"kind":{"type":"string","enum":["llm","asr","tts"]},"adapter":{"type":"string","minLength":2,"maxLength":30},"config":{"default":{},"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"model":{"type":"string","maxLength":80},"path":{"type":"string","maxLength":120},"timeoutMs":{"type":"integer","minimum":300,"maximum":60000},"pricing":{"type":"object","properties":{"inMicroPerKTok":{"type":"integer","minimum":0,"maximum":100000000},"outMicroPerKTok":{"type":"integer","minimum":0,"maximum":100000000},"microPerSec":{"type":"integer","minimum":0,"maximum":100000000},"microPerChar":{"type":"integer","minimum":0,"maximum":100000000}},"additionalProperties":false},"voices":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":80}},"cluster":{"type":"string","maxLength":60},"langs":{"maxItems":4,"type":"array","items":{"type":"string","enum":["th","zh","en","my"]}},"latencyMs":{"type":"integer","minimum":0,"maximum":120000},"fail":{"type":"string","enum":["none","always","every_n"]},"failEvery":{"type":"integer","minimum":1,"maximum":1000},"noiseEvery":{"type":"integer","minimum":0,"maximum":50}},"additionalProperties":false},"secrets":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":500}},"region":{"default":"th","type":"string","minLength":2,"maxLength":12,"pattern":"^[a-z]{2,8}(-[a-z0-9]{1,6})?$"},"priority":{"default":100,"type":"integer","minimum":1,"maximum":1000},"simulated":{"type":"boolean"}},"required":["name","kind","adapter"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/vendors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"kind\":\"llm\",\"adapter\":\"string\"}'"}]}},"/api/v1/admin/ai/vendors/{id}":{"patch":{"operationId":"patchAdminAiVendorsId","summary":"Change an AI vendor (connection changes of a real vendor need approval again)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"model":{"type":"string","maxLength":80},"path":{"type":"string","maxLength":120},"timeoutMs":{"type":"integer","minimum":300,"maximum":60000},"pricing":{"type":"object","properties":{"inMicroPerKTok":{"type":"integer","minimum":0,"maximum":100000000},"outMicroPerKTok":{"type":"integer","minimum":0,"maximum":100000000},"microPerSec":{"type":"integer","minimum":0,"maximum":100000000},"microPerChar":{"type":"integer","minimum":0,"maximum":100000000}},"additionalProperties":false},"voices":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":80}},"cluster":{"type":"string","maxLength":60},"langs":{"maxItems":4,"type":"array","items":{"type":"string","enum":["th","zh","en","my"]}},"latencyMs":{"type":"integer","minimum":0,"maximum":120000},"fail":{"type":"string","enum":["none","always","every_n"]},"failEvery":{"type":"integer","minimum":1,"maximum":1000},"noiseEvery":{"type":"integer","minimum":0,"maximum":50}},"additionalProperties":false},"secrets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","minLength":1,"maxLength":500}},"priority":{"type":"integer","minimum":1,"maximum":1000},"region":{"type":"string","minLength":2,"maxLength":12,"pattern":"^[a-z]{2,8}(-[a-z0-9]{1,6})?$"},"status":{"type":"string","enum":["active","paused","disabled"]},"pausedReason":{"type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/ai/vendors/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]},"post":{"operationId":"postAdminAiVendorsId","summary":"Test an AI vendor or reset its breaker","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["test","reset_breaker"]}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ai/vendors/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"test\"}'"}]}},"/api/v1/admin/ai/vendors/{id}/dpa":{"put":{"operationId":"putAdminAiVendorsIdDpa","summary":"Record the data-processing agreement of an AI vendor (countries covered, dates, no-training)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorName":{"type":"string","minLength":2,"maxLength":80},"dpaStatus":{"type":"string","enum":["none","draft","negotiating","signed","expired"]},"countries":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z]{2,8}$"}},"transferMechanism":{"type":"string","maxLength":60},"signedAt":{},"expiresAt":{},"trainsOnData":{"default":false,"type":"boolean"},"retentionDays":{"type":"integer","minimum":0,"maximum":3650},"dataCategories":{"default":["call_audio","transcripts"],"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"documentUrl":{"type":"string","maxLength":300,"format":"uri"},"notes":{"type":"string","maxLength":500}},"required":["vendorName","dpaStatus","countries"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ai/vendors/ID/dpa' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorName\":\"string\",\"dpaStatus\":\"none\",\"countries\":[\"string\"]}'"}]}},"/api/v1/admin/api-abuse":{"get":{"operationId":"getAdminApiAbuse","summary":"Pumping signals, auto-revoked keys, pending link domains, busiest keys","tags":["admin-api"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/api-abuse' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/api-abuse/domains/{id}":{"post":{"operationId":"postAdminApiAbuseDomainsId","summary":"Approve or reject a short-link destination domain","tags":["admin-api"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/api-abuse/domains/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approved\"}'"}]}},"/api/v1/admin/approvals":{"get":{"operationId":"getAdminApprovals","summary":"Approval inbox (to decide / mine / decided / all)","tags":["admin-approvals"],"parameters":[{"name":"view","in":"query","required":false,"schema":{"default":"todo","type":"string","enum":["todo","mine","decided","all"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/approvals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/approvals/{id}":{"get":{"operationId":"getAdminApprovalsId","summary":"Approval detail with timeline","tags":["admin-approvals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/approvals/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/approvals/{id}/cancel":{"post":{"operationId":"postAdminApprovalsIdCancel","summary":"Withdraw a pending request","tags":["admin-approvals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/approvals/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/approvals/{id}/decide":{"post":{"operationId":"postAdminApprovalsIdDecide","summary":"Approve or reject (four-eyes)","tags":["admin-approvals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":500}},"required":["decision"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/approvals/ID/decide' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\"}'"}]}},"/api/v1/admin/approvals/delegates":{"get":{"operationId":"getAdminApprovalsDelegates","summary":"Delegations and backup pool","tags":["admin-approvals"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/approvals/delegates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminApprovalsDelegates","summary":"Hand my approvals to a colleague for a period","tags":["admin-approvals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"delegateId":{"type":"string","minLength":1},"types":{"default":[],"maxItems":30,"type":"array","items":{"type":"string"}},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"reason":{"type":"string","maxLength":200}},"required":["delegateId","startsAt","endsAt"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/approvals/delegates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"delegateId\":\"string\",\"startsAt\":\"2026-12-01T03:00:00Z\",\"endsAt\":\"2026-12-01T03:00:00Z\"}'"}]}},"/api/v1/admin/approvals/delegates/{id}":{"delete":{"operationId":"deleteAdminApprovalsDelegatesId","summary":"End a delegation","tags":["admin-approvals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/admin/approvals/delegates/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/approvals/pool":{"put":{"operationId":"putAdminApprovalsPool","summary":"Add or remove a backup approver for a type","tags":["admin-approvals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1},"userId":{"type":"string","minLength":1},"present":{"type":"boolean"}},"required":["type","userId","present"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"workflows:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/approvals/pool' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"type\":\"string\",\"userId\":\"string\",\"present\":false}'"}]}},"/api/v1/admin/audit":{"get":{"operationId":"getAdminAudit","summary":"Audit log viewer","tags":["admin-audit"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","platform","tenant"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"actorId","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"action","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"targetType","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"audit:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/audit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/audit/export":{"get":{"operationId":"getAdminAuditExport","summary":"Signed audit export (tenant chains need an approved data_export)","tags":["admin-audit"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"default":"platform","type":"string","enum":["all","platform","tenant"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"format","in":"query","required":false,"schema":{"default":"json","type":"string","enum":["json","csv"]}},{"name":"approvalId","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"audit:export","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/audit/export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/audit/verify":{"get":{"operationId":"getAdminAuditVerify","summary":"Verify the hash chain","tags":["admin-audit"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","platform","tenant"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"audit:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/audit/verify' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/audit/verify-export":{"post":{"operationId":"postAdminAuditVerifyExport","summary":"Check the signature of an exported file","tags":["admin-audit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","maxLength":40000000},"signature":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["content","signature"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"audit:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/audit/verify-export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"content\":\"string\",\"signature\":\"string\"}'"}]}},"/api/v1/admin/boss/auditors":{"get":{"operationId":"getAdminBossAuditors","summary":"Time-limited read-only accounts","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/auditors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminBossAuditors","summary":"Grant a time-limited read-only account","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":2,"maxLength":120},"scope":{"type":"string","enum":["audit","tax","investor","lender","bank"]},"purpose":{"type":"string","minLength":5,"maxLength":300},"organisation":{"type":"string","maxLength":200},"days":{"type":"integer","minimum":1,"maximum":90}},"required":["email","name","scope","purpose","days"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/auditors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"string\",\"name\":\"My key\",\"scope\":\"audit\",\"purpose\":\"string\",\"days\":1}'"}]}},"/api/v1/admin/boss/auditors/{id}":{"delete":{"operationId":"deleteAdminBossAuditorsId","summary":"Revoke a read-only account now","tags":["admin-boss"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/admin/boss/auditors/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/boss/authorizations":{"get":{"operationId":"getAdminBossAuthorizations","summary":"Authorisation status of carriers, gateways, AI vendors and LINE","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/authorizations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminBossAuthorizations","summary":"Change an authorisation status","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["carrier","gateway","ai_vendor","messaging"]},"subjectKey":{"type":"string","minLength":1,"maxLength":80},"status":{"type":"string","enum":["valid","expiring","suspended","terminated"]},"authRef":{"type":"string","maxLength":200},"expiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["kind","subjectKey","status","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/authorizations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"carrier\",\"subjectKey\":\"string\",\"status\":\"valid\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/boss/bcp":{"get":{"operationId":"getAdminBossBcp","summary":"BCP-L state: stop-charging, prepaid liability vs refundable cash, batches","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/bcp' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminBossBcp","summary":"Stop or resume charging customers (BCP-L)","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"stop"},"reason":{"type":"string","minLength":5,"maxLength":300},"notice":{"type":"object","properties":{"zh":{"type":"string","minLength":3,"maxLength":500},"th":{"type":"string","minLength":3,"maxLength":500},"en":{"type":"string","minLength":3,"maxLength":500}},"required":["zh","th","en"]}},"required":["action","reason"]},{"type":"object","properties":{"action":{"type":"string","const":"resume"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","reason"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/bcp' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"stop\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/boss/calendar":{"get":{"operationId":"getAdminBossCalendar","summary":"Compliance calendar","tags":["admin-boss"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","done","waived","all"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/calendar' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/calendar/{id}":{"post":{"operationId":"postAdminBossCalendarId","summary":"Complete (with evidence), waive or assign a calendar item","tags":["admin-boss"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"complete"},"evidenceRef":{"type":"string","minLength":3,"maxLength":300},"evidenceSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"note":{"type":"string","maxLength":500}},"required":["action","evidenceRef"]},{"type":"object","properties":{"action":{"type":"string","const":"waive"},"reason":{"type":"string","minLength":5,"maxLength":500}},"required":["action","reason"]},{"type":"object","properties":{"action":{"type":"string","const":"assign"},"ownerId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["action","ownerId"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/calendar/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"complete\",\"evidenceRef\":\"string\"}'"}]}},"/api/v1/admin/boss/confirmations":{"get":{"operationId":"getAdminBossConfirmations","summary":"Prepaid-balance confirmation letters","tags":["admin-boss"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["issued","confirmed","disputed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/confirmations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminBossConfirmations","summary":"Issue the confirmation letters of a period","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},"required":["period"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/confirmations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"period\":\"string\"}'"}]}},"/api/v1/admin/boss/confirmations/{id}":{"post":{"operationId":"postAdminBossConfirmationsId","summary":"Record the answer to a balance confirmation","tags":["admin-boss"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["confirmed","disputed"]},"note":{"type":"string","maxLength":500}},"required":["status"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/confirmations/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\":\"confirmed\"}'"}]}},"/api/v1/admin/boss/dashboard":{"get":{"operationId":"getAdminBossDashboard","summary":"Realtime dashboard snapshot","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/dashboard' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/dashboard/stream":{"get":{"operationId":"getAdminBossDashboardStream","summary":"Realtime dashboard (SSE)","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/dashboard/stream' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/health":{"get":{"operationId":"getAdminBossHealth","summary":"Customer health scores and churn risk","tags":["admin-boss"],"parameters":[{"name":"risk","in":"query","required":false,"schema":{"type":"string","enum":["low","medium","high"]}},{"name":"band","in":"query","required":false,"schema":{"type":"string","enum":["healthy","watch","at_risk"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"day","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/health' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/health/run":{"post":{"operationId":"postAdminBossHealthRun","summary":"Recompute customer health now","tags":["admin-boss"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/health/run' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/line":{"get":{"operationId":"getAdminBossLine","summary":"LINE dependency: quota, cost, health, policy changes, fallback","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/line' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminBossLine","summary":"Change LINE budgets / outage flag or record a policy change","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"settings"},"monthlyMessageBudget":{"type":"integer","minimum":0,"maximum":100000000},"monthlyCostBudgetSatang":{"type":"integer","minimum":0,"maximum":1000000000},"costPerMessageSatang":{"type":"integer","minimum":0,"maximum":100000},"outage":{"type":"boolean"},"outageNote":{"type":"string","maxLength":300}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"policy"},"occurredOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"title":{"type":"string","minLength":3,"maxLength":200},"summary":{"type":"string","minLength":3,"maxLength":2000},"impact":{"default":"low","type":"string","enum":["low","medium","high"]},"actionTaken":{"type":"string","maxLength":1000}},"required":["action","occurredOn","title","summary"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/line' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"settings\"}'"}]}},"/api/v1/admin/boss/packs":{"get":{"operationId":"getAdminBossPacks","summary":"Report packs: kinds, recent builds and quarterly runs","tags":["admin-boss"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/packs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminBossPacks","summary":"Request a report pack (built by the export worker, link by notification)","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["pack.governance_b","pack.audit","pack.tax_inspection","pack.investor","pack.lender","pack.gateway_dd","pack.bank_third_party"]},"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"quarter":{"type":"string","pattern":"^\\d{4}Q[1-4]$"}},"required":["kind"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/packs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"pack.governance_b\"}'"}]}},"/api/v1/admin/boss/packs/{id}/link":{"post":{"operationId":"postAdminBossPacksIdLink","summary":"Download link for a ready report pack","tags":["admin-boss"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/packs/ID/link' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/report":{"get":{"operationId":"getAdminBossReport","summary":"Morning report (latest or by date)","tags":["admin-boss"],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/boss/report' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/boss/report/read":{"post":{"operationId":"postAdminBossReportRead","summary":"Mark the morning report as read","tags":["admin-boss"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reportId":{"type":"string","minLength":1,"maxLength":60}},"required":["reportId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/report/read' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reportId\":\"string\"}'"}]}},"/api/v1/admin/boss/report/run":{"post":{"operationId":"postAdminBossReportRun","summary":"Rebuild the morning report now","tags":["admin-boss"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/boss/report/run' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/compliance/dnc":{"delete":{"operationId":"deleteAdminComplianceDnc","summary":"Remove a DNC entry (reason required, audited)","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":3},"reason":{"type":"string","minLength":5,"maxLength":200}},"required":["id","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/admin/compliance/dnc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"id\":\"string\",\"reason\":\"string\"}'"}]},"get":{"operationId":"getAdminComplianceDnc","summary":"Do-not-contact entries (hashed)","tags":["admin-compliance"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["platform","tenant"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/compliance/dnc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminComplianceDnc","summary":"Add a number to the platform or a tenant DNC list","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["platform","tenant"]},"tenantId":{"type":"string"},"channel":{"type":"string","enum":["sms","call"]},"number":{"type":"string","minLength":8,"maxLength":20},"reason":{"type":"string","maxLength":200},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["scope","channel","number"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/dnc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"platform\",\"channel\":\"sms\",\"number\":\"+66000000001\"}'"}]}},"/api/v1/admin/compliance/gates":{"get":{"operationId":"getAdminComplianceGates","summary":"Capability gate board","tags":["admin-compliance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/compliance/gates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminComplianceGates","summary":"Record the licence / authorisation document for a gate","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","enum":["live_charging","live_api_keys","real_lines","number_rental","sms_otp","sms_transactional","sms_marketing","sms_international","voice_outbound","voice_marketing","ai_outbound_calls","call_recording"]},"carrierId":{"type":"string","maxLength":40},"providerId":{"type":"string","maxLength":80},"licenseType":{"type":"string","maxLength":120},"documentRef":{"type":"string","minLength":3,"maxLength":200},"validUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"ownerUserId":{"type":"string","maxLength":80}},"required":["key","documentRef"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/gates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"live_charging\",\"documentRef\":\"string\"}'"}]}},"/api/v1/admin/compliance/gates/{id}":{"post":{"operationId":"postAdminComplianceGatesId","summary":"Verify the document, request opening, or close a gate","tags":["admin-compliance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["verify","request_open","close"]},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/gates/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"verify\"}'"}]}},"/api/v1/admin/compliance/legal-gates":{"get":{"operationId":"getAdminComplianceLegalGates","summary":"Legal gates (counsel opinions) and the conservative behaviour while unverified","tags":["admin-compliance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/compliance/legal-gates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminComplianceLegalGates","summary":"Record a verified legal opinion (or revoke it)","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","enum":["pdpa_marketing_basis","recording_consent","ai_disclosure","cross_border_transfer","sender_name_rules","calling_hours_rule","prepaid_breakage"]},"verified":{"type":"boolean"},"opinionRef":{"type":"string","maxLength":120},"verifiedOn":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"scope":{"type":"string","maxLength":200}},"required":["key","verified"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/legal-gates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"pdpa_marketing_basis\",\"verified\":false}'"}]}},"/api/v1/admin/compliance/obligations":{"get":{"operationId":"getAdminComplianceObligations","summary":"Carrier obligation ledger","tags":["admin-compliance"],"parameters":[{"name":"carrierId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/compliance/obligations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminComplianceObligations","summary":"Add a carrier contract obligation","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"carrierId":{"type":"string","minLength":2,"maxLength":40},"title":{"type":"string","minLength":3,"maxLength":200},"kind":{"type":"string","enum":["report","notice","filing","limit","commitment","deposit","aup","audit","termination"]},"frequency":{"type":"string","enum":["monthly","quarterly","yearly","once","on_event"]},"noticeHours":{"type":"integer","minimum":1,"maximum":8760},"ownerUserId":{"type":"string","maxLength":80},"dueAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"detail":{"type":"string","maxLength":500}},"required":["carrierId","title","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/obligations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"carrierId\":\"string\",\"title\":\"string\",\"kind\":\"report\"}'"}]}},"/api/v1/admin/compliance/obligations/{id}":{"post":{"operationId":"postAdminComplianceObligationsId","summary":"Mark an obligation performed with evidence (recurring ones roll forward)","tags":["admin-compliance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","minLength":2,"maxLength":300},"note":{"type":"string","maxLength":300}},"required":["ref"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/obligations/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ref\":\"string\"}'"}]}},"/api/v1/admin/compliance/rules":{"get":{"operationId":"getAdminComplianceRules","summary":"Compliance rule library (all versions)","tags":["admin-compliance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/compliance/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminComplianceRules","summary":"Draft a new version of a rule (publishing needs four-eyes approval)","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","enum":["hours.general","hours.marketing","hours.otp","hours.personal_quiet","freq.marketing_week","freq.transactional_day","freq.call_day","freq.otp","freq.cross_tenant_day","dest.policy","content.url","ai.disclosure","optout.keywords","sla.carrier_complaint","sla.nbtc_order","sla.pdpc_breach","sla.consumer_complaint","sla.dsr"]},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"source":{"type":"string","minLength":3,"maxLength":300},"verifiedOn":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"note":{"type":"string","maxLength":300}},"required":["key","value","source"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"hours.general\",\"value\":{},\"source\":\"string\"}'"}]}},"/api/v1/admin/compliance/rules/{id}":{"post":{"operationId":"postAdminComplianceRulesId","summary":"Request publication of a draft, or roll a key back to an older version","tags":["admin-compliance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"publish"},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["action","reason"]},{"type":"object","properties":{"action":{"type":"string","const":"rollback"},"toVersion":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["action","toVersion"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/rules/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"publish\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/compliance/sla":{"get":{"operationId":"getAdminComplianceSla","summary":"Regulatory SLA timers","tags":["admin-compliance"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["running","done","breached"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/compliance/sla' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminComplianceSla","summary":"Start a regulatory SLA timer (carrier complaint, NBTC order, PDPC breach, complaint, DSR)","tags":["admin-compliance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["carrier_complaint","nbtc_order","pdpc_breach","consumer_complaint","dsr"]},"reference":{"type":"string","maxLength":120},"tenantId":{"type":"string"}},"required":["kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/sla' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"carrier_complaint\"}'"}]}},"/api/v1/admin/compliance/sla/{id}":{"post":{"operationId":"postAdminComplianceSlaId","summary":"Complete a milestone of an SLA timer","tags":["admin-compliance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"milestone":{"type":"string","minLength":1,"maxLength":40}},"required":["milestone"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"compliance:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/compliance/sla/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"milestone\":\"string\"}'"}]}},"/api/v1/admin/config-versions":{"get":{"operationId":"getAdminConfigVersions","summary":"Configurations and what is in force","tags":["admin-config"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/config-versions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminConfigVersions","summary":"Propose a new version of a configuration","tags":["admin-config"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":80},"subjectId":{"default":"","type":"string","maxLength":80},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"note":{"type":"string","minLength":3,"maxLength":300}},"required":["scope","value","note"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/config-versions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"string\",\"value\":{},\"note\":\"string\"}'"}]}},"/api/v1/admin/config-versions/decide":{"post":{"operationId":"postAdminConfigVersionsDecide","summary":"Approve or reject a proposed version (author cannot)","tags":["admin-config"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":80},"subjectId":{"default":"","type":"string","maxLength":80},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"decision":{"type":"string","enum":["approve","reject"]},"reason":{"type":"string","maxLength":300}},"required":["scope","version","decision"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:approve","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/config-versions/decide' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"string\",\"version\":1,\"decision\":\"approve\"}'"}]}},"/api/v1/admin/config-versions/history":{"get":{"operationId":"getAdminConfigVersionsHistory","summary":"Versions with diffs","tags":["admin-config"],"parameters":[{"name":"scope","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":80}},{"name":"subjectId","in":"query","required":false,"schema":{"default":"","type":"string","maxLength":80}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/config-versions/history' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/config-versions/rollback":{"post":{"operationId":"postAdminConfigVersionsRollback","summary":"Roll back to an earlier approved version","tags":["admin-config"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":80},"subjectId":{"default":"","type":"string","maxLength":80},"toVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"note":{"type":"string","maxLength":300}},"required":["scope","toVersion"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:approve","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/config-versions/rollback' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"string\",\"toVersion\":1}'"}]}},"/api/v1/admin/departments":{"get":{"operationId":"getAdminDepartments","summary":"Departments with positions","tags":["admin-org"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/departments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminDepartments","summary":"Create a department","tags":["admin-org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,30}$"},"name":{"type":"string","minLength":2,"maxLength":100},"headUserId":{"type":["string","null"]},"entityScope":{"default":[],"type":"array","items":{"type":"string","enum":["platform","telecom"]}},"active":{"default":true,"type":"boolean"}},"required":["code","name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/departments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\",\"name\":\"My key\"}'"}]}},"/api/v1/admin/departments/{id}":{"put":{"operationId":"putAdminDepartmentsId","summary":"Update a department","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,30}$"},"name":{"type":"string","minLength":2,"maxLength":100},"headUserId":{"type":["string","null"]},"entityScope":{"default":[],"type":"array","items":{"type":"string","enum":["platform","telecom"]}},"active":{"default":true,"type":"boolean"}},"required":["code","name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/departments/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\",\"name\":\"My key\"}'"}]}},"/api/v1/admin/entities":{"get":{"operationId":"getAdminEntities","summary":"Legal entities (A platform / B telecom)","tags":["admin-org"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/entities' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/entities/{id}":{"patch":{"operationId":"patchAdminEntitiesId","summary":"Edit legal entity details","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"nameTh":{"anyOf":[{"type":"string","minLength":2,"maxLength":200},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","pattern":"^\\d{13}$"},{"type":"null"}]},"branchCode":{"type":"string","pattern":"^\\d{5}$"},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":2,"maxLength":200},"line2":{"type":"string","maxLength":200},"district":{"type":"string","maxLength":100},"province":{"type":"string","minLength":2,"maxLength":100},"postalCode":{"type":"string","pattern":"^\\d{5}$"}},"required":["line1","province","postalCode"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"entities:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/entities/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/finance/accounting-config":{"get":{"operationId":"getAdminFinanceAccountingConfig","summary":"Accounting parameters and statutory retention periods","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/accounting-config' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminFinanceAccountingConfig","summary":"Change accounting parameters (basis points as integers) and/or retention years","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"retention":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/finance/accounting-config' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/finance/bank-matching":{"get":{"operationId":"getAdminFinanceBankMatching","summary":"Bank matching workbench","tags":["admin-finance"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","matched","review","unidentified","claimed","returned","ignored"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/bank-matching' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/bank-matching/{id}/match":{"post":{"operationId":"postAdminFinanceBankMatchingIdMatch","summary":"Match a bank transaction to a payment request","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":64}},"required":["requestId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/bank-matching/ID/match' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"requestId\":\"string\"}'"}]}},"/api/v1/admin/finance/bank-matching/{id}/park":{"post":{"operationId":"postAdminFinanceBankMatchingIdPark","summary":"Park a transaction under review as unidentified (starts the 14-day claim window)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":200}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/bank-matching/ID/park' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/finance/bank-matching/import":{"post":{"operationId":"postAdminFinanceBankMatchingImport","summary":"Import a bank statement","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":10,"maxLength":5000000},"format":{"type":"string","enum":["csv","mt940","camt053"]},"fileName":{"type":"string","maxLength":120}},"required":["text"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/bank-matching/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"text\":\"string\"}'"}]}},"/api/v1/admin/finance/bank-matching/receipts/{id}/return":{"post":{"operationId":"postAdminFinanceBankMatchingReceiptsIdReturn","summary":"Return an unidentified receipt to the payer","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":5,"maxLength":300},"bankReturnRef":{"type":"string","maxLength":80},"early":{"type":"boolean"}},"required":["note"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/bank-matching/receipts/ID/return' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"note\":\"string\"}'"}]}},"/api/v1/admin/finance/bank-matching/simulate":{"post":{"operationId":"postAdminFinanceBankMatchingSimulate","summary":"Simulate an incoming bank transfer (simulator profile)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,13}$"},"payerName":{"type":"string","minLength":2,"maxLength":200},"ref":{"type":"string","maxLength":60},"memo":{"type":"string","maxLength":200}},"required":["amount","payerName"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/bank-matching/simulate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\":\"string\",\"payerName\":\"string\"}'"}]}},"/api/v1/admin/finance/budgets":{"get":{"operationId":"getAdminFinanceBudgets","summary":"Department budgets vs actual for a month","tags":["admin-finance"],"parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/budgets' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceBudgets","summary":"Set a department budget for a month","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"department":{"type":"string","minLength":1,"maxLength":40},"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"amountSatang":{"type":"string","pattern":"^\\d{1,13}$"},"note":{"type":"string","maxLength":200}},"required":["department","month","amountSatang"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/budgets' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"department\":\"string\",\"month\":\"string\",\"amountSatang\":\"string\"}'"}]}},"/api/v1/admin/finance/close":{"get":{"operationId":"getAdminFinanceClose","summary":"Month-end close state per entity (checklist, snapshot, adjustment journals)","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/close' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/close/adjustments":{"post":{"operationId":"postAdminFinanceCloseAdjustments","summary":"Propose an adjustment journal for a closed period (finance + boss approval). Amounts are signed satang: credit +, debit −","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["platform","telecom"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"reason":{"type":"string","minLength":10,"maxLength":300},"lines":{"minItems":2,"maxItems":30,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{4}$"},"amount":{"type":"string","pattern":"^-?\\d{1,15}$"},"memo":{"type":"string","maxLength":120}},"required":["code","amount"]}}},"required":["entity","period","reason","lines"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/close/adjustments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entity\":\"platform\",\"period\":\"string\",\"reason\":\"string\",\"lines\":[{\"code\":\"123456\",\"amount\":\"string\"}]}'"}]}},"/api/v1/admin/finance/close/evaluate":{"post":{"operationId":"postAdminFinanceCloseEvaluate","summary":"Re-evaluate the automatic items of a close checklist","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["platform","telecom","consolidated"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["entity","period"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/close/evaluate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entity\":\"platform\",\"period\":\"string\"}'"}]}},"/api/v1/admin/finance/close/item":{"post":{"operationId":"postAdminFinanceCloseItem","summary":"Mark a manual close checklist item done, open or waived","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["platform","telecom","consolidated"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"key":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["done","open","waived"]},"note":{"type":"string","maxLength":300}},"required":["entity","period","key","status"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/close/item' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entity\":\"platform\",\"period\":\"string\",\"key\":\"string\",\"status\":\"done\"}'"}]}},"/api/v1/admin/finance/close/request":{"post":{"operationId":"postAdminFinanceCloseRequest","summary":"Request the month-end close (blocked while a blocking checklist item is open); needs the month_close approval","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["platform","telecom","consolidated"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["entity","period"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/close/request' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entity\":\"platform\",\"period\":\"string\"}'"}]}},"/api/v1/admin/finance/expenses":{"get":{"operationId":"getAdminFinanceExpenses","summary":"Expense claims","tags":["admin-finance"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"default":"mine","type":"string","enum":["mine","all"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["submitted","approved","rejected","paid","cancelled"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/expenses' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceExpenses","summary":"Submit an expense claim with a receipt","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"department":{"type":"string","minLength":1,"maxLength":40},"category":{"type":"string","enum":["travel","meals","office","software","telecom","marketing","legal","training","other"]},"description":{"type":"string","minLength":3,"maxLength":300},"expenseDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amountSatang":{"type":"string","pattern":"^\\d{1,12}$"},"vatSatang":{"default":"0","type":"string","pattern":"^\\d{1,12}$"},"entity":{"default":"platform","type":"string","enum":["platform","telecom"]},"fileName":{"type":"string","minLength":1,"maxLength":120},"contentBase64":{"type":"string","minLength":20,"maxLength":7200000}},"required":["department","category","description","expenseDate","amountSatang","fileName","contentBase64"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/expenses' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"department\":\"string\",\"category\":\"transactional\",\"description\":\"string\",\"expenseDate\":\"string\",\"amountSatang\":\"string\",\"fileName\":\"string\",\"contentBase64\":\"string\"}'"}]}},"/api/v1/admin/finance/expenses/{id}/cancel":{"post":{"operationId":"postAdminFinanceExpensesIdCancel","summary":"Withdraw my expense claim","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/expenses/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/expenses/{id}/pay":{"post":{"operationId":"postAdminFinanceExpensesIdPay","summary":"Pay an approved expense claim (posts to the ledger; not the claimant)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/expenses/ID/pay' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/expenses/{id}/receipt":{"get":{"operationId":"getAdminFinanceExpensesIdReceipt","summary":"Download the receipt of an expense claim","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/expenses/ID/receipt' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/exports":{"get":{"operationId":"getAdminFinanceExports","summary":"Accountant export download (CSV with BOM, XLSX, or a zip bundle)","tags":["admin-finance"],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["trial_balance","general_ledger","vat_sales","vat_purchases","revenue_by_stream","pp30","pp36","wht_register","boi_split","bundle"]}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"format","in":"query","required":false,"schema":{"default":"csv","type":"string","enum":["csv","xlsx","zip"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/exports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/fx":{"get":{"operationId":"getAdminFinanceFx","summary":"FX rate table, history and source","tags":["admin-finance"],"parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":3}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/fx' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceFx","summary":"Enter an FX rate (a >10 % jump needs confirmation)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base":{"type":"string","minLength":3,"maxLength":3},"rate":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,8})?$"},"feePct":{"default":"0","type":"string","pattern":"^\\d{1,2}(\\.\\d{1,2})?$"},"source":{"default":"manual","type":"string","enum":["manual","bot_daily","bank_tt","gateway_quote","simulator"]},"validFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"confirmLarge":{"type":"boolean"}},"required":["base","rate"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/fx' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"base\":\"string\",\"rate\":\"string\"}'"}]}},"/api/v1/admin/finance/fx/refresh":{"post":{"operationId":"postAdminFinanceFxRefresh","summary":"Fetch today's FX rates from the configured source","tags":["admin-finance"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/fx/refresh' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/gl":{"get":{"operationId":"getAdminFinanceGl","summary":"General ledger lines of a period, paged by entry sequence","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"coa","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"afterSeq","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{1,18}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/gl' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/governance":{"get":{"operationId":"getAdminFinanceGovernance","summary":"Entity B governance: shareholder register with Thai-majority view, resolutions register, B-side decision trail of a month","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/governance' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/governance/evidence":{"get":{"operationId":"getAdminFinanceGovernanceEvidence","summary":"Download the \"Thai majority and actual control\" evidence pack of entity B (zip of CSV)","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/governance/evidence' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/governance/resolutions":{"post":{"operationId":"postAdminFinanceGovernanceResolutions","summary":"Add a board / shareholder resolution or authorization to the register (never deleted)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityCode":{"type":"string","enum":["platform","telecom"]},"kind":{"type":"string","enum":["board","shareholder","authorization"]},"resolutionDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"title":{"type":"string","minLength":3,"maxLength":200},"summary":{"type":"string","maxLength":2000},"documentRef":{"type":"string","maxLength":300},"documentSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["entityCode","kind","resolutionDate","title"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"entities:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/governance/resolutions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entityCode\":\"platform\",\"kind\":\"board\",\"resolutionDate\":\"string\",\"title\":\"string\"}'"}]}},"/api/v1/admin/finance/governance/resolutions/{id}/supersede":{"post":{"operationId":"postAdminFinanceGovernanceResolutionsIdSupersede","summary":"Replace a resolution with a corrected one; the old row stays, marked superseded","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityCode":{"type":"string","enum":["platform","telecom"]},"kind":{"type":"string","enum":["board","shareholder","authorization"]},"resolutionDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"title":{"type":"string","minLength":3,"maxLength":200},"summary":{"type":"string","maxLength":2000},"documentRef":{"type":"string","maxLength":300},"documentSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["entityCode","kind","resolutionDate","title"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"entities:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/governance/resolutions/ID/supersede' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entityCode\":\"platform\",\"kind\":\"board\",\"resolutionDate\":\"string\",\"title\":\"string\"}'"}]}},"/api/v1/admin/finance/governance/shareholders":{"post":{"operationId":"postAdminFinanceGovernanceShareholders","summary":"Record a shareholder of an entity (the register never exceeds 100 %)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityCode":{"type":"string","enum":["platform","telecom"]},"holderName":{"type":"string","minLength":2,"maxLength":200},"nationality":{"type":"string","minLength":2,"maxLength":3},"shareBp":{"type":"integer","minimum":1,"maximum":10000},"basisNote":{"type":"string","maxLength":500},"validFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["entityCode","holderName","nationality","shareBp","validFrom"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"entities:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/governance/shareholders' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entityCode\":\"platform\",\"holderName\":\"string\",\"nationality\":\"string\",\"shareBp\":1,\"validFrom\":\"string\"}'"}]}},"/api/v1/admin/finance/governance/shareholders/{id}/end":{"post":{"operationId":"postAdminFinanceGovernanceShareholdersIdEnd","summary":"End a shareholding on a date (history is kept)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"validTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["validTo"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"entities:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/governance/shareholders/ID/end' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"validTo\":\"string\"}'"}]}},"/api/v1/admin/finance/intercompany/borrowing":{"get":{"operationId":"getAdminFinanceIntercompanyBorrowing","summary":"Pool borrowings: open and offset (credit note + invoice numbers)","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/borrowing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceIntercompanyBorrowing","summary":"Run the pool-borrowing offset batch now (one credit note + one invoice per tenant and direction)","tags":["admin-finance"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/borrowing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/intercompany/split-rules":{"get":{"operationId":"getAdminFinanceIntercompanySplitRules","summary":"Effective charge split table and revenue split rules","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/split-rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceIntercompanySplitRules","summary":"Propose a new revenue split rule (price_change approval, four-eyes)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"matchKey":{"type":"string","minLength":2,"maxLength":60},"matchKind":{"type":"string","enum":["exact","prefix"]},"splitBBp":{"type":"integer","minimum":0,"maximum":10000},"revenueA":{"type":"string"},"revenueB":{"type":"string"},"note":{"type":"string","maxLength":300}},"required":["matchKey","matchKind","splitBBp"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/split-rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"matchKey\":\"string\",\"matchKind\":\"exact\",\"splitBBp\":0}'"}]}},"/api/v1/admin/finance/intercompany/statements":{"get":{"operationId":"getAdminFinanceIntercompanyStatements","summary":"A↔B monthly settlement statements","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/statements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceIntercompanyStatements","summary":"Generate (or rebuild while editable) the settlement statement of a month and match both sides","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["period"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/statements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"period\":\"string\"}'"}]}},"/api/v1/admin/finance/intercompany/statements/{id}/paid":{"post":{"operationId":"postAdminFinanceIntercompanyStatementsIdPaid","summary":"Confirm that the remaining settlement transfer was seen in the bank","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentRef":{"type":"string","minLength":3,"maxLength":100}},"required":["paymentRef"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/statements/ID/paid' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"paymentRef\":\"string\"}'"}]}},"/api/v1/admin/finance/intercompany/statements/{id}/submit":{"post":{"operationId":"postAdminFinanceIntercompanyStatementsIdSubmit","summary":"Submit a matched settlement statement for approval (finance + B-side boss)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/statements/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/intercompany/transfers":{"get":{"operationId":"getAdminFinanceIntercompanyTransfers","summary":"Weekly A→B prepay transfers","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/transfers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceIntercompanyTransfers","summary":"Run the weekly prepay for last week now (idempotent per week)","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/transfers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/intercompany/transfers/{id}/confirm":{"post":{"operationId":"postAdminFinanceIntercompanyTransfersIdConfirm","summary":"Confirm a weekly prepay was received by entity B","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/intercompany/transfers/ID/confirm' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/kpis":{"get":{"operationId":"getAdminFinanceKpis","summary":"Finance daily KPIs and revenue-protection KPIs","tags":["admin-finance"],"parameters":[{"name":"day","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/kpis' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/margin":{"get":{"operationId":"getAdminFinanceMargin","summary":"Margin report","tags":["admin-finance"],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"groupBy","in":"query","required":false,"schema":{"default":"product","type":"string","enum":["tenant","product","provider","route","day"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/margin' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/pnl":{"get":{"operationId":"getAdminFinancePnl","summary":"Daily profit and loss per entity or consolidated (intercompany eliminated)","tags":["admin-finance"],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/pnl' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/recon":{"get":{"operationId":"getAdminFinanceRecon","summary":"Reconciliation centre","tags":["admin-finance"],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["cdr_leak","cdr_ghost","billing_no_cdr","duration_diff","units_diff","cost_diff","rate_spike","late_adjustment","cdr_file_missing","gateway_missing","gateway_amount","gateway_duplicate","gateway_stale","bank_unmatched","bank_ledger","wallet_cache"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","explained","disputed","resolved"]}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"days","in":"query","required":false,"schema":{"default":14,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/recon' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceRecon","summary":"Run a reconciliation","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"cdr"},"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"providerId":{"type":"string","maxLength":64}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"type":"string","const":"gateway"},"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","day"]},{"type":"object","properties":{"kind":{"type":"string","const":"bank"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"month"},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["kind","period"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/recon' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"cdr\",\"day\":\"string\"}'"}]}},"/api/v1/admin/finance/recon/cdr-import":{"post":{"operationId":"postAdminFinanceReconCdrImport","summary":"Import a carrier CDR file for reconciliation","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["voice","sms"]},"profile":{"type":"string","maxLength":30},"text":{"type":"string","minLength":10,"maxLength":5000000},"fileName":{"type":"string","maxLength":120}},"required":["providerId","kind","text"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/recon/cdr-import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"providerId\":\"string\",\"kind\":\"voice\",\"text\":\"string\"}'"}]}},"/api/v1/admin/finance/recon/diffs/{id}":{"post":{"operationId":"postAdminFinanceReconDiffsId","summary":"Explain, dispute or resolve a reconciliation difference","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["explain","dispute","resolve"]},"note":{"type":"string","minLength":5,"maxLength":500}},"required":["action","note"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/recon/diffs/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"explain\",\"note\":\"string\"}'"}]}},"/api/v1/admin/finance/reserve":{"get":{"operationId":"getAdminFinanceReserve","summary":"Gateway settlement and rolling-reserve dashboard","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/reserve' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/sequences":{"get":{"operationId":"getAdminFinanceSequences","summary":"Running-number series, gaps and issuing identities","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/sequences' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/suppliers":{"get":{"operationId":"getAdminFinanceSuppliers","summary":"Supplier management overview","tags":["admin-finance"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceSuppliers","summary":"Create a supplier","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"kind":{"type":"string","enum":["telecom","sms","llm","asr","tts","cloud","payment","other"]},"country":{"type":"string","minLength":2,"maxLength":2},"taxId":{"type":"string","maxLength":30},"taxTreatment":{"type":"string","enum":["domestic_vat","foreign_pp36","foreign_royalty_pnd54","exempt"]},"whtRatePct":{"type":"string","pattern":"^\\d{1,2}(\\.\\d{1,2})?$"},"providerId":{"type":"string","maxLength":64},"contactEmail":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"dpaStatus":{"type":"string","enum":["none","requested","signed","expired"]},"dpaValidUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","kind","country","taxTreatment"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"kind\":\"telecom\",\"country\":\"string\",\"taxTreatment\":\"domestic_vat\"}'"}]}},"/api/v1/admin/finance/suppliers/{id}":{"patch":{"operationId":"patchAdminFinanceSuppliersId","summary":"Update supplier master data (country, tax treatment, DPA, provider link, terms, status)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"kind":{"type":"string","enum":["telecom","sms","llm","asr","tts","cloud","payment","other"]},"country":{"type":"string","minLength":2,"maxLength":2},"taxId":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"taxTreatment":{"type":"string","enum":["domestic_vat","foreign_pp36","foreign_royalty_pnd54","exempt"]},"whtRatePct":{"anyOf":[{"type":"string","pattern":"^\\d{1,2}(\\.\\d{1,2})?$"},{"type":"null"}]},"providerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"dpaStatus":{"type":"string","enum":["none","requested","signed","expired"]},"dpaValidUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"paymentTermsDays":{"type":"integer","minimum":0,"maximum":180},"status":{"type":"string","enum":["active","paused","offboarded"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/finance/suppliers/{id}/bank-account":{"post":{"operationId":"postAdminFinanceSuppliersIdBankAccount","summary":"Set the first bank account of a supplier","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountNo":{"type":"string","pattern":"^[0-9-]{6,24}$"},"accountName":{"type":"string","minLength":2,"maxLength":120}},"required":["accountNo","accountName"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/ID/bank-account' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"accountNo\":\"string\",\"accountName\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/bank-changes":{"post":{"operationId":"postAdminFinanceSuppliersBankChanges","summary":"Register a supplier bank-account change request","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"accountNo":{"type":"string","pattern":"^[0-9-]{6,24}$"},"accountName":{"type":"string","minLength":2,"maxLength":120},"channel":{"default":"email","type":"string","enum":["email","letter","portal","phone"]}},"required":["vendorId","accountNo","accountName"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/bank-changes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\",\"accountNo\":\"string\",\"accountName\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/bank-changes/{id}/callback":{"post":{"operationId":"postAdminFinanceSuppliersBankChangesIdCallback","summary":"Record the call-back and request approval of a bank-account change","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":10,"maxLength":500}},"required":["note"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/bank-changes/ID/callback' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"note\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/bank-changes/{id}/reject":{"post":{"operationId":"postAdminFinanceSuppliersBankChangesIdReject","summary":"Reject a supplier bank-account change","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":5,"maxLength":300}},"required":["note"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/bank-changes/ID/reject' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"note\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/bills":{"post":{"operationId":"postAdminFinanceSuppliersBills","summary":"Register a supplier bill and compare it with the CDR","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"billNo":{"type":"string","minLength":1,"maxLength":60},"billedSatang":{"type":"string","pattern":"^\\d{1,15}$"}},"required":["vendorId","month","billNo","billedSatang"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/bills' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\",\"month\":\"string\",\"billNo\":\"string\",\"billedSatang\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/bills/{id}":{"post":{"operationId":"postAdminFinanceSuppliersBillsId","summary":"Accept or dispute a supplier bill","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["accept","dispute"]},"note":{"type":"string","minLength":5,"maxLength":500}},"required":["action","note"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/bills/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"accept\",\"note\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/contracts":{"post":{"operationId":"postAdminFinanceSuppliersContracts","summary":"Add a supplier contract (file ≤ 10 MB as base64) with expiry reminders","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"title":{"type":"string","minLength":3,"maxLength":200},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"minCommitSatang":{"type":"string","pattern":"^\\d{1,15}$"},"noticeDays":{"default":90,"type":"integer","minimum":0,"maximum":365},"fileName":{"type":"string","maxLength":120},"contentBase64":{"type":"string","maxLength":14000000}},"required":["vendorId","title","startsOn","endsOn"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/contracts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\",\"title\":\"string\",\"startsOn\":\"string\",\"endsOn\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/incidents":{"post":{"operationId":"postAdminFinanceSuppliersIncidents","summary":"Open a supplier incident","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["outage","quality","billing_dispute","price_spike","ghost_cdr","security","other"]},"severity":{"default":"P3","type":"string","enum":["P1","P2","P3"]},"title":{"type":"string","minLength":3,"maxLength":200},"detail":{"type":"string","maxLength":2000}},"required":["vendorId","kind","title"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/incidents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\",\"kind\":\"outage\",\"title\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/incidents/{id}":{"post":{"operationId":"postAdminFinanceSuppliersIncidentsId","summary":"Resolve a supplier incident","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"type":"string","minLength":3,"maxLength":500}},"required":["resolution"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/incidents/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"resolution\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/payments":{"post":{"operationId":"postAdminFinanceSuppliersPayments","summary":"Request a supplier payment (approval workflow)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"vendorInvoiceId":{"type":"string","minLength":1},"entity":{"default":"telecom","type":"string","enum":["platform","telecom"]},"amountSatang":{"type":"string","pattern":"^\\d{1,15}$"},"dueOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"note":{"type":"string","maxLength":300}},"required":["vendorId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/payments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/payments/{id}/cancel":{"post":{"operationId":"postAdminFinanceSuppliersPaymentsIdCancel","summary":"Cancel a supplier payment request","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/payments/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/suppliers/payments/{id}/pay":{"post":{"operationId":"postAdminFinanceSuppliersPaymentsIdPay","summary":"Pay an approved supplier payment request (not the requester)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/payments/ID/pay' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/suppliers/rates":{"post":{"operationId":"postAdminFinanceSuppliersRates","summary":"Record a supplier cost rate (spike > 30 % is held)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"product":{"type":"string","minLength":2,"maxLength":60},"route":{"default":"","type":"string","maxLength":40},"unit":{"default":"second","type":"string","maxLength":20},"rateMicro":{"type":"string","pattern":"^\\d{1,15}$"},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"note":{"type":"string","maxLength":300},"source":{"default":"manual","type":"string","enum":["manual","cdr_observed","price_list"]}},"required":["vendorId","product","rateMicro"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/rates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\",\"product\":\"string\",\"rateMicro\":\"string\"}'"}]}},"/api/v1/admin/finance/suppliers/score":{"post":{"operationId":"postAdminFinanceSuppliersScore","summary":"Compute the monthly supplier scores","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["month"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/suppliers/score' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"month\":\"string\"}'"}]}},"/api/v1/admin/finance/tax-docs":{"get":{"operationId":"getAdminFinanceTaxDocs","summary":"All tax documents (finance console)","tags":["admin-finance"],"parameters":[{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","enum":["platform","telecom"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","maxLength":4}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["issued","voided","replaced"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/tax-docs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/tax-docs/{id}/etax":{"post":{"operationId":"postAdminFinanceTaxDocsIdEtax","summary":"Record the e-Tax submission reference","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","minLength":3,"maxLength":80}},"required":["reference"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tax-docs/ID/etax' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reference\":\"string\"}'"}]}},"/api/v1/admin/finance/tax-docs/{id}/file":{"get":{"operationId":"getAdminFinanceTaxDocsIdFile","summary":"Download any tax document","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"default":"pdf","type":"string","enum":["pdf","xml"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/tax-docs/ID/file' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/tax-docs/{id}/void":{"post":{"operationId":"postAdminFinanceTaxDocsIdVoid","summary":"Void a tax document (number is kept)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tax-docs/ID/void' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/finance/tax-docs/credit-note":{"post":{"operationId":"postAdminFinanceTaxDocsCreditNote","summary":"Issue a credit note (billing error, goodwill, SLA)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"originalDocId":{"type":"string","minLength":1,"maxLength":64},"category":{"type":"string","enum":["billing_error","goodwill","sla_credit","refund"]},"net":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["originalDocId","category","net","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tax-docs/credit-note' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"originalDocId\":\"string\",\"category\":\"transactional\",\"net\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/finance/tax-reports":{"get":{"operationId":"getAdminFinanceTaxReports","summary":"Tax workpapers per entity and month: PP.30, PP.36, PND.54, WHT register, BOI split","tags":["admin-finance"],"parameters":[{"name":"report","in":"query","required":true,"schema":{"type":"string","enum":["pp30","pp36","pnd54","wht","boi"]}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/tax-reports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/tax-reports/pp36-remit":{"post":{"operationId":"postAdminFinanceTaxReportsPp36Remit","summary":"Remit the PP.36 VAT of a month to the revenue department","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["platform","telecom"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["entity","period"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tax-reports/pp36-remit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"entity\":\"platform\",\"period\":\"string\"}'"}]}},"/api/v1/admin/finance/tfrs":{"get":{"operationId":"getAdminFinanceTfrs","summary":"TFRS 15 workbench: contract liability, recognised revenue, deemed sales, book-tax difference, breakage gate, NBTC/USO accruals","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/tfrs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/tfrs/breakage":{"post":{"operationId":"postAdminFinanceTfrsBreakage","summary":"Run the breakage sweep now (defers while the legal gate prepaid_breakage is unverified)","tags":["admin-finance"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tfrs/breakage' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/tfrs/nbtc":{"post":{"operationId":"postAdminFinanceTfrsNbtc","summary":"Accrue NBTC licence fee and USO for a month now (posts only the difference)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["period"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tfrs/nbtc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"period\":\"string\"}'"}]}},"/api/v1/admin/finance/tfrs/residuals":{"post":{"operationId":"postAdminFinanceTfrsResiduals","summary":"Recognise contract-liability remainders of emptied pools now","tags":["admin-finance"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/tfrs/residuals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/trial-balance":{"get":{"operationId":"getAdminFinanceTrialBalance","summary":"Trial balance as of a month end: period movement and closing balance","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/trial-balance' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/vendors":{"get":{"operationId":"getAdminFinanceVendors","summary":"Vendors and the vendor invoice register of a month","tags":["admin-finance"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"entity","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/vendors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminFinanceVendors","summary":"Create a vendor","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"kind":{"type":"string","enum":["telecom","sms","llm","asr","tts","cloud","payment","other"]},"country":{"type":"string","minLength":2,"maxLength":2},"taxId":{"type":"string","maxLength":30},"taxTreatment":{"type":"string","enum":["domestic_vat","foreign_pp36","foreign_royalty_pnd54","exempt"]},"whtRatePct":{"type":"string","pattern":"^\\d{1,2}(\\.\\d{1,2})?$"}},"required":["name","kind","country","taxTreatment"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/vendors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"kind\":\"telecom\",\"country\":\"string\",\"taxTreatment\":\"domestic_vat\"}'"}]}},"/api/v1/admin/finance/vendors/invoices":{"post":{"operationId":"postAdminFinanceVendorsInvoices","summary":"Register and book a vendor invoice (self-assesses PP.36 VAT for foreign vendors)","tags":["admin-finance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorId":{"type":"string","minLength":1},"entity":{"type":"string","enum":["platform","telecom"]},"invoiceNo":{"type":"string","minLength":1,"maxLength":60},"invoiceDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","minLength":3,"maxLength":3},"amountOriginal":{"type":"string","pattern":"^\\d{1,15}$"},"fxRate":{"type":"string","pattern":"^\\d{1,8}(\\.\\d{1,8})?$"},"costKind":{"default":"cogs_hosting","type":"string","enum":["cogs_hosting","cogs_llm","cogs_asr","cogs_tts","cogs_carrier_voice","cogs_sms","cogs_line","cogs_other","bank_fee_expense","gateway_fee_expense"]},"description":{"type":"string","maxLength":200}},"required":["vendorId","entity","invoiceNo","invoiceDate","amountOriginal"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/vendors/invoices' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"vendorId\":\"string\",\"entity\":\"platform\",\"invoiceNo\":\"string\",\"invoiceDate\":\"string\",\"amountOriginal\":\"string\"}'"}]}},"/api/v1/admin/finance/vendors/invoices/{id}/pay":{"post":{"operationId":"postAdminFinanceVendorsInvoicesIdPay","summary":"Pay a vendor invoice out of the entity bank account","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/vendors/invoices/ID/pay' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/wht":{"get":{"operationId":"getAdminFinanceWht","summary":"Withholding records and uploaded 50 Tawi (WHT certificate)","tags":["admin-finance"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["awaiting_certificate","uploaded","verified","written_off"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/wht' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/wht/certificates/{id}/file":{"get":{"operationId":"getAdminFinanceWhtCertificatesIdFile","summary":"Download an uploaded 50 Tawi (WHT certificate)","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/finance/wht/certificates/ID/file' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/finance/wht/certificates/{id}/reject":{"post":{"operationId":"postAdminFinanceWhtCertificatesIdReject","summary":"Reject a 50 Tawi (WHT certificate) with a reason","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/wht/certificates/ID/reject' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/finance/wht/certificates/{id}/verify":{"post":{"operationId":"postAdminFinanceWhtCertificatesIdVerify","summary":"Verify a 50 Tawi (WHT certificate) and release the locked credit","tags":["admin-finance"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/finance/wht/certificates/ID/verify' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/accounts":{"get":{"operationId":"getAdminKaAccounts","summary":"Key-account portfolio: revenue, usage, margin, health, churn risk","tags":["admin-ka"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenants:read_all","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/accounts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/accounts/{id}":{"get":{"operationId":"getAdminKaAccountsId","summary":"One key account: dashboard, overlay and credit","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenants:read_all","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/accounts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchAdminKaAccountsId","summary":"Edit non-credit overlay fields (terms days, TPS/CPS, SLA, contacts)","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentTermsDays":{"anyOf":[{"type":"number","const":15},{"type":"number","const":30},{"type":"number","const":45}]},"smsTps":{"anyOf":[{"type":"integer","minimum":1,"maximum":5000},{"type":"null"}]},"callCps":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"null"}]},"maxConcurrentCalls":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"poNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"contractNo":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"billingContactName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"billingEmail":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"whtRateBp":{"anyOf":[{"type":"number","const":0},{"type":"number","const":300}]},"accountManagerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"slaTerms":{"type":"object","properties":{"deliveryRateBp":{"default":9800,"type":"integer","minimum":0,"maximum":10000},"answerRateBp":{"default":0,"type":"integer","minimum":0,"maximum":10000},"otpP95Ms":{"default":5000,"type":"integer","minimum":100,"maximum":600000},"uptimeBp":{"default":9990,"type":"integer","minimum":0,"maximum":10000},"creditPerBreachBp":{"default":200,"type":"integer","minimum":0,"maximum":5000},"monthlyCapBp":{"default":1000,"type":"integer","minimum":0,"maximum":1000}}},"notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/ka/accounts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]},"post":{"operationId":"postAdminKaAccountsId","summary":"Switch a feature flag (AI is off by default for key accounts)","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flag":{"type":"string","enum":["ai","batch","campaigns","fastBilling"]},"enabled":{"type":"boolean"}},"required":["flag","enabled"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/accounts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"flag\":\"ai\",\"enabled\":false}'"}]}},"/api/v1/admin/ka/billing/run":{"post":{"operationId":"postAdminKaBillingRun","summary":"Run the postpaid billing for a month now (idempotent)","tags":["admin-ka"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/billing/run' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/ka/contracts":{"get":{"operationId":"getAdminKaContracts","summary":"Contracts with versions and renewal horizon","tags":["admin-ka"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenants:read_all","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/contracts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/contracts/{id}/amend":{"post":{"operationId":"postAdminKaContractsIdAmend","summary":"Propose an amendment (new rate deck version and/or credit limit; applies when approved)","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":300},"effectiveFrom":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"rateLines":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"product":{"type":"string","minLength":1,"maxLength":60},"prefix":{"default":"","type":"string","maxLength":12},"priceThb":{"type":"string","pattern":"^\\d{1,6}(\\.\\d{1,6})?$"},"unit":{"default":"segment","type":"string","enum":["segment","minute","month","doc","outcome"]},"tiers":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"fromUnits":{"type":"string","pattern":"^\\d{1,12}$"},"priceThb":{"type":"string","pattern":"^\\d{1,6}(\\.\\d{1,6})?$"}},"required":["fromUnits","priceThb"]}},"tierMode":{"default":"graduated","type":"string","enum":["graduated","retroactive"]}},"required":["product","priceThb"]}},"creditLimitSatang":{"type":"string","pattern":"^\\d{1,13}$"},"paymentTermsDays":{"anyOf":[{"type":"number","const":15},{"type":"number","const":30},{"type":"number","const":45}]}},"required":["reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/contracts/ID/amend' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/ka/dunning":{"get":{"operationId":"getAdminKaDunning","summary":"Open postpaid invoices with dunning stages and suspension approvals","tags":["admin-ka"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/dunning' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminKaDunning","summary":"Run the dunning check now","tags":["admin-ka"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/dunning' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/invoices/{id}/payment":{"post":{"operationId":"postAdminKaInvoicesIdPayment","summary":"Record a receipt (cash + WHT) against a postpaid invoice; restores a suspended account when nothing is overdue","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cashSatang":{"type":"string","pattern":"^\\d{1,13}$"},"whtSatang":{"default":"0","type":"string","pattern":"^\\d{1,13}$"},"method":{"default":"bank_transfer","type":"string","enum":["bank_transfer","cheque","bill_payment","other"]},"reference":{"type":"string","maxLength":80},"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"idempotencyKey":{"type":"string","minLength":6,"maxLength":120}},"required":["cashSatang","idempotencyKey"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/invoices/ID/payment' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"cashSatang\":\"string\",\"idempotencyKey\":\"string\"}'"}]}},"/api/v1/admin/ka/quotes":{"get":{"operationId":"getAdminKaQuotes","summary":"Quote requests and quotes","tags":["admin-ka"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/quotes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/quotes/{id}":{"get":{"operationId":"getAdminKaQuotesId","summary":"A quote with its go-live checklist","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/quotes/{id}/acceptance":{"post":{"operationId":"postAdminKaQuotesIdAcceptance","summary":"Record the go-live acceptance (sandbox test sign-off)","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID/acceptance' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ok\":false}'"}]}},"/api/v1/admin/ka/quotes/{id}/build":{"post":{"operationId":"postAdminKaQuotesIdBuild","summary":"Build the quote: contract prices, tiers and terms, with the margin preview","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":64},"rateLines":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"product":{"type":"string","minLength":1,"maxLength":60},"prefix":{"default":"","type":"string","maxLength":12},"priceThb":{"type":"string","pattern":"^\\d{1,6}(\\.\\d{1,6})?$"},"unit":{"default":"segment","type":"string","enum":["segment","minute","month","doc","outcome"]},"tiers":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"fromUnits":{"type":"string","pattern":"^\\d{1,12}$"},"priceThb":{"type":"string","pattern":"^\\d{1,6}(\\.\\d{1,6})?$"}},"required":["fromUnits","priceThb"]}},"tierMode":{"default":"graduated","type":"string","enum":["graduated","retroactive"]}},"required":["product","priceThb"]}},"terms":{"type":"object","properties":{"billingMode":{"default":"prepaid","type":"string","enum":["prepaid","postpaid"]},"creditLimitSatang":{"default":"0","type":"string","pattern":"^\\d{1,13}$"},"paymentTermsDays":{"default":30,"anyOf":[{"type":"number","const":15},{"type":"number","const":30},{"type":"number","const":45}]},"whtRateBp":{"default":0,"anyOf":[{"type":"number","const":0},{"type":"number","const":300}]},"smsTps":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":5000},{"type":"null"}]},"callCps":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"null"}]},"maxConcurrentCalls":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"depositSatang":{"default":"0","type":"string","pattern":"^\\d{1,13}$"},"sla":{"default":{},"type":"object","properties":{"deliveryRateBp":{"default":9800,"type":"integer","minimum":0,"maximum":10000},"answerRateBp":{"default":0,"type":"integer","minimum":0,"maximum":10000},"otpP95Ms":{"default":5000,"type":"integer","minimum":100,"maximum":600000},"uptimeBp":{"default":9990,"type":"integer","minimum":0,"maximum":10000},"creditPerBreachBp":{"default":200,"type":"integer","minimum":0,"maximum":5000},"monthlyCapBp":{"default":1000,"type":"integer","minimum":0,"maximum":1000}}},"poNumber":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"billingEmail":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"aiEnabled":{"default":false,"type":"boolean"}}}},"required":["tenantId","rateLines","terms"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID/build' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\",\"rateLines\":[{\"product\":\"string\",\"priceThb\":\"string\"}],\"terms\":{}}'"}]}},"/api/v1/admin/ka/quotes/{id}/contract":{"post":{"operationId":"postAdminKaQuotesIdContract","summary":"Issue the contract (e-signature document + contract record)","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"autoRenew":{"type":"boolean"},"counterpartyAddress":{"type":"string","minLength":5,"maxLength":300},"taxId":{"type":"string","maxLength":13}},"required":["startsAt","endsAt","counterpartyAddress"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID/contract' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"startsAt\":\"string\",\"endsAt\":\"string\",\"counterpartyAddress\":\"string\"}'"}]}},"/api/v1/admin/ka/quotes/{id}/go-live":{"post":{"operationId":"postAdminKaQuotesIdGoLive","summary":"Apply the overlay (every checklist item must be done); keys and config stay unchanged","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID/go-live' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/quotes/{id}/respond":{"post":{"operationId":"postAdminKaQuotesIdRespond","summary":"Account manager takes the request (stops the escalation clock)","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID/respond' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/quotes/{id}/submit":{"post":{"operationId":"postAdminKaQuotesIdSubmit","summary":"Submit for approval: margin floor, price change, credit limit","tags":["admin-ka"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/quotes/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ka/sla":{"get":{"operationId":"getAdminKaSla","summary":"SLA reports of all key accounts","tags":["admin-ka"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenants:read_all","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ka/sla' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminKaSla","summary":"Compute (and credit) the SLA of one account and month","tags":["admin-ka"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":64},"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},"required":["tenantId","period"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ka/sla' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\",\"period\":\"string\"}'"}]}},"/api/v1/admin/my-work":{"get":{"operationId":"getAdminMyWork","summary":"Everything waiting on me","tags":["admin-shell"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/my-work' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/oncall":{"get":{"operationId":"getAdminOncall","summary":"Weekly on-call roster and who is on call now","tags":["admin-collab"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/oncall' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminOncall","summary":"Assign a week of on-call","tags":["admin-collab"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weekStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"level":{"type":"string","enum":["primary","secondary"]},"userId":{"type":["string","null"]},"note":{"type":"string","maxLength":200}},"required":["weekStart","level","userId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"oncall:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/oncall' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"weekStart\":\"2026-12-01T03:00:00Z\",\"level\":\"primary\",\"userId\":\"string\"}'"}]}},"/api/v1/admin/ops/agent-builder":{"get":{"operationId":"getAdminOpsAgentBuilder","summary":"Agent templates and versions","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsAgentBuilder","summary":"Start a new draft of a template (copy-on-write)","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateKey":{"type":"string","minLength":2,"maxLength":60},"baseVersionId":{"type":"string","maxLength":80},"changelog":{"type":"string","maxLength":500}},"required":["templateKey"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"templateKey\":\"string\"}'"}]}},"/api/v1/admin/ops/agent-builder/rollouts":{"get":{"operationId":"getAdminOpsAgentBuilderRollouts","summary":"Canary roll-outs","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/rollouts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsAgentBuilderRollouts","summary":"Start a canary of a published version","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateKey":{"type":"string","minLength":2,"maxLength":60},"toVersionId":{"type":"string","minLength":3,"maxLength":80},"pct":{"default":10,"type":"integer","minimum":1,"maximum":50}},"required":["templateKey","toVersionId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/rollouts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"templateKey\":\"string\",\"toVersionId\":\"string\"}'"}]}},"/api/v1/admin/ops/agent-builder/rollouts/{id}":{"post":{"operationId":"postAdminOpsAgentBuilderRolloutsId","summary":"Evaluate, promote or roll back a canary","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["evaluate","promote","rollback"]},"reason":{"type":"string","maxLength":200}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/rollouts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"evaluate\"}'"}]}},"/api/v1/admin/ops/agent-builder/templates/{key}/scenarios":{"get":{"operationId":"getAdminOpsAgentBuilderTemplatesKeyScenarios","summary":"Simulation scenarios of a template","tags":["admin-ai"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/templates/KEY/scenarios' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminOpsAgentBuilderTemplatesKeyScenarios","summary":"Add or change a scenario (staff)","tags":["admin-ai"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{3,60}$"},"name":{"type":"object","properties":{"zh":{"type":"string","maxLength":120},"th":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120}},"required":["zh","th","en"]},"language":{"default":"th","type":"string","enum":["zh","th","en"]},"adversarial":{"default":false,"type":"boolean"},"active":{"default":true,"type":"boolean"},"script":{"minItems":1,"maxItems":12,"type":"array","items":{"anyOf":[{"type":"string","maxLength":500},{"type":"object","properties":{"silence":{"type":"boolean","const":true}},"required":["silence"]},{"type":"object","properties":{"dtmf":{"type":"string","maxLength":1}},"required":["dtmf"]}]}},"criteria":{"type":"object","properties":{"outcome":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}},"nonBillable":{"type":"boolean"},"mustSay":{"type":"string","maxLength":200},"mustNotSay":{"type":"string","maxLength":200},"transfer":{"type":"boolean"},"notTransferTo":{"type":"string","maxLength":30},"ended":{"type":"boolean"},"intentGrade":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":1}}},"additionalProperties":false}},"required":["key","name","script","criteria"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/templates/KEY/scenarios' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"name\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"script\":[\"string\"],\"criteria\":{}}'"}]}},"/api/v1/admin/ops/agent-builder/versions/{id}":{"get":{"operationId":"getAdminOpsAgentBuilderVersionsId","summary":"One template version: config, checks, pre-screen, reports, reviews","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/versions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchAdminOpsAgentBuilderVersionsId","summary":"Edit a draft version (published versions are immutable)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/versions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]},"post":{"operationId":"postAdminOpsAgentBuilderVersionsId","summary":"Run the simulations, submit for review, or retire","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["test","submit","retire"]},"reason":{"type":"string","maxLength":200}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/agent-builder/versions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"test\"}'"}]}},"/api/v1/admin/ops/agents":{"get":{"operationId":"getAdminOpsAgents","summary":"Agents / resellers with balances","tags":["admin-ops"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/agents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsAgents","summary":"Create an agent / reseller","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"contactEmail":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"rateBp":{"type":"integer","minimum":0,"maximum":3000},"durationMonths":{"type":"integer","minimum":1,"maximum":60}},"required":["name","contactEmail","rateBp"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/agents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"contactEmail\":\"string\",\"rateBp\":0}'"}]}},"/api/v1/admin/ops/agents/{id}":{"patch":{"operationId":"patchAdminOpsAgentsId","summary":"Activate or suspend an agent","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","suspended"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/ops/agents/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\":\"active\"}'"}]}},"/api/v1/admin/ops/announcements":{"get":{"operationId":"getAdminOpsAnnouncements","summary":"Announcements (all statuses)","tags":["admin-ops"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","scheduled","live","expired","cancelled"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/announcements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsAnnouncements","summary":"Create an announcement draft","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["banner","maintenance","holiday","release"]},"severity":{"default":"info","type":"string","enum":["info","warning","critical"]},"titles":{"type":"object","properties":{"zh":{"type":"string","maxLength":120},"th":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120},"my":{"type":"string","maxLength":120}},"required":["zh","th","en"],"additionalProperties":false},"bodies":{"type":"object","properties":{"zh":{"type":"string","maxLength":600},"th":{"type":"string","maxLength":600},"en":{"type":"string","maxLength":600},"my":{"type":"string","maxLength":600}},"required":["zh","th","en"],"additionalProperties":false},"segment":{"type":"object","properties":{"customerTypes":{"maxItems":200,"type":"array","items":{"type":"string","enum":["personal","enterprise"]}},"plans":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"countries":{"maxItems":200,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"locales":{"maxItems":200,"type":"array","items":{"type":"string","enum":["zh","th","en","my"]}},"tenantIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":3,"maxLength":80}},"roles":{"maxItems":200,"type":"array","items":{"type":"string","enum":["owner","admin","finance","hr","staff"]}},"kycLevels":{"maxItems":200,"type":"array","items":{"type":"string","enum":["L0","L1","L2","L3","L4"]}}},"additionalProperties":false},"startsAt":{},"endsAt":{"anyOf":[{},{"type":"null"}]}},"required":["kind","titles","bodies","startsAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/announcements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"banner\",\"titles\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"bodies\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"startsAt\":\"string\"}'"}]}},"/api/v1/admin/ops/announcements/{id}":{"put":{"operationId":"putAdminOpsAnnouncementsId","summary":"Edit an announcement draft","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["banner","maintenance","holiday","release"]},"severity":{"default":"info","type":"string","enum":["info","warning","critical"]},"titles":{"type":"object","properties":{"zh":{"type":"string","maxLength":120},"th":{"type":"string","maxLength":120},"en":{"type":"string","maxLength":120},"my":{"type":"string","maxLength":120}},"required":["zh","th","en"],"additionalProperties":false},"bodies":{"type":"object","properties":{"zh":{"type":"string","maxLength":600},"th":{"type":"string","maxLength":600},"en":{"type":"string","maxLength":600},"my":{"type":"string","maxLength":600}},"required":["zh","th","en"],"additionalProperties":false},"segment":{"type":"object","properties":{"customerTypes":{"maxItems":200,"type":"array","items":{"type":"string","enum":["personal","enterprise"]}},"plans":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"countries":{"maxItems":200,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"locales":{"maxItems":200,"type":"array","items":{"type":"string","enum":["zh","th","en","my"]}},"tenantIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":3,"maxLength":80}},"roles":{"maxItems":200,"type":"array","items":{"type":"string","enum":["owner","admin","finance","hr","staff"]}},"kycLevels":{"maxItems":200,"type":"array","items":{"type":"string","enum":["L0","L1","L2","L3","L4"]}}},"additionalProperties":false},"startsAt":{},"endsAt":{"anyOf":[{},{"type":"null"}]}},"required":["kind","titles","bodies","startsAt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ops/announcements/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"banner\",\"titles\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"bodies\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"startsAt\":\"string\"}'"}]}},"/api/v1/admin/ops/announcements/{id}/cancel":{"post":{"operationId":"postAdminOpsAnnouncementsIdCancel","summary":"Cancel an announcement","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/announcements/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/ops/announcements/{id}/submit":{"post":{"operationId":"postAdminOpsAnnouncementsIdSubmit","summary":"Submit an announcement (schedule or request approval)","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":300}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/announcements/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/ops/announcements/holiday-suggestions":{"get":{"operationId":"getAdminOpsAnnouncementsHolidaySuggestions","summary":"Suggested holiday notices","tags":["admin-ops"],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/announcements/holiday-suggestions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsAnnouncementsHolidaySuggestions","summary":"Save a reviewed holiday notice as a draft","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"key":{"type":"string","minLength":8,"maxLength":40}},"required":["from","to","key"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/announcements/holiday-suggestions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"from\":\"ACME\",\"to\":\"+66000000001\",\"key\":\"string\"}'"}]}},"/api/v1/admin/ops/calendar":{"get":{"operationId":"getAdminOpsCalendar","summary":"Change calendar for a month","tags":["admin-ops"],"parameters":[{"name":"month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/calendar' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsCalendar","summary":"Schedule a change (draft)","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["price","promo","deck","legal","route"]},"title":{"type":"string","minLength":3,"maxLength":160},"notes":{"type":"string","maxLength":1000},"effectiveAt":{},"refType":{"type":"string","minLength":1,"maxLength":40},"refId":{"type":"string","minLength":1,"maxLength":80},"payload":{"default":{},"type":"object","properties":{"action":{"type":"string","enum":["activate","expire","deactivate"]},"plan":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"name":{"type":"object","properties":{"zh":{"type":"string","minLength":1,"maxLength":80},"th":{"type":"string","minLength":1,"maxLength":80},"en":{"type":"string","minLength":1,"maxLength":80}},"required":["zh","th","en"]},"description":{"type":"object","properties":{"zh":{"type":"string","maxLength":300},"th":{"type":"string","maxLength":300},"en":{"type":"string","maxLength":300}},"required":["zh","th","en"]},"audience":{"type":"string","enum":["to_c","smb","enterprise"]},"quotas":{"type":"object","properties":{"concurrentCalls":{"type":"integer","minimum":0,"maximum":10000},"dailyCalls":{"type":"integer","minimum":0,"maximum":10000000},"contacts":{"type":"integer","minimum":0,"maximum":100000000},"kbMb":{"type":"integer","minimum":0,"maximum":1000000},"seats":{"type":"integer","minimum":1,"maximum":100000},"outcomePackages":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"string","const":"all"}]},"api":{"type":"boolean"},"approvals":{"type":"boolean"},"subAccounts":{"type":"boolean"}},"required":["concurrentCalls","dailyCalls","contacts","kbMb","seats","outcomePackages","api","approvals","subAccounts"],"additionalProperties":false},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monthNumber":{"type":"string","pattern":"^\\d{1,10}$"},"yearNumber":{"anyOf":[{"type":"string","pattern":"^\\d{1,10}$"},{"type":"null"}]},"costSatang":{"type":"string","pattern":"^\\d{1,10}$"},"tierRank":{"type":"integer","minimum":1,"maximum":50},"sortOrder":{"type":"integer","minimum":0,"maximum":100},"active":{"type":"boolean"}},"required":["code","name","audience","quotas","monthNumber","costSatang","tierRank"],"additionalProperties":false}},"additionalProperties":{}}},"required":["kind","title","effectiveAt","refType","refId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/calendar' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"price\",\"title\":\"string\",\"effectiveAt\":\"string\",\"refType\":\"string\",\"refId\":\"string\"}'"}]}},"/api/v1/admin/ops/calendar/{id}/cancel":{"post":{"operationId":"postAdminOpsCalendarIdCancel","summary":"Cancel a calendar item","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/calendar/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/ops/calendar/{id}/revert":{"post":{"operationId":"postAdminOpsCalendarIdRevert","summary":"Create the rollback item of an applied change","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"effectiveAt":{}},"required":["effectiveAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/calendar/ID/revert' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"effectiveAt\":\"string\"}'"}]}},"/api/v1/admin/ops/calendar/{id}/submit":{"post":{"operationId":"postAdminOpsCalendarIdSubmit","summary":"Submit a calendar item for approval","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledgeConflicts":{"default":false,"type":"boolean"},"reason":{"type":"string","minLength":5,"maxLength":300}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/calendar/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/ops/calendar/freeze":{"get":{"operationId":"getAdminOpsCalendarFreeze","summary":"Change-freeze windows","tags":["admin-ops"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/calendar/freeze' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminOpsCalendarFreeze","summary":"Replace the change-freeze windows","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"windows":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["from","to","reason"]}}},"required":["windows"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"config:approve","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ops/calendar/freeze' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"windows\":[{\"from\":\"ACME\",\"to\":\"+66000000001\",\"reason\":\"string\"}]}'"}]}},"/api/v1/admin/ops/coupons":{"get":{"operationId":"getAdminOpsCoupons","summary":"Coupons","tags":["admin-ops"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/coupons' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsCoupons","summary":"Create a coupon","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":40},"kind":{"type":"string","enum":["percent","fixed","free_credit"]},"percentOff":{"type":"integer","minimum":1,"maximum":90},"amountSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,10}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"maxRedemptions":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000000},{"type":"null"}]},"perTenantLimit":{"type":"integer","minimum":1,"maximum":100},"planCodes":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}},"appliesTo":{"maxItems":2,"type":"array","items":{"type":"string","enum":["plan","pack"]}},"validFrom":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"freeCreditExpiryDays":{"type":"integer","minimum":1,"maximum":730},"minAmountSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,10}$"},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"maxDiscountSatang":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^\\d{1,10}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},{"type":"null"}]},"name":{"type":"object","properties":{"zh":{"type":"string","maxLength":80},"th":{"type":"string","maxLength":80},"en":{"type":"string","maxLength":80}},"required":["zh","th","en"]}},"required":["code","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/coupons' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\",\"kind\":\"percent\"}'"}]}},"/api/v1/admin/ops/coupons/{id}":{"patch":{"operationId":"patchAdminOpsCouponsId","summary":"Enable or disable a coupon","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/ops/coupons/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"active\":false}'"}]}},"/api/v1/admin/ops/legal":{"get":{"operationId":"getAdminOpsLegal","summary":"Legal document versions and drafts","tags":["admin-ops"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/legal' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsLegal","summary":"Draft a new version of a legal document","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}$"},"version":{"type":"string","pattern":"^\\d+(\\.\\d+){0,2}$"},"titles":{"type":"object","properties":{"zh":{"type":"string","minLength":1,"maxLength":160},"th":{"type":"string","minLength":1,"maxLength":160},"en":{"type":"string","minLength":1,"maxLength":160}},"required":["zh","th","en"],"additionalProperties":false},"contents":{"type":"object","properties":{"zh":{"type":"string","minLength":20,"maxLength":200000},"th":{"type":"string","minLength":20,"maxLength":200000},"en":{"type":"string","minLength":20,"maxLength":200000}},"required":["zh","th","en"],"additionalProperties":false},"audience":{"type":"string","enum":["public","enterprise","supplier","internal"]},"requiredAt":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"changeNote":{"type":"string","maxLength":500},"effectiveAt":{}},"required":["key","version","titles","contents","effectiveAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/legal' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"version\":\"string\",\"titles\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"contents\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"effectiveAt\":\"string\"}'"}]}},"/api/v1/admin/ops/legal/{id}":{"put":{"operationId":"putAdminOpsLegalId","summary":"Edit a legal version draft","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}$"},"version":{"type":"string","pattern":"^\\d+(\\.\\d+){0,2}$"},"titles":{"type":"object","properties":{"zh":{"type":"string","minLength":1,"maxLength":160},"th":{"type":"string","minLength":1,"maxLength":160},"en":{"type":"string","minLength":1,"maxLength":160}},"required":["zh","th","en"],"additionalProperties":false},"contents":{"type":"object","properties":{"zh":{"type":"string","minLength":20,"maxLength":200000},"th":{"type":"string","minLength":20,"maxLength":200000},"en":{"type":"string","minLength":20,"maxLength":200000}},"required":["zh","th","en"],"additionalProperties":false},"audience":{"type":"string","enum":["public","enterprise","supplier","internal"]},"requiredAt":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"changeNote":{"type":"string","maxLength":500},"effectiveAt":{}},"required":["key","version","titles","contents","effectiveAt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/ops/legal/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"version\":\"string\",\"titles\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"contents\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"effectiveAt\":\"string\"}'"}]}},"/api/v1/admin/ops/legal/{id}/cancel":{"post":{"operationId":"postAdminOpsLegalIdCancel","summary":"Cancel a legal version draft","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/legal/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/ops/legal/{id}/publish":{"post":{"operationId":"postAdminOpsLegalIdPublish","summary":"Publish a reviewed legal version now","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/legal/ID/publish' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/legal/{id}/review":{"post":{"operationId":"postAdminOpsLegalIdReview","summary":"Approve or reject a legal version (second person)","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/legal/ID/review' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\"}'"}]}},"/api/v1/admin/ops/legal/{id}/submit":{"post":{"operationId":"postAdminOpsLegalIdSubmit","summary":"Send a legal version for second-person review","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/legal/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/legal/rollback":{"post":{"operationId":"postAdminOpsLegalRollback","summary":"Draft a rollback of a legal document to an earlier version","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}$"},"sourceVersion":{"type":"string","pattern":"^\\d+(\\.\\d+){0,2}$"},"effectiveAt":{},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["key","sourceVersion","effectiveAt","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/legal/rollback' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"sourceVersion\":\"string\",\"effectiveAt\":\"string\",\"note\":\"string\"}'"}]}},"/api/v1/admin/ops/outcomes":{"get":{"operationId":"getAdminOpsOutcomes","summary":"Outcome QA queues","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/outcomes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/outcomes/audit/{id}":{"post":{"operationId":"postAdminOpsOutcomesAuditId","summary":"Review a nightly audit sample (a failed sample refunds the outcome fee)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["pass","fail"]},"note":{"type":"string","maxLength":500}},"required":["verdict"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/outcomes/audit/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"verdict\":\"pass\"}'"}]}},"/api/v1/admin/ops/outcomes/demos":{"get":{"operationId":"getAdminOpsOutcomesDemos","summary":"Demo library entries","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/outcomes/demos' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsOutcomesDemos","summary":"Play a demo conversation","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"package":{"type":"string","minLength":2,"maxLength":60},"scenario":{"type":"string","minLength":2,"maxLength":80}},"required":["package","scenario"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/outcomes/demos' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"package\":\"string\",\"scenario\":\"string\"}'"}]}},"/api/v1/admin/ops/outcomes/disputes/{id}":{"post":{"operationId":"postAdminOpsOutcomesDisputesId","summary":"Decide a dispute (refund as wallet credit, or reject)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["refund","reject"]},"note":{"type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/outcomes/disputes/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"refund\"}'"}]}},"/api/v1/admin/ops/packages":{"get":{"operationId":"getAdminOpsPackages","summary":"Package catalogue with usage","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/packages' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchAdminOpsPackages","summary":"Enable / disable a package for customers","tags":["admin-ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":2,"maxLength":60},"enabled":{"type":"boolean"},"suggestedDailyCap":{"type":"integer","minimum":1,"maximum":50000}},"required":["key","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:admin","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/ops/packages' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"enabled\":false}'"}]}},"/api/v1/admin/ops/payouts":{"get":{"operationId":"getAdminOpsPayouts","summary":"Commission payout requests","tags":["admin-ops"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/payouts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/payouts/{id}/reject":{"post":{"operationId":"postAdminOpsPayoutsIdReject","summary":"Reject a payout request","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/payouts/ID/reject' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/ops/payouts/{id}/submit":{"post":{"operationId":"postAdminOpsPayoutsIdSubmit","summary":"File a payout for approval","tags":["admin-ops"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/payouts/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/plans":{"get":{"operationId":"getAdminOpsPlans","summary":"Plans with prices, limits and cost","tags":["admin-ops"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/plans' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminOpsPlans","summary":"Create or change a plan","tags":["admin-ops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"name":{"type":"object","properties":{"zh":{"type":"string","minLength":1,"maxLength":80},"th":{"type":"string","minLength":1,"maxLength":80},"en":{"type":"string","minLength":1,"maxLength":80}},"required":["zh","th","en"]},"description":{"type":"object","properties":{"zh":{"type":"string","maxLength":300},"th":{"type":"string","maxLength":300},"en":{"type":"string","maxLength":300}},"required":["zh","th","en"]},"audience":{"type":"string","enum":["to_c","smb","enterprise"]},"quotas":{"type":"object","properties":{"concurrentCalls":{"type":"integer","minimum":0,"maximum":10000},"dailyCalls":{"type":"integer","minimum":0,"maximum":10000000},"contacts":{"type":"integer","minimum":0,"maximum":100000000},"kbMb":{"type":"integer","minimum":0,"maximum":1000000},"seats":{"type":"integer","minimum":1,"maximum":100000},"outcomePackages":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"string","const":"all"}]},"api":{"type":"boolean"},"approvals":{"type":"boolean"},"subAccounts":{"type":"boolean"}},"required":["concurrentCalls","dailyCalls","contacts","kbMb","seats","outcomePackages","api","approvals","subAccounts"],"additionalProperties":false},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"monthNumber":{"type":"string","pattern":"^\\d{1,10}$"},"yearNumber":{"anyOf":[{"type":"string","pattern":"^\\d{1,10}$"},{"type":"null"}]},"costSatang":{"type":"string","pattern":"^\\d{1,10}$"},"tierRank":{"type":"integer","minimum":1,"maximum":50},"sortOrder":{"type":"integer","minimum":0,"maximum":100},"active":{"type":"boolean"}},"required":["code","name","audience","quotas","monthNumber","costSatang","tierRank"],"additionalProperties":false},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["plan","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/plans' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"plan\":{\"code\":\"123456\",\"name\":{\"zh\":\"string\",\"th\":\"string\",\"en\":\"string\"},\"audience\":\"to_c\",\"quotas\":{\"concurrentCalls\":0,\"dailyCalls\":0,\"contacts\":0,\"kbMb\":0,\"seats\":1,\"outcomePackages\":0,\"api\":false,\"approvals\":false,\"subAccounts\":false},\"monthNumber\":\"string\",\"costSatang\":\"string\",\"tierRank\":1},\"reason\":\"string\"}'"}]}},"/api/v1/admin/ops/review":{"get":{"operationId":"getAdminOpsReview","summary":"Unified review queues","tags":["admin-ops"],"parameters":[{"name":"queue","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["scripts","templates","senders","content","all"]}},{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","decided","all"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/review' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/review/{queue}/{id}":{"post":{"operationId":"postAdminOpsReviewQueueId","summary":"Approve or reject a review item","tags":["admin-ops"],"parameters":[{"name":"queue","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reason":{"default":"","type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/review/QUEUE/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\"}'"}]}},"/api/v1/admin/ops/script-review":{"get":{"operationId":"getAdminOpsScriptReview","summary":"Script review queue","tags":["admin-ai"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"content:review","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/ops/script-review' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/ops/script-review/{id}":{"post":{"operationId":"postAdminOpsScriptReviewId","summary":"Approve or reject a script (second person; approving publishes a template version)","tags":["admin-ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"content:review","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/ops/script-review/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\"}'"}]}},"/api/v1/admin/payments/chargebacks":{"get":{"operationId":"getAdminPaymentsChargebacks","summary":"Chargebacks","tags":["admin-payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/payments/chargebacks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/chargebacks/release":{"post":{"operationId":"postAdminPaymentsChargebacksRelease","summary":"Release a chargeback-debt suspension","tags":["admin-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":64},"writeOff":{"type":"boolean"},"note":{"type":"string","minLength":3,"maxLength":300}},"required":["tenantId","writeOff","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:unblock","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/chargebacks/release' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\",\"writeOff\":false,\"note\":\"string\"}'"}]}},"/api/v1/admin/payments/gateways":{"get":{"operationId":"getAdminPaymentsGateways","summary":"Gateways, routing matrix, live_charging gate","tags":["admin-payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/payments/gateways' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/intents":{"get":{"operationId":"getAdminPaymentsIntents","summary":"All payments (finance console)","tags":["admin-payments"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["created","pending","succeeded","failed","expired","canceled","partially_refunded","refunded","requires_action","charged_back","suspense"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"method","in":"query","required":false,"schema":{"type":"string","enum":["promptpay","card","truemoney","rabbit_linepay","alipay","wechat","unionpay"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":300}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/payments/intents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/intents/{id}/recheck":{"post":{"operationId":"postAdminPaymentsIntentsIdRecheck","summary":"Re-check a payment at the gateway and re-post it to the ledger","tags":["admin-payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/intents/ID/recheck' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/refunds":{"get":{"operationId":"getAdminPaymentsRefunds","summary":"All refunds (finance console)","tags":["admin-payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/payments/refunds' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/refunds/{id}/alternative":{"post":{"operationId":"postAdminPaymentsRefundsIdAlternative","summary":"Complete a failed refund via an alternative path (same account holder)","tags":["admin-payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payeeName":{"type":"string","minLength":2,"maxLength":200},"accountLast4":{"type":"string","pattern":"^\\d{4}$"},"note":{"type":"string","minLength":3,"maxLength":300}},"required":["payeeName","accountLast4","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"refunds:approve","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/refunds/ID/alternative' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"payeeName\":\"string\",\"accountLast4\":\"string\",\"note\":\"string\"}'"}]}},"/api/v1/admin/payments/refunds/{id}/approve":{"post":{"operationId":"postAdminPaymentsRefundsIdApprove","summary":"Approve a refund request","tags":["admin-payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"refunds:approve","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/refunds/ID/approve' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/refunds/{id}/reject":{"post":{"operationId":"postAdminPaymentsRefundsIdReject","summary":"Reject a refund request","tags":["admin-payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"refunds:approve","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/refunds/ID/reject' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/payments/settlements":{"get":{"operationId":"getAdminPaymentsSettlements","summary":"Gateway settlements and reserves","tags":["admin-payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/payments/settlements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/settlements/import":{"post":{"operationId":"postAdminPaymentsSettlementsImport","summary":"Import settlements and release due reserves now","tags":["admin-payments"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/settlements/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/simulator":{"post":{"operationId":"postAdminPaymentsSimulator","summary":"Payment simulator controls","tags":["admin-payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"gateway_down"},"code":{"type":"string","minLength":2,"maxLength":32},"down":{"type":"boolean"}},"required":["action","code","down"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"open_dispute"},"intentId":{"type":"string","minLength":1,"maxLength":64}},"required":["action","intentId"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"resolve_dispute"},"chargebackId":{"type":"string","minLength":1,"maxLength":64},"outcome":{"type":"string","enum":["won","lost"]}},"required":["action","chargebackId","outcome"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"complete_refund"},"refundId":{"type":"string","minLength":1,"maxLength":64}},"required":["action","refundId"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"set_fx_rate"},"rate":{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,8})?$"}},"required":["action","rate"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/simulator' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"gateway_down\",\"code\":\"123456\",\"down\":false}'"}]}},"/api/v1/admin/payments/suspense":{"get":{"operationId":"getAdminPaymentsSuspense","summary":"Reconciliation suspense items","tags":["admin-payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"ledger:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/payments/suspense' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/payments/suspense/{id}/resolve":{"post":{"operationId":"postAdminPaymentsSuspenseIdResolve","summary":"Decide a parked payment: credit as received, refund, or dismiss","tags":["admin-payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["credit","refund","dismiss"]},"note":{"type":"string","maxLength":300}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"finance:close","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/payments/suspense/ID/resolve' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"credit\"}'"}]}},"/api/v1/admin/positions":{"post":{"operationId":"postAdminPositions","summary":"Create a position bound to role packs","tags":["admin-org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"departmentId":{"type":"string","minLength":1},"title":{"type":"string","minLength":2,"maxLength":100},"defaultRoles":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","enum":["platform_admin","platform_ops","platform_finance","ops_pricing","ops_content_review","ops_sender_review","support_l1","support_l2","risk","dpo","legal","oncall","auditor_readonly","finance","sales","boss","tech","agent_admin","hr"]}},"active":{"default":true,"type":"boolean"}},"required":["departmentId","title"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/positions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"departmentId\":\"string\",\"title\":\"string\"}'"}]}},"/api/v1/admin/positions/{id}":{"put":{"operationId":"putAdminPositionsId","summary":"Update a position","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"departmentId":{"type":"string","minLength":1},"title":{"type":"string","minLength":2,"maxLength":100},"defaultRoles":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","enum":["platform_admin","platform_ops","platform_finance","ops_pricing","ops_content_review","ops_sender_review","support_l1","support_l2","risk","dpo","legal","oncall","auditor_readonly","finance","sales","boss","tech","agent_admin","hr"]}},"active":{"default":true,"type":"boolean"}},"required":["departmentId","title"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/positions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"departmentId\":\"string\",\"title\":\"string\"}'"}]}},"/api/v1/admin/pricing/decks":{"get":{"operationId":"getAdminPricingDecks","summary":"Rate decks (sell / cost / contract)","tags":["admin-pricing"],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["sell","cost"]}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["public","tenant","supplier"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/pricing/decks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/pricing/decks/{id}":{"get":{"operationId":"getAdminPricingDecksId","summary":"A deck with its lines and diff","tags":["admin-pricing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/pricing/decks/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/pricing/decks/{id}/reject":{"post":{"operationId":"postAdminPricingDecksIdReject","summary":"Discard a draft or pending deck","tags":["admin-pricing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/pricing/decks/ID/reject' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/pricing/decks/{id}/submit":{"post":{"operationId":"postAdminPricingDecksIdSubmit","summary":"Submit a draft deck for approval","tags":["admin-pricing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/pricing/decks/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/pricing/decks/import":{"post":{"operationId":"postAdminPricingDecksImport","summary":"Import a rate deck file (CSV/XLSX) as a draft","tags":["admin-pricing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^(public|cost:[a-z0-9_-]{1,40}|ka:[a-z0-9_-]{1,40})$"},"kind":{"type":"string","enum":["sell","cost"]},"scope":{"type":"string","enum":["public","tenant","supplier"]},"tenantId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"providerId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"title":{"type":"string","maxLength":120},"effectiveFrom":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"fileName":{"type":"string","maxLength":120},"contentBase64":{"type":"string","maxLength":8000000},"note":{"type":"string","maxLength":300}},"required":["code","kind","scope","effectiveFrom","fileName","contentBase64"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"pricing:edit","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/pricing/decks/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\",\"kind\":\"sell\",\"scope\":\"public\",\"effectiveFrom\":\"2026-12-01T03:00:00Z\",\"fileName\":\"string\",\"contentBase64\":\"string\"}'"}]}},"/api/v1/admin/pricing/margins":{"get":{"operationId":"getAdminPricingMargins","summary":"Public lines against upstream cost (margin floors)","tags":["admin-pricing"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/pricing/margins' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/pricing/usage":{"get":{"operationId":"getAdminPricingUsage","summary":"Recent rated usage with cost and margin","tags":["admin-pricing"],"parameters":[{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/pricing/usage' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/risk/appeals":{"get":{"operationId":"getAdminRiskAppeals","summary":"Unlock appeals (15-minute SLA), emergency freezes and account recoveries","tags":["admin-risk"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","all"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/appeals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskAppeals","summary":"Start a company account recovery","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":80},"ownerContact":{"type":"string","minLength":5,"maxLength":200},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["tenantId","ownerContact","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/appeals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\",\"ownerContact\":\"string\",\"note\":\"string\"}'"}]}},"/api/v1/admin/risk/appeals/{id}":{"post":{"operationId":"postAdminRiskAppealsId","summary":"Decide an appeal / lift a freeze / approve a company recovery","tags":["admin-risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"appeal"},"decision":{"type":"string","enum":["approve","reject"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["kind","decision","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"freeze"},"callbackVerified":{"type":"boolean"},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["kind","callbackVerified","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"recovery"},"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["kind","decision","note"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:unblock","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/appeals/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"appeal\",\"decision\":\"approve\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/risk/breakers":{"get":{"operationId":"getAdminRiskBreakers","summary":"Breaker states (low balance, spend growth, night burst, same-number, provider, OTP)","tags":["admin-risk"],"parameters":[{"name":"state","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["open","all"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/breakers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskBreakers","summary":"Open a manual breaker on one tenant","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":80},"capability":{"type":"string","enum":["all","sms","voice","ai","topup","signup","api","keys"]},"reason":{"type":"string","minLength":3,"maxLength":500},"color":{"type":"string","enum":["yellow","orange","red"]}},"required":["tenantId","capability","reason","color"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/breakers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\",\"capability\":\"all\",\"reason\":\"string\",\"color\":\"yellow\"}'"}]}},"/api/v1/admin/risk/breakers/{id}":{"post":{"operationId":"postAdminRiskBreakersId","summary":"Close a breaker (red needs a second person)","tags":["admin-risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:unblock","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/breakers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/risk/devices":{"get":{"operationId":"getAdminRiskDevices","summary":"Devices shared by several accounts, busy networks and the accounts behind them","tags":["admin-risk"],"parameters":[{"name":"minAccounts","in":"query","required":false,"schema":{"default":2,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/devices' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskDevices","summary":"Block / unblock a device","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"blocked":{"type":"boolean"},"reason":{"default":"","type":"string","maxLength":500}},"required":["hash","blocked"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/devices' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"hash\":\"string\",\"blocked\":false}'"}]}},"/api/v1/admin/risk/events":{"get":{"operationId":"getAdminRiskEvents","summary":"Risk decisions (score, friction, the rules that fired), fraud flags and limit events","tags":["admin-risk"],"parameters":[{"name":"friction","in":"query","required":false,"schema":{"type":"string","enum":["green","yellow","orange","red"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"action","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/events' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskEvents","summary":"Confirm or dismiss a fraud flag","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flagId":{"type":"string","minLength":1,"maxLength":80},"status":{"type":"string","enum":["confirmed","dismissed"]},"note":{"type":"string","maxLength":500}},"required":["flagId","status"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/events' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"flagId\":\"string\",\"status\":\"confirmed\"}'"}]}},"/api/v1/admin/risk/kill-switches":{"get":{"operationId":"getAdminRiskKillSwitches","summary":"Emergency switches (global / tenant / capability) — all OFF by default","tags":["admin-risk"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:kill_switch","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/kill-switches' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskKillSwitches","summary":"Switch an emergency switch ON","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["global","tenant","capability"]},"tenantId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"capability":{"default":"all","type":"string","enum":["all","sms","voice","ai","topup","signup","api","keys"]},"reason":{"type":"string","minLength":3,"maxLength":500},"durationMin":{"anyOf":[{"type":"integer","minimum":1,"maximum":10080},{"type":"null"}]}},"required":["scope","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:kill_switch","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/kill-switches' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"global\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/risk/kill-switches/{id}":{"post":{"operationId":"postAdminRiskKillSwitchesId","summary":"Request to lift a kill switch","tags":["admin-risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:kill_switch","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/kill-switches/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/risk/kyc-queue":{"get":{"operationId":"getAdminRiskKycQueue","summary":"KYC review queue (exceptions only)","tags":["admin-risk"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","all"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/kyc-queue' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/risk/kyc-queue/{id}":{"get":{"operationId":"getAdminRiskKycQueueId","summary":"KYC case detail (ID number is never shown in full)","tags":["admin-risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/kyc-queue/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskKycQueueId","summary":"Claim / approve / reject / ask for more","tags":["admin-risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"claim"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"approve"},"level":{"default":"L2","type":"string","enum":["L2","L3"]},"reason":{"type":"string","maxLength":500}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"reject"},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["action","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"more_info"},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["action","reason"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/kyc-queue/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"claim\"}'"}]}},"/api/v1/admin/risk/kyc-queue/{id}/documents/{docId}":{"get":{"operationId":"getAdminRiskKycQueueIdDocumentsDocId","summary":"View a KYC document image (audited)","tags":["admin-risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/kyc-queue/ID/documents/DOCID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/risk/limits":{"get":{"operationId":"getAdminRiskLimits","summary":"Tenants on the ladder, potential-loss board, waiting list and forecasts to decide","tags":["admin-risk"],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","maxLength":10}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/limits' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskLimits","summary":"Set a tenant tier / decide a forecast / invite the waiting list / run the nightly evaluation now","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"set_tier"},"tenantId":{"type":"string","minLength":1,"maxLength":80},"tier":{"type":"string","maxLength":10},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["action","tenantId","tier","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"decide_forecast"},"id":{"type":"string","minLength":1,"maxLength":80},"decision":{"type":"string","enum":["approve","reject"]},"boostBp":{"type":"integer","minimum":10000,"maximum":1000000},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["action","id","decision","reason"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"invite_waitlist"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"run_nightly"}},"required":["action"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/limits' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"set_tier\",\"tenantId\":\"string\",\"tier\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/risk/rules":{"get":{"operationId":"getAdminRiskRules","summary":"Risk rules, thresholds, ladder, breaker configs, protected senders","tags":["admin-risk"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/risk/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminRiskRules","summary":"Propose a rule / ladder / breaker / threshold change (approval)","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"change":{},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["change","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/risk/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"change\":\"string\",\"reason\":\"string\"}'"}]},"put":{"operationId":"putAdminRiskRules","summary":"Maintain protected senders / disposable e-mail domains","tags":["admin-risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"protected_sender"},"term":{"type":"string","minLength":2,"maxLength":80},"category":{"type":"string","enum":["bank","government","police","courier","telco","utility","marketplace","other"]},"aliases":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"active":{"default":true,"type":"boolean"}},"required":["kind","term","category"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"disposable_domain"},"domain":{"type":"string","minLength":4,"maxLength":120},"active":{"type":"boolean"}},"required":["kind","domain","active"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"risk:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/risk/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"protected_sender\",\"term\":\"string\",\"category\":\"transactional\"}'"}]}},"/api/v1/admin/sales/agents":{"get":{"operationId":"getAdminSalesAgents","summary":"Agents: onboarding state (KYC, agreement) and flagged referrals","tags":["admin-sales"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/agents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/agents/{id}/agreement":{"post":{"operationId":"postAdminSalesAgentsIdAgreement","summary":"Send the agency agreement to the agent for e-signature","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/agents/ID/agreement' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/agents/{id}/kyc":{"post":{"operationId":"postAdminSalesAgentsIdKyc","summary":"Approve or reject an agent's KYC","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":300},"rateBp":{"type":"integer","minimum":0,"maximum":3000}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/agents/ID/kyc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\"}'"}]}},"/api/v1/admin/sales/agents/flags/{id}":{"post":{"operationId":"postAdminSalesAgentsFlagsId","summary":"Review a self-referral / shell-tenant flag (clear or confirm)","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["clear","confirm"]},"note":{"type":"string","minLength":3,"maxLength":300}},"required":["decision","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/agents/flags/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"clear\",\"note\":\"string\"}'"}]}},"/api/v1/admin/sales/commissions":{"get":{"operationId":"getAdminSalesCommissions","summary":"Commission runs and the open disputes queue","tags":["admin-sales"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/commissions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminSalesCommissions","summary":"Build the commission run for a month and file it for approval (no-op when the month already has a run)","tags":["admin-sales"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},"required":["period"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/commissions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"period\":\"string\"}'"}]}},"/api/v1/admin/sales/commissions/{id}":{"get":{"operationId":"getAdminSalesCommissionsId","summary":"One commission run with per-agent lines","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/commissions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/commissions/{id}/decide":{"post":{"operationId":"postAdminSalesCommissionsIdDecide","summary":"Approve or reject a commission run","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":300}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/commissions/ID/decide' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\"}'"}]}},"/api/v1/admin/sales/commissions/{id}/submit":{"post":{"operationId":"postAdminSalesCommissionsIdSubmit","summary":"File a draft commission run for approval","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/commissions/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/disputes":{"get":{"operationId":"getAdminSalesDisputes","summary":"Commission disputes","tags":["admin-sales"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","upheld","rejected"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/disputes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/disputes/{id}/resolve":{"post":{"operationId":"postAdminSalesDisputesIdResolve","summary":"Resolve a commission dispute (upheld with optional adjustment / rejected)","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["upheld","rejected"]},"resolution":{"type":"string","minLength":3,"maxLength":1000},"adjustmentSatang":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}$"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]},"sourceTenantId":{"type":"string","maxLength":40}},"required":["decision","resolution"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/disputes/ID/resolve' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"upheld\",\"resolution\":\"string\"}'"}]}},"/api/v1/admin/sales/followups":{"get":{"operationId":"getAdminSalesFollowups","summary":"Open follow-ups (mine or everybody's)","tags":["admin-sales"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"default":"mine","type":"string","enum":["mine","all"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/followups' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/followups/{id}":{"post":{"operationId":"postAdminSalesFollowupsId","summary":"Close a follow-up (done / cancelled)","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"default":"done","type":"string","enum":["done","cancelled"]}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/followups/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/sales/leads":{"get":{"operationId":"getAdminSalesLeads","summary":"CRM leads (pipeline board / list)","tags":["admin-sales"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","contacted","qualified","proposal","negotiation","won","lost"]}},{"name":"ownerId","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"limit","in":"query","required":false,"schema":{"default":300,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/leads' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminSalesLeads","summary":"Create a lead (deduplicated, round-robin owner)","tags":["admin-sales"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"source":{"default":"web","type":"string","enum":["web","referral","agent","event","outbound","import"]},"valueSatang":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"integer","minimum":0,"maximum":9007199254740991}]},{"type":"null"}]},"referralCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"resellerId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"consentNote":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\"}'"}]}},"/api/v1/admin/sales/leads/{id}":{"get":{"operationId":"getAdminSalesLeadsId","summary":"Lead detail: timeline, follow-ups, quote, contract","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchAdminSalesLeadsId","summary":"Change the lead owner","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ownerId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["ownerId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ownerId\":\"string\"}'"}]}},"/api/v1/admin/sales/leads/{id}/contract":{"post":{"operationId":"postAdminSalesLeadsIdContract","summary":"Draft the lead contract (b10 document, one per lead)","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"counterpartyAddress":{"type":"string","minLength":5,"maxLength":400},"taxId":{"type":"string","maxLength":20},"startsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"autoRenew":{"type":"boolean"}},"required":["counterpartyAddress","startsAt","endsAt"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/contract' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"counterpartyAddress\":\"string\",\"startsAt\":\"string\",\"endsAt\":\"string\"}'"}]},"put":{"operationId":"putAdminSalesLeadsIdContract","summary":"Send the contract to the lead for e-signature","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/contract' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sales/leads/{id}/convert":{"post":{"operationId":"postAdminSalesLeadsIdConvert","summary":"Link the lead to a customer account (won)","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":40}},"required":["tenantId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/convert' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\"}'"}]}},"/api/v1/admin/sales/leads/{id}/followups":{"post":{"operationId":"postAdminSalesLeadsIdFollowups","summary":"Schedule a follow-up","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dueAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"note":{"type":"string","minLength":1,"maxLength":300},"assigneeId":{"type":"string","maxLength":40}},"required":["dueAt","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/followups' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"dueAt\":\"2026-12-01T03:00:00Z\",\"note\":\"string\"}'"}]}},"/api/v1/admin/sales/leads/{id}/move":{"post":{"operationId":"postAdminSalesLeadsIdMove","summary":"Move a lead to another pipeline stage","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["new","contacted","qualified","proposal","negotiation","won","lost"]},"lostReason":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":300}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/move' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/admin/sales/leads/{id}/notes":{"post":{"operationId":"postAdminSalesLeadsIdNotes","summary":"Add a note / call / e-mail to the lead timeline","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"note","type":"string","enum":["note","call","email"]},"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["body"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/notes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/admin/sales/leads/{id}/quote":{"post":{"operationId":"postAdminSalesLeadsIdQuote","summary":"Link a quote (existing reference) or create a price quote for the lead","tags":["admin-sales"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"quoteRef":{"type":"string","maxLength":60}},"required":["quoteRef"],"additionalProperties":false},{"type":"object","properties":{"customer":{"default":"business_vat","type":"string","enum":["personal","business_non_vat","business_vat"]},"items":{"minItems":1,"maxItems":30,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"usage"},"product":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"units":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","pattern":"^\\d{1,10}$"}]},"destination":{"type":"string","pattern":"^\\+?[0-9]{0,15}$"}},"required":["kind","product","units"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan"},"planCode":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"period":{"type":"string","enum":["month","year"]}},"required":["kind","planCode","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pack"},"packCode":{"type":"string","pattern":"^[a-z0-9_]{2,60}$"},"qty":{"default":1,"type":"integer","minimum":1,"maximum":10}},"required":["kind","packCode"],"additionalProperties":false}]}},"couponCode":{"type":"string","maxLength":40}},"required":["items"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/ID/quote' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"quoteRef\":\"string\"}'"}]}},"/api/v1/admin/sales/leads/import":{"post":{"operationId":"postAdminSalesLeadsImport","summary":"Import leads from CSV text (name,company,phone,email,source,value,consent)","tags":["admin-sales"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":5,"maxLength":1000000}},"required":["csv"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sales/leads/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"csv\":\"number\\n+66000000001\\n\"}'"}]}},"/api/v1/admin/sales/reports":{"get":{"operationId":"getAdminSalesReports","summary":"Pipeline and forecast report","tags":["admin-sales"],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"crm:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sales/reports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/search":{"get":{"operationId":"getAdminSearch","summary":"Global search","tags":["admin-shell"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/search' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/sop":{"get":{"operationId":"getAdminSop","summary":"SOP knowledge base","tags":["admin-collab"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["incident","finance","support","risk","compliance","hr","engineering"]}},{"name":"archived","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sop' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminSop","summary":"Create an SOP article","tags":["admin-collab"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,78}$"},"title":{"type":"string","minLength":3,"maxLength":160},"category":{"type":"string","enum":["incident","finance","support","risk","compliance","hr","engineering"]},"bodyMd":{"type":"string","minLength":1,"maxLength":60000},"status":{"default":"published","type":"string","enum":["draft","published"]}},"required":["slug","title","category","bodyMd"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sop:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/sop' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"slug\":\"string\",\"title\":\"string\",\"category\":\"transactional\",\"bodyMd\":\"string\"}'"}]}},"/api/v1/admin/sop/{slug}":{"get":{"operationId":"getAdminSopSlug","summary":"SOP article (any version)","tags":["admin-collab"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/sop/SLUG' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminSopSlug","summary":"Save a new version of an SOP article","tags":["admin-collab"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":160},"bodyMd":{"type":"string","minLength":1,"maxLength":60000},"note":{"type":"string","maxLength":200},"category":{"type":"string","enum":["incident","finance","support","risk","compliance","hr","engineering"]},"status":{"type":"string","enum":["draft","published","archived"]}},"required":["title","bodyMd"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sop:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/sop/SLUG' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\":\"string\",\"bodyMd\":\"string\"}'"}]}},"/api/v1/admin/staff":{"get":{"operationId":"getAdminStaff","summary":"Staff directory","tags":["admin-org"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"includeOffboarded","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/staff' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminStaff","summary":"Create a staff account","tags":["admin-org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":2,"maxLength":120},"departmentId":{"type":["string","null"]},"positionId":{"type":["string","null"]},"managerId":{"type":["string","null"]},"employeeNo":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"entityScope":{"default":[],"type":"array","items":{"type":"string","enum":["platform","telecom"]}},"roles":{"default":[],"type":"array","items":{"type":"string","enum":["platform_admin","platform_ops","platform_finance","ops_pricing","ops_content_review","ops_sender_review","support_l1","support_l2","risk","dpo","legal","oncall","auditor_readonly","finance","sales","boss","tech","agent_admin","hr"]}}},"required":["email","name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/staff' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"string\",\"name\":\"My key\"}'"}]}},"/api/v1/admin/staff-reviews":{"get":{"operationId":"getAdminStaffReviews","summary":"Quarterly access reviews","tags":["admin-org"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/staff-reviews' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminStaffReviews","summary":"Start this quarter's access review","tags":["admin-org"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/staff-reviews' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/staff-reviews/{id}/complete":{"post":{"operationId":"postAdminStaffReviewsIdComplete","summary":"Complete an access review","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/staff-reviews/ID/complete' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/staff-reviews/items/{id}":{"put":{"operationId":"putAdminStaffReviewsItemsId","summary":"Keep or reduce one person's access","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["keep","revoke"]},"rolesAfter":{"maxItems":8,"type":"array","items":{"type":"string","enum":["platform_admin","platform_ops","platform_finance","ops_pricing","ops_content_review","ops_sender_review","support_l1","support_l2","risk","dpo","legal","oncall","auditor_readonly","finance","sales","boss","tech","agent_admin","hr"]}},"note":{"type":"string","maxLength":300}},"required":["decision"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/staff-reviews/items/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"keep\"}'"}]}},"/api/v1/admin/staff/{id}":{"get":{"operationId":"getAdminStaffId","summary":"Staff member","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/staff/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchAdminStaffId","summary":"Update a staff member","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"departmentId":{"type":["string","null"]},"positionId":{"type":["string","null"]},"managerId":{"type":["string","null"]},"employeeNo":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"entityScope":{"type":"array","items":{"type":"string","enum":["platform","telecom"]}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/staff/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/staff/{id}/availability":{"put":{"operationId":"putAdminStaffIdAvailability","summary":"Mark staff unavailable (leave) or available","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"until":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"reason":{"type":"string","maxLength":200}},"required":["until"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/staff/ID/availability' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"until\":\"2026-12-01T03:00:00Z\"}'"}]}},"/api/v1/admin/staff/{id}/offboard":{"post":{"operationId":"postAdminStaffIdOffboard","summary":"One-click offboarding","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reassignToId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["reassignToId","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/staff/ID/offboard' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reassignToId\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/staff/{id}/offboarding":{"get":{"operationId":"getAdminStaffIdOffboarding","summary":"Offboarding record and checklist","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/staff/ID/offboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminStaffIdOffboarding","summary":"Tick an external-credential checklist item","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","enum":["supplier_portals","cloud_console","payment_gateway_dashboard","line_oa_admin","domain_registrar","password_vault","shared_mailboxes","device_return"]},"done":{"type":"boolean"}},"required":["key","done"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/staff/ID/offboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"supplier_portals\",\"done\":false}'"}]}},"/api/v1/admin/staff/{id}/roles":{"put":{"operationId":"putAdminStaffIdRoles","summary":"Replace role packs (SoD enforced)","tags":["admin-org"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"maxItems":8,"type":"array","items":{"type":"string","enum":["platform_admin","platform_ops","platform_finance","ops_pricing","ops_content_review","ops_sender_review","support_l1","support_l2","risk","dpo","legal","oncall","auditor_readonly","finance","sales","boss","tech","agent_admin","hr"]}},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["roles","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"staff:grant_roles","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/staff/ID/roles' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"roles\":[\"platform_admin\"],\"reason\":\"string\"}'"}]}},"/api/v1/admin/staff/directory":{"get":{"operationId":"getAdminStaffDirectory","summary":"Active staff names for pickers","tags":["admin-org"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/staff/directory' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/agents":{"get":{"operationId":"getAdminSupportAgents","summary":"Support agents available for assignment","tags":["admin-support"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/agents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/complaints":{"get":{"operationId":"getAdminSupportComplaints","summary":"Complaints and fraud-report board (open, breached, CSAT)","tags":["admin-support"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/complaints' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/customers":{"get":{"operationId":"getAdminSupportCustomers","summary":"Find a customer account by name or id","tags":["admin-support"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":80}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/customers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/customers/{tenantId}":{"get":{"operationId":"getAdminSupportCustomersTenantId","summary":"Customer 360 (masked contact data, wallet, calls, payments, tickets)","tags":["admin-support"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/customers/TENANTID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/handoff":{"post":{"operationId":"postAdminSupportHandoff","summary":"Hand a phone-AI call over to the support inbox","tags":["admin-support"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string","minLength":1,"maxLength":60},"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["callId","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/handoff' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"callId\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/support/kb-gaps":{"get":{"operationId":"getAdminSupportKbGaps","summary":"Knowledge-base gap reports","tags":["admin-support"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","accepted","dismissed","all"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/kb-gaps' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/kb-gaps/{id}":{"patch":{"operationId":"patchAdminSupportKbGapsId","summary":"Accept or dismiss a knowledge-base gap","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["accepted","dismissed"]},"note":{"type":"string","maxLength":500}},"required":["status"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l2","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/support/kb-gaps/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\":\"accepted\"}'"}]}},"/api/v1/admin/support/line/rich-menu":{"post":{"operationId":"postAdminSupportLineRichMenu","summary":"Create the LINE rich menu and set it as default (support lead)","tags":["admin-support"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"default":"th","type":"string","enum":["zh","th","en"]}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l2","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/line/rich-menu' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/support/settings":{"get":{"operationId":"getAdminSupportSettings","summary":"Human-fallback hours and SLA policies","tags":["admin-support"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/settings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminSupportSettings","summary":"Update human-fallback hours and/or one SLA policy (support lead)","tags":["admin-support"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hours":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"languages":{"default":["th","zh","en"],"minItems":1,"type":"array","items":{"type":"string","enum":["zh","th","en"]}}},"required":["days","start","end"]},"policy":{"type":"object","properties":{"priority":{"type":"string","enum":["P1","P2","P3","P4"]},"firstResponseMin":{"type":"integer","minimum":1,"maximum":10080},"resolutionMin":{"type":"integer","minimum":1,"maximum":43200},"businessHoursOnly":{"type":"boolean"}},"required":["priority","firstResponseMin","resolutionMin","businessHoursOnly"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l2","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/support/settings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/support/threads":{"get":{"operationId":"getAdminSupportThreads","summary":"Unified inbox: phone-AI hand-offs, LINE, web chat, e-mail","tags":["admin-support"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"active","type":"string","enum":["open","pending","resolved","closed","active"]}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","enum":["phone_ai","line","web_chat","email"]}},{"name":"unread","in":"query","required":false,"schema":{"default":"0","type":"string","enum":["0","1"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":300}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/threads' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/threads/{id}":{"get":{"operationId":"getAdminSupportThreadsId","summary":"Conversation with its linked ticket and customer (marks it read)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/threads/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/threads/{id}/reply":{"post":{"operationId":"postAdminSupportThreadsIdReply","summary":"Reply to the customer","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/threads/ID/reply' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/admin/support/threads/{id}/status":{"post":{"operationId":"postAdminSupportThreadsIdStatus","summary":"Open / pend / resolve / close a conversation","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","pending","resolved","closed"]}},"required":["status"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/threads/ID/status' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\":\"open\"}'"}]}},"/api/v1/admin/support/threads/{id}/ticket":{"post":{"operationId":"postAdminSupportThreadsIdTicket","summary":"Create a ticket from a conversation","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":3,"maxLength":200},"category":{"default":"general","type":"string","enum":["general","complaint","fraud_report","billing","tech"]},"priority":{"default":"P3","type":"string","enum":["P1","P2","P3","P4"]}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/threads/ID/ticket' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/support/tickets":{"get":{"operationId":"getAdminSupportTickets","summary":"Tickets with SLA state (filter by status, priority, category, assignee, breached)","tags":["admin-support"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"open_all","type":"string","enum":["open","in_progress","waiting_customer","resolved","closed","open_all"]}},{"name":"priority","in":"query","required":false,"schema":{"type":"string","enum":["P1","P2","P3","P4"]}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["general","complaint","fraud_report","billing","tech"]}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"breached","in":"query","required":false,"schema":{"default":"0","type":"string","enum":["0","1"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":300}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/tickets' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminSupportTickets","summary":"Create a ticket on behalf of a customer account","tags":["admin-support"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","maxLength":5000},"category":{"default":"general","type":"string","enum":["general","complaint","fraud_report","billing","tech"]},"priority":{"type":"string","enum":["P1","P2","P3","P4"]},"tenantId":{"type":"string","minLength":1,"maxLength":60},"channel":{"default":"phone","type":"string","enum":["phone","line","web","email"]}},"required":["subject","tenantId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"subject\":\"string\",\"tenantId\":\"string\"}'"}]}},"/api/v1/admin/support/tickets/{id}":{"get":{"operationId":"getAdminSupportTicketsId","summary":"Ticket detail for staff (includes internal notes)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/support/tickets/{id}/assign":{"post":{"operationId":"postAdminSupportTicketsIdAssign","summary":"Assign a ticket (null = unassign)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assigneeId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["assigneeId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/assign' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"assigneeId\":\"string\"}'"}]}},"/api/v1/admin/support/tickets/{id}/compensation":{"post":{"operationId":"postAdminSupportTicketsIdCompensation","summary":"Request a compensation (goes to the approval centre)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["wallet_credit","credit_note"]},"amountSatang":{"type":"string","pattern":"^[1-9]\\d{0,9}$"},"reason":{"type":"string","minLength":5,"maxLength":500},"originalDocId":{"type":"string","minLength":1,"maxLength":60},"idempotencyKey":{"type":"string","minLength":8,"maxLength":80}},"required":["kind","amountSatang","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/compensation' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"wallet_credit\",\"amountSatang\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/support/tickets/{id}/kb-gap":{"post":{"operationId":"postAdminSupportTicketsIdKbGap","summary":"Report a knowledge-base gap seen on this ticket","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":5,"maxLength":500},"language":{"type":"string","enum":["zh","th","en"]}},"required":["question"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/kb-gap' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"question\":\"string\"}'"}]}},"/api/v1/admin/support/tickets/{id}/notes":{"post":{"operationId":"postAdminSupportTicketsIdNotes","summary":"Add an internal note","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/notes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/admin/support/tickets/{id}/priority":{"post":{"operationId":"postAdminSupportTicketsIdPriority","summary":"Change priority (restarts the SLA timers from the new policy)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priority":{"type":"string","enum":["P1","P2","P3","P4"]}},"required":["priority"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/priority' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"priority\":\"P1\"}'"}]}},"/api/v1/admin/support/tickets/{id}/repost":{"post":{"operationId":"postAdminSupportTicketsIdRepost","summary":"Re-check the payment gateway and re-post the top-up (idempotent)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentIntentId":{"type":"string","minLength":1,"maxLength":60},"idempotencyKey":{"type":"string","minLength":8,"maxLength":80}},"required":["paymentIntentId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/repost' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"paymentIntentId\":\"string\"}'"}]}},"/api/v1/admin/support/tickets/{id}/status":{"post":{"operationId":"postAdminSupportTicketsIdStatus","summary":"Move a ticket through its status machine (resolving asks the customer for a rating)","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["open","in_progress","waiting_customer","resolved","closed"]},"note":{"type":"string","maxLength":300}},"required":["to"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/status' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/admin/support/tickets/{id}/tags":{"post":{"operationId":"postAdminSupportTicketsIdTags","summary":"Add tags to a ticket","tags":["admin-support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}}},"required":["tags"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tickets:l1","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/support/tickets/ID/tags' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tags\":[\"string\"]}'"}]}},"/api/v1/admin/tasks":{"get":{"operationId":"getAdminTasks","summary":"Internal tasks","tags":["admin-collab"],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"default":"mine","type":"string","enum":["mine","created","all"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","in_progress","done","canceled"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/tasks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTasks","summary":"Create and assign a task","tags":["admin-collab"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"assigneeId":{"type":"string","minLength":1},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"priority":{"default":"normal","type":"string","enum":["low","normal","high","urgent"]},"entityCode":{"default":"","type":"string","enum":["","platform","telecom"]}},"required":["title","assigneeId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/tasks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\":\"string\",\"assigneeId\":\"string\"}'"}]}},"/api/v1/admin/tasks/{id}":{"patch":{"operationId":"patchAdminTasksId","summary":"Update, reassign or close a task","tags":["admin-collab"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","done","canceled"]},"assigneeId":{"type":"string"},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"title":{"type":"string","minLength":3,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/tasks/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/admin/tasks/{id}/comments":{"get":{"operationId":"getAdminTasksIdComments","summary":"Task comments","tags":["admin-collab"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/tasks/ID/comments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTasksIdComments","summary":"Comment on a task","tags":["admin-collab"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/tasks/ID/comments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/admin/telecom/calls":{"get":{"operationId":"getAdminTelecomCalls","summary":"Call explorer with provider, attempts, buy cost and margin per call","tags":["admin-telecom"],"parameters":[{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/calls' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/telecom/carrier-profiles":{"get":{"operationId":"getAdminTelecomCarrierProfiles","summary":"Carrier profiles (DLR format, TON/NPI, error map, limits)","tags":["admin-telecom"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/carrier-profiles' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomCarrierProfiles","summary":"Create or update a carrier profile","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"name":{"type":"string","minLength":2,"maxLength":80},"carrierId":{"type":"string","minLength":2,"maxLength":40},"dlrFormat":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"statMap":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"errMap":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"smpp":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"limits":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sipMap":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"urlPolicy":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"senderRules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["code","name","carrierId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/carrier-profiles' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\",\"name\":\"My key\",\"carrierId\":\"string\"}'"}]}},"/api/v1/admin/telecom/cdr":{"get":{"operationId":"getAdminTelecomCdr","summary":"CDR imports and the available carrier file profiles","tags":["admin-telecom"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/cdr' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomCdr","summary":"Import a carrier CDR file (the text) and reconcile it","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string","minLength":3,"maxLength":80},"profile":{"type":"string","enum":["ais","true","nt","generic_csv"]},"text":{"type":"string","minLength":10,"maxLength":20000000},"fileName":{"type":"string","maxLength":120}},"required":["providerId","profile","text"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/cdr' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"providerId\":\"string\",\"profile\":\"ais\",\"text\":\"string\"}'"}]}},"/api/v1/admin/telecom/cdr/{id}":{"get":{"operationId":"getAdminTelecomCdrId","summary":"Records of one CDR import (differences first)","tags":["admin-telecom"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"match","in":"query","required":false,"schema":{"type":"string","enum":["matched","missing_internal","missing_supplier","duration_diff","cost_diff"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/cdr/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/telecom/inbound-sim":{"post":{"operationId":"postAdminTelecomInboundSim","summary":"Simulate an inbound call through a simulated provider","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\+\\d{8,15}$"},"to":{"type":"string","pattern":"^\\+\\d{8,15}$"},"talkSec":{"type":"integer","minimum":1,"maximum":3600},"provider":{"default":"simulator-voice","type":"string","maxLength":60}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/inbound-sim' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"from\":\"ACME\",\"to\":\"+66000000001\"}'"}]}},"/api/v1/admin/telecom/messages":{"get":{"operationId":"getAdminTelecomMessages","summary":"Message explorer with provider, attempts, buy cost and margin","tags":["admin-telecom"],"parameters":[{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","sent","delivered","failed","rejected","expired","received","blocked","scheduled","accepted","sending","undelivered","canceled"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/messages' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/telecom/numbers":{"get":{"operationId":"getAdminTelecomNumbers","summary":"Number inventory, pool health and the allocation register","tags":["admin-telecom"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["available","active","suspended","released"]}},{"name":"tenantId","in":"query","required":false,"schema":{"type":"string"}},{"name":"e164","in":"query","required":false,"schema":{"type":"string"}},{"name":"at","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/numbers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomNumbers","summary":"Add numbers to the inventory","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"numbers":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","pattern":"^\\+66\\d{8,9}$"}},"providerId":{"type":["string","null"]},"region":{"default":"bkk","type":"string","maxLength":20},"kind":{"default":"landline","type":"string","enum":["mobile","landline"]},"monthlyFeeSatang":{},"label":{"type":"string","maxLength":60}},"required":["numbers"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/numbers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"numbers\":[\"+66000000001\"]}'"}]}},"/api/v1/admin/telecom/numbers/{id}":{"patch":{"operationId":"patchAdminTelecomNumbersId","summary":"Suspend / resume / cool-down / pool limits for a number","tags":["admin-telecom"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["suspend","resume","clear_cooldown","limits"]},"reason":{"type":"string","minLength":3,"maxLength":200},"maxCallsPerHour":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"maxCallsPerDay":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]},"restSeconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":3600},{"type":"null"}]}},"required":["action","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/telecom/numbers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"suspend\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/telecom/providers":{"get":{"operationId":"getAdminTelecomProviders","summary":"Provider registry with breaker and health state (no secrets)","tags":["admin-telecom"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/providers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomProviders","summary":"Register a provider","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60,"pattern":"^[a-z0-9][a-z0-9._-]*$"},"kind":{"default":"sms","type":"string","enum":["sms","telephony"]},"adapter":{"type":"string","enum":["simulator","http-carrier","smpp","sip-trunk"]},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secrets":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"priority":{"default":100,"type":"integer","minimum":1,"maximum":1000},"region":{"default":"th-bkk","type":"string","maxLength":30},"carrierId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"carrierProfileCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"simulated":{"type":"boolean"},"billsOn":{"default":"submit","type":"string","enum":["submit","delivered"]},"throughputTps":{"default":50,"type":"integer","minimum":1,"maximum":5000},"tenantId":{"type":["string","null"]}},"required":["name","adapter"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/providers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"adapter\":\"simulator\"}'"}]}},"/api/v1/admin/telecom/providers/{id}":{"patch":{"operationId":"patchAdminTelecomProvidersId","summary":"Change a provider (connection changes of a real provider need approval)","tags":["admin-telecom"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60,"pattern":"^[a-z0-9][a-z0-9._-]*$"},"kind":{"default":"sms","type":"string","enum":["sms","telephony"]},"adapter":{"type":"string","enum":["simulator","http-carrier","smpp","sip-trunk"]},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secrets":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"priority":{"default":100,"type":"integer","minimum":1,"maximum":1000},"region":{"default":"th-bkk","type":"string","maxLength":30},"carrierId":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"carrierProfileCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"simulated":{"type":"boolean"},"billsOn":{"default":"submit","type":"string","enum":["submit","delivered"]},"throughputTps":{"default":50,"type":"integer","minimum":1,"maximum":5000},"tenantId":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused","disabled"]},"pausedReason":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/admin/telecom/providers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]},"post":{"operationId":"postAdminTelecomProvidersId","summary":"Probe a provider or reset its breaker","tags":["admin-telecom"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["test","reset_breaker"]}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/providers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"test\"}'"}]}},"/api/v1/admin/telecom/qos":{"get":{"operationId":"getAdminTelecomQos","summary":"ASR / ACD / PDD per provider and destination prefix","tags":["admin-telecom"],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"default":24,"type":"integer","minimum":1,"maximum":168}},{"name":"providerId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/qos' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomQos","summary":"Rebuild the QoS rollup now","tags":["admin-telecom"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/qos' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/telecom/routing":{"get":{"operationId":"getAdminTelecomRouting","summary":"Routing rules (platform / tenant / campaign / number)","tags":["admin-telecom"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/routing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomRouting","summary":"Create or update a routing rule","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"scope":{"default":"platform","type":"string","enum":["platform","tenant","campaign","number"]},"tenantId":{"type":["string","null"]},"scopeRef":{"type":["string","null"]},"service":{"default":"sms","type":"string","enum":["sms","voice"]},"category":{"anyOf":[{"type":"string","enum":["otp","transactional","marketing"]},{"type":"null"}]},"destPrefix":{"anyOf":[{"type":"string","pattern":"^\\+\\d{1,8}$"},{"type":"null"}]},"strategy":{"default":"priority","type":"string","enum":["priority","least_cost","region","answer_rate","quality","mixed"]},"providerIds":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string"}},"dedicated":{"default":false,"type":"boolean"},"weights":{"anyOf":[{"type":"object","properties":{"cost":{"type":"number","minimum":0,"maximum":1},"quality":{"type":"number","minimum":0,"maximum":1},"priority":{"type":"number","minimum":0,"maximum":1}},"required":["cost","quality","priority"]},{"type":"null"}]},"minMarginMicro":{"anyOf":[{"type":"string","pattern":"^-?\\d+$"},{"type":"null"}]},"active":{"default":true,"type":"boolean"},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["providerIds"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/routing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"providerIds\":[\"string\"]}'"}]},"put":{"operationId":"putAdminTelecomRouting","summary":"Preview the route plan for a destination","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1},"category":{"type":"string","enum":["otp","transactional","marketing"]},"to":{"type":"string","pattern":"^\\+\\d{8,15}$"}},"required":["tenantId","category","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/telecom/routing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\",\"category\":\"transactional\",\"to\":\"+66000000001\"}'"}]}},"/api/v1/admin/telecom/routing/{id}":{"delete":{"operationId":"deleteAdminTelecomRoutingId","summary":"Delete a routing rule","tags":["admin-telecom"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/admin/telecom/routing/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/telecom/senders":{"get":{"operationId":"getAdminTelecomSenders","summary":"Sender ID review queue","tags":["admin-telecom"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","approved","rejected","suspended"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sender:review","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/senders' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/telecom/senders/{id}":{"post":{"operationId":"postAdminTelecomSendersId","summary":"Approve, reject or suspend a sender ID","tags":["admin-telecom"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject","suspend"]},"note":{"type":"string","minLength":3,"maxLength":300}},"required":["decision","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sender:review","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/senders/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"approve\",\"note\":\"string\"}'"}]}},"/api/v1/admin/telecom/supervisor":{"get":{"operationId":"getAdminTelecomSupervisor","summary":"Live calls across all accounts with carrier capability flags","tags":["admin-telecom"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/supervisor' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminTelecomSupervisor","summary":"Supervisor action on a live call (listen, whisper, barge, hangup)","tags":["admin-telecom"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callId":{"type":"string","minLength":3,"maxLength":80},"action":{"type":"string","enum":["listen","whisper","barge","hangup"]},"endpoint":{"type":"string","minLength":3,"maxLength":60},"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["callId","action","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/telecom/supervisor' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"callId\":\"string\",\"action\":\"listen\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/telecom/supervisor/stream":{"get":{"operationId":"getAdminTelecomSupervisorStream","summary":"Live calls, all accounts (SSE snapshots)","tags":["admin-telecom"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"providers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/telecom/supervisor/stream' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/admin/unlocks":{"get":{"operationId":"getAdminUnlocks","summary":"My unlock usage, recent unlocks and access alerts","tags":["admin-privacy"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/unlocks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAdminUnlocks","summary":"Unlock a masked field with a reason","tags":["admin-privacy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceType":{"type":"string","minLength":1,"maxLength":40},"resourceId":{"type":"string","minLength":1,"maxLength":80},"field":{"type":"string","minLength":1,"maxLength":40},"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["resourceType","resourceId","field","reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/unlocks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"resourceType\":\"string\",\"resourceId\":\"string\",\"field\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/admin/unlocks/cap-lift":{"post":{"operationId":"postAdminUnlocksCapLift","summary":"Ask a supervisor for more unlocks today","tags":["admin-privacy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":300}},"required":["reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/unlocks/cap-lift' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/admin/unlocks/preview":{"post":{"operationId":"postAdminUnlocksPreview","summary":"See the masked form of a field","tags":["admin-privacy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceType":{"type":"string","minLength":1,"maxLength":40},"resourceId":{"type":"string","minLength":1,"maxLength":80},"field":{"type":"string","minLength":1,"maxLength":40}},"required":["resourceType","resourceId","field"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/admin/unlocks/preview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"resourceType\":\"string\",\"resourceId\":\"string\",\"field\":\"string\"}'"}]}},"/api/v1/admin/workflows":{"get":{"operationId":"getAdminWorkflows","summary":"Approval workflows, types and backup pools","tags":["admin-approvals"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"admin:access","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/admin/workflows' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putAdminWorkflows","summary":"Create or change one workflow tier","tags":["admin-approvals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1},"entityCode":{"default":"","type":"string","enum":["","platform","telecom"]},"name":{"type":"string","minLength":3,"maxLength":120},"minAmountSatang":{"default":"0","type":"string","pattern":"^\\d{1,15}$"},"steps":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"mode":{"type":"string","enum":["any","all"]},"roles":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","enum":["platform_admin","platform_ops","platform_finance","ops_pricing","ops_content_review","ops_sender_review","support_l1","support_l2","risk","dpo","legal","oncall","auditor_readonly","finance","sales","boss","tech","agent_admin","hr"]}},"userIds":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1}},"slaMinutes":{"type":"integer","minimum":5,"maximum":10080}},"required":["name","mode","slaMinutes"]}},"expireAfterMinutes":{"default":2880,"type":"integer","minimum":5,"maximum":43200},"enabled":{"default":true,"type":"boolean"}},"required":["type","name","steps"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"workflows:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/admin/workflows' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"type\":\"string\",\"name\":\"My key\",\"steps\":[{\"name\":\"My key\",\"mode\":\"line\",\"slaMinutes\":5}]}'"}]}},"/api/v1/admin/workflows/{id}":{"delete":{"operationId":"deleteAdminWorkflowsId","summary":"Disable a workflow tier","tags":["admin-approvals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"workflows:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/admin/workflows/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/commissions":{"get":{"operationId":"getAgentCommissions","summary":"Live commission lines (base, rate, status, available date)","tags":["agent"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/commissions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/disputes":{"get":{"operationId":"getAgentDisputes","summary":"My commission disputes","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/disputes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAgentDisputes","summary":"File a commission dispute","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commissionId":{"type":"string","maxLength":40},"period":{"type":"string","maxLength":7},"reason":{"type":"string","minLength":5,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/agent/disputes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/agent/links":{"get":{"operationId":"getAgentLinks","summary":"Referral codes and tracking links","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/links' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAgentLinks","summary":"Create another tracking code","tags":["agent"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/agent/links' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/onboarding":{"get":{"operationId":"getAgentOnboarding","summary":"Agent onboarding state (KYC, agreement)","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postAgentOnboarding","summary":"Apply to become an agent","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"contactEmail":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/agent/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\"}'"}]}},"/api/v1/agent/onboarding/agreement":{"post":{"operationId":"postAgentOnboardingAgreement","summary":"Request the agency agreement for e-signature","tags":["agent"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/agent/onboarding/agreement' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/onboarding/kyc":{"post":{"operationId":"postAgentOnboardingKyc","summary":"Submit KYC (legal name, tax ID, address, bank account)","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["individual","juristic"]},"legalName":{"type":"string","minLength":2,"maxLength":200},"taxId":{"type":"string","minLength":10,"maxLength":20},"address":{"type":"string","minLength":5,"maxLength":400},"phone":{"type":"string","maxLength":40},"bank":{"type":"object","properties":{"bankName":{"type":"string","minLength":2,"maxLength":80},"accountName":{"type":"string","minLength":2,"maxLength":120},"accountNo":{"type":"string","pattern":"^\\d{6,20}$"}},"required":["bankName","accountName","accountNo"],"additionalProperties":false}},"required":["kind","legalName","taxId","address","bank"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/agent/onboarding/kyc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"individual\",\"legalName\":\"string\",\"taxId\":\"string\",\"address\":\"string\",\"bank\":{\"bankName\":\"string\",\"accountName\":\"string\",\"accountNo\":\"string\"}}'"}]}},"/api/v1/agent/overview":{"get":{"operationId":"getAgentOverview","summary":"Agent portal dashboard","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/overview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/payout":{"post":{"operationId":"postAgentPayout","summary":"Agent payout request","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bank":{"type":"object","properties":{"bankName":{"type":"string","minLength":2,"maxLength":60},"accountName":{"type":"string","minLength":2,"maxLength":100},"accountNo":{"type":"string","pattern":"^\\d{8,16}$"}},"required":["bankName","accountName","accountNo"],"additionalProperties":false}},"required":["bank"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/agent/payout' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"bank\":{\"bankName\":\"string\",\"accountName\":\"string\",\"accountNo\":\"string\"}}'"}]}},"/api/v1/agent/payouts":{"get":{"operationId":"getAgentPayouts","summary":"My payouts and payable balance","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/payouts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/referrals":{"get":{"operationId":"getAgentReferrals","summary":"Attributed accounts (display name, status, sign-up date only)","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/referrals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/statements":{"get":{"operationId":"getAgentStatements","summary":"Monthly statements (the running month is refreshed on read)","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/statements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/statements/{period}":{"get":{"operationId":"getAgentStatementsPeriod","summary":"One statement (JSON or ?format=csv)","tags":["agent"],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/statements/PERIOD' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/summary":{"get":{"operationId":"getAgentSummary","summary":"Agent / reseller dashboard data","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/summary' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/tax":{"get":{"operationId":"getAgentTax","summary":"50 Tawi withholding-tax certificates","tags":["agent"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/tax' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agent/tax/{id}":{"get":{"operationId":"getAgentTaxId","summary":"One 50 Tawi certificate (printable data)","tags":["agent"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agent/tax/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/agents":{"get":{"operationId":"getAgents","summary":"List the account's AI agents","tags":["agents"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/agents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/ai/simulations":{"post":{"operationId":"postAiSimulations","summary":"Start a text simulation of an AI agent","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":3,"maxLength":80},"language":{"type":"string","enum":["th","zh","en","my"]}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ai/simulations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"agentId\":\"string\"}'"}]}},"/api/v1/ai/simulations/{id}/messages":{"post":{"operationId":"postAiSimulationsIdMessages","summary":"Say something (or press a key / stay silent) in a text simulation and get the agent's answer","tags":["ai"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":600},"digit":{"type":"string","pattern":"^[0-9*#]$"},"silence":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ai/simulations/ID/messages' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/announcements":{"get":{"operationId":"getAnnouncements","summary":"Live announcements for the caller","tags":["announcements"],"parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh","th","en","my"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/announcements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/announcements/{id}/dismiss":{"post":{"operationId":"postAnnouncementsIdDismiss","summary":"Dismiss an announcement","tags":["announcements"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/announcements/ID/dismiss' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/api-keys":{"get":{"operationId":"getApiKeys","summary":"API keys of the active account (secrets are never shown again)","tags":["api-keys"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/api-keys' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postApiKeys","summary":"Create an API key (bearer secret + HMAC secret shown once)","tags":["api-keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"env":{"default":"live","type":"string","enum":["live","test"]},"scopes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["messages:send","calls:create","read:logs","read:balance","verify:send","lookups:read","links:write"]}},"ipAllowlist":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":3,"maxLength":64}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"spendCapSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"null"}]},"spendCapPeriod":{"default":"month","type":"string","enum":["day","month","total"]},"tpsLimit":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"mode":{"default":"normal","type":"string","enum":["normal","shadow"]},"requireHmac":{"default":false,"type":"boolean"},"requireMtls":{"default":false,"type":"boolean"}},"required":["name","scopes"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/api-keys' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"scopes\":[\"messages:send\"]}'"}]}},"/api/v1/api-keys/{id}":{"delete":{"operationId":"deleteApiKeysId","summary":"Revoke an API key","tags":["api-keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/api-keys/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchApiKeysId","summary":"Change a key: IP allow-list, spend cap, TPS, shadow mode, HMAC / mTLS requirement","tags":["api-keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"ipAllowlist":{"maxItems":20,"type":"array","items":{"type":"string","minLength":3,"maxLength":64}},"spendCapSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"null"}]},"spendCapPeriod":{"type":"string","enum":["day","month","total"]},"tpsLimit":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]},"mode":{"type":"string","enum":["normal","shadow"]},"requireHmac":{"type":"boolean"},"requireMtls":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/api-keys/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/api-keys/{id}/rotate":{"post":{"operationId":"postApiKeysIdRotate","summary":"Rotate an API key (old key valid for the grace period)","tags":["api-keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"graceHours":{"default":24,"type":"integer","minimum":0,"maximum":72}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/api-keys/ID/rotate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/api-keys/live-eligibility":{"get":{"operationId":"getApiKeysLiveEligibility","summary":"Can this account get a live key now? (level, key cap, the one step to unlock it)","tags":["api-keys"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/api-keys/live-eligibility' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/line":{"get":{"operationId":"getAuthLine","summary":"LINE OAuth callback","tags":["auth"],"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2000}},{"name":"state","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"error","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/auth/line'"}]},"post":{"operationId":"postAuthLine","summary":"Start LINE login/link; returns the LINE authorize URL","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"default":"login","type":"string","enum":["login","link"]},"accept":{"default":false,"type":"boolean"},"marketing":{"default":false,"type":"boolean"},"accountType":{"default":"personal","type":"string","enum":["personal","business"]},"companyName":{"type":"string","maxLength":120},"locale":{"default":"zh","type":"string","enum":["zh","th","en"]},"ref":{"type":"string","maxLength":40}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/line' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/auth/login":{"post":{"operationId":"postAuthLogin","summary":"Sign in with phone/e-mail + optional password","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","minLength":3,"maxLength":254},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["identifier","password"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/login' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"identifier\":\"string\",\"password\":\"string\"}'"}]}},"/api/v1/auth/logout":{"post":{"operationId":"postAuthLogout","summary":"Sign out (revokes this session)","tags":["auth"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/logout' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/methods":{"get":{"operationId":"getAuthMethods","summary":"Sign-in methods available now (LINE-dependency fallback)","tags":["auth"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/auth/methods'"}]}},"/api/v1/auth/otp/request":{"post":{"operationId":"postAuthOtpRequest","summary":"Request a one-time code (sign-in or sign-up; identical response for known and unknown targets)","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"maxLength":254},"locale":{"type":"string","enum":["zh","th","en"]}},"required":["target"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/otp/request' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"target\":\"string\"}'"}]}},"/api/v1/auth/otp/verify":{"post":{"operationId":"postAuthOtpVerify","summary":"Verify a one-time code; creates the account on first use and signs in","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"maxLength":254},"code":{"type":"string","pattern":"^\\d{6}$"},"accept":{"type":"boolean"},"marketing":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":80},"locale":{"type":"string","enum":["zh","th","en"]},"accountType":{"type":"string","enum":["personal","business"]},"companyName":{"type":"string","minLength":1,"maxLength":120},"referralCode":{"type":"string","maxLength":40}},"required":["target","code"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/otp/verify' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"target\":\"string\",\"code\":\"123456\"}'"}]}},"/api/v1/auth/passkeys":{"get":{"operationId":"getAuthPasskeys","summary":"List my passkeys","tags":["auth"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/auth/passkeys' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/passkeys/{id}":{"delete":{"operationId":"deleteAuthPasskeysId","summary":"Remove a passkey (needs step-up)","tags":["auth"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/auth/passkeys/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/passkeys/options":{"post":{"operationId":"postAuthPasskeysOptions","summary":"Get WebAuthn registration/authentication options","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["register","login","step_up","mfa"]}},"required":["purpose"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/passkeys/options' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"purpose\":\"register\"}'"}]}},"/api/v1/auth/passkeys/verify":{"post":{"operationId":"postAuthPasskeysVerify","summary":"Complete a WebAuthn ceremony (register / sign in / step-up / second factor)","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["register","login","step_up","mfa"]},"challengeId":{"type":"string","minLength":1,"maxLength":64},"response":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"name":{"type":"string","maxLength":60}},"required":["purpose","challengeId","response"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/passkeys/verify' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"purpose\":\"register\",\"challengeId\":\"string\",\"response\":{}}'"}]}},"/api/v1/auth/signup":{"post":{"operationId":"postAuthSignup","summary":"Start sign-up with a phone number or e-mail (sends an OTP)","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"maxLength":254},"locale":{"type":"string","enum":["zh","th","en"]}},"required":["target"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/signup' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"target\":\"string\"}'"}]}},"/api/v1/auth/step-up":{"post":{"operationId":"postAuthStepUp","summary":"Open a 10-minute step-up window with a second factor","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"level":{"default":"standard","type":"string","enum":["standard","high"]},"method":{"type":"string","const":"totp"},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["method","code"]},{"type":"object","properties":{"level":{"default":"standard","type":"string","enum":["standard","high"]},"method":{"type":"string","const":"recovery"},"code":{"type":"string","minLength":8,"maxLength":20}},"required":["method","code"]},{"type":"object","properties":{"level":{"default":"standard","type":"string","enum":["standard","high"]},"method":{"type":"string","const":"otp"},"channel":{"type":"string","enum":["sms","email"]},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["method","channel","code"]},{"type":"object","properties":{"level":{"default":"standard","type":"string","enum":["standard","high"]},"method":{"type":"string","const":"password"},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["method","password"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/step-up' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"method\":\"totp\",\"code\":\"123456\"}'"}]}},"/api/v1/auth/step-up/options":{"get":{"operationId":"getAuthStepUpOptions","summary":"Which factors can open a step-up window now","tags":["auth"],"parameters":[{"name":"level","in":"query","required":false,"schema":{"default":"standard","type":"string","enum":["standard","high"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/auth/step-up/options' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/step-up/otp":{"post":{"operationId":"postAuthStepUpOtp","summary":"Send a step-up code to the phone or e-mail of the other factor class","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","enum":["sms","email"]}},"required":["channel"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/step-up/otp' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"channel\":\"sms\"}'"}]}},"/api/v1/auth/totp":{"delete":{"operationId":"deleteAuthTotp","summary":"Turn off the authenticator app (needs step-up; not allowed for mandatory-2FA roles)","tags":["auth"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/auth/totp' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/totp/confirm":{"post":{"operationId":"postAuthTotpConfirm","summary":"Confirm TOTP enrolment with a first code; returns one-time recovery codes","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/totp/confirm' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\"}'"}]}},"/api/v1/auth/totp/enroll":{"post":{"operationId":"postAuthTotpEnroll","summary":"Start TOTP enrolment (returns the secret + otpauth URI once)","tags":["auth"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/totp/enroll' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/totp/recovery-codes":{"post":{"operationId":"postAuthTotpRecoveryCodes","summary":"Regenerate recovery codes (needs step-up); shown once","tags":["auth"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/totp/recovery-codes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/auth/totp/verify":{"post":{"operationId":"postAuthTotpVerify","summary":"Pass the sign-in second factor with TOTP or a recovery code","tags":["auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"],"additionalProperties":false},{"type":"object","properties":{"recoveryCode":{"type":"string","minLength":8,"maxLength":20}},"required":["recoveryCode"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/totp/verify' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\"}'"}]}},"/api/v1/auth/unlock":{"post":{"operationId":"postAuthUnlock","summary":"Lift the sensitive-operation freeze after a strong, independent step-up","tags":["auth"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/auth/unlock' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/balance":{"get":{"operationId":"getBalance","summary":"Available prepaid balance (THB, decimal string)","tags":["balance"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:balance","x-required-permission":"wallet:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/balance' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/bookings":{"get":{"operationId":"getBookings","summary":"Bookings by phone, code, status, site or date range","tags":["appointments"],"parameters":[{"name":"phone","in":"query","required":false,"schema":{"type":"string","maxLength":30}},{"name":"code","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["booked","canceled","completed","no_show"]}},{"name":"site_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"resource_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"from","in":"query","required":false,"schema":{}},{"name":"to","in":"query","required":false,"schema":{}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bookings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postBookings","summary":"Book a seat in a slot (never overbooks; 409 when full or already booked)","tags":["appointments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slotId":{"type":"string","minLength":1,"maxLength":60},"phoneE164":{"type":"string","minLength":1,"maxLength":30},"customerName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"service":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]}},"required":["slotId","phoneE164"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/bookings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"slotId\":\"string\",\"phoneE164\":\"string\"}'"}]}},"/api/v1/bookings/{id}":{"get":{"operationId":"getBookingsId","summary":"One booking with its history","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bookings/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchBookingsId","summary":"Change (move), cancel, complete or mark no-show","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"change"},"slotId":{"type":"string","minLength":1,"maxLength":80},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["action","slotId"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"cancel"},"reason":{"type":"string","maxLength":200}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"complete"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"no_show"}},"required":["action"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/bookings/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"change\",\"slotId\":\"string\"}'"}]}},"/api/v1/bookings/export":{"get":{"operationId":"getBookingsExport","summary":"Bookings as CSV (UTF-8 with BOM, formula-injection safe)","tags":["appointments"],"parameters":[{"name":"from","in":"query","required":true,"schema":{}},{"name":"to","in":"query","required":true,"schema":{}},{"name":"site_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bookings/export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bookings/requests":{"get":{"operationId":"getBookingsRequests","summary":"Booking requests the AI could not promise (over capacity) and handed to the owner","tags":["appointments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bookings/requests' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/brief-config":{"get":{"operationId":"getBriefConfig","summary":"Daily brief settings (G09)","tags":["tasks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/brief-config' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putBriefConfig","summary":"Save the daily brief: queries over your own data, send time, language, channel, recipients","tags":["tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"default":"Daily brief","type":"string","minLength":1,"maxLength":80},"enabled":{"default":true,"type":"boolean"},"sendTime":{"default":"07:30","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"language":{"default":"zh","type":"string","enum":["zh","th","en"]},"channel":{"default":"email","type":"string","enum":["email","in_app"]},"recipientRole":{"default":"owner","type":"string","enum":["owner","admin","finance","hr","staff"]},"queries":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9_]+$"},"label":{"type":"string","minLength":1,"maxLength":80},"source":{"type":"string","enum":["connector_records","tasks","bulk_jobs","rule_fires"]},"connectorId":{"type":"string","maxLength":60},"filter":{"type":"object","properties":{"slot":{"type":"string","maxLength":30},"equals":{"type":"string","maxLength":100},"empty":{"type":"boolean"},"overdue":{"type":"boolean"},"state":{"type":"string","maxLength":30}},"additionalProperties":false},"agg":{"default":"count","type":"string","enum":["count","sum"]},"slot":{"type":"string","maxLength":30}},"required":["key","label","source"],"additionalProperties":false}}},"required":["queries"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/brief-config' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"queries\":[{\"key\":\"string\",\"label\":\"string\",\"source\":\"connector_records\"}]}'"}]}},"/api/v1/brief-config/latest":{"get":{"operationId":"getBriefConfigLatest","summary":"The latest brief (figures with sources, text)","tags":["tasks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/brief-config/latest' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/brief-config/run":{"post":{"operationId":"postBriefConfigRun","summary":"Send today’s brief now (every figure cites its source; failed queries say \"data missing\")","tags":["tasks"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/brief-config/run' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bulk-jobs":{"get":{"operationId":"getBulkJobs","summary":"My bulk jobs (Excel / CSV → SMS or AI calls)","tags":["bulk"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bulk-jobs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postBulkJobs","summary":"Upload and validate a bulk job (nothing is sent). options: {name, kind: sms|calls, category, template, agentId, from, defaultLawfulBasis, pacePerMinute, window}","tags":["bulk"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/bulk-jobs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bulk-jobs/{id}":{"get":{"operationId":"getBulkJobsId","summary":"A bulk job with its rows (status, problem, reference)","tags":["bulk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bulk-jobs/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bulk-jobs/{id}/cancel":{"post":{"operationId":"postBulkJobsIdCancel","summary":"Cancel the rest of a bulk job","tags":["bulk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/bulk-jobs/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bulk-jobs/{id}/preview":{"post":{"operationId":"postBulkJobsIdPreview","summary":"Preview: counts by problem, first rows as sent, cost estimate and balance check","tags":["bulk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/bulk-jobs/ID/preview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bulk-jobs/{id}/result":{"get":{"operationId":"getBulkJobsIdResult","summary":"Result export: the original rows plus result columns (CSV, formula cells escaped)","tags":["bulk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/bulk-jobs/ID/result' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/bulk-jobs/{id}/start":{"post":{"operationId":"postBulkJobsIdStart","summary":"Start (or resume after a top-up): needs a preview and enough balance for the estimate","tags":["bulk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/bulk-jobs/ID/start' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/call-campaigns":{"get":{"operationId":"getCallCampaigns","summary":"List call campaigns","tags":["calls"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"calls:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/call-campaigns' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postCallCampaigns","summary":"Create a call campaign from a recipient list (draft until started)","tags":["calls"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"recipients":{"minItems":1,"maxItems":50000,"type":"array","items":{"type":"object","properties":{"to":{"type":"string","minLength":5,"maxLength":24},"vars":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":300}}},"required":["to"]}},"from":{"type":"string","maxLength":24},"mode":{"default":"line","type":"string","enum":["line","ai_proxy"]},"agent_id":{"type":"string","maxLength":80},"lawful_basis_ref":{"type":"string","maxLength":80},"pace_per_minute":{"default":30,"type":"integer","minimum":1,"maximum":3000},"max_concurrent":{"default":5,"type":"integer","minimum":1,"maximum":1000},"max_attempts":{"default":1,"type":"integer","minimum":1,"maximum":5},"retry_after_min":{"default":60,"type":"integer","minimum":5,"maximum":1440},"window_start":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"window_end":{"default":"18:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"default":[1,2,3,4,5],"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"budget_cap_satang":{"type":"string","pattern":"^\\d{1,13}$"}},"required":["name","recipients"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/call-campaigns' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"recipients\":[{\"to\":\"+66000000001\"}]}'"}]}},"/api/v1/call-campaigns/{id}":{"get":{"operationId":"getCallCampaignsId","summary":"Campaign status, summary and per-recipient results","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"calls:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/call-campaigns/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/call-campaigns/{id}/actions":{"post":{"operationId":"postCallCampaignsIdActions","summary":"Start, pause, resume or cancel a campaign","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["start","pause","resume","cancel"]}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/call-campaigns/ID/actions' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"start\"}'"}]}},"/api/v1/caller-ids":{"get":{"operationId":"getCallerIds","summary":"Numbers this account has proven it controls","tags":["caller-ids"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/caller-ids' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postCallerIds","summary":"Send a verification code to a Thai mobile number","tags":["caller-ids"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":8,"maxLength":20},"method":{"default":"otp_sms","type":"string","enum":["otp_sms","otp_call"]},"purpose":{"type":"string","enum":["own_number","callback","transfer_target"]}},"required":["number"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/caller-ids' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"number\":\"+66000000001\"}'"}]}},"/api/v1/caller-ids/{id}":{"delete":{"operationId":"deleteCallerIdsId","summary":"Remove a verified number","tags":["caller-ids"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/caller-ids/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/caller-ids/{id}/verify":{"post":{"operationId":"postCallerIdsIdVerify","summary":"Confirm the code sent to the number","tags":["caller-ids"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/caller-ids/ID/verify' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\"}'"}]}},"/api/v1/caller-ids/usable":{"get":{"operationId":"getCallerIdsUsable","summary":"Usable caller IDs per purpose","tags":["caller-ids"],"parameters":[{"name":"purpose","in":"query","required":false,"schema":{"default":"campaign","type":"string","enum":["campaign","trial","transfer","callback"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/caller-ids/usable' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/calls":{"get":{"operationId":"getCalls","summary":"List calls (cursor pagination)","tags":["calls"],"parameters":[{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","initiated","ringing","in-progress","completed","busy","no-answer","failed","canceled","rejected","timeout","blocked"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"date_created_gte","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"date_created_lt","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"calls:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postCalls","summary":"Place one call (async; returns the call in queued / initiated). Needs Idempotency-Key and, for non-personal calls, lawful_basis_ref","tags":["calls"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":3,"maxLength":20},"from":{"type":"string","minLength":3,"maxLength":20},"mode":{"default":"line","type":"string","enum":["line","ai_proxy","translation_bridge"]},"agent_id":{"type":"string","maxLength":80},"category":{"default":"transactional","type":"string","enum":["otp","transactional","marketing"]},"purpose":{"type":"string","maxLength":200},"language":{"type":"string","enum":["zh","th","en","my"]},"lawful_basis_ref":{"type":"string","maxLength":80},"personal":{"type":"boolean"},"caller_id_purpose":{"type":"string","enum":["campaign","trial","transfer","callback"]},"max_duration":{"type":"integer","minimum":10,"maximum":14400},"max_cost":{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,2})?$"},"machine_detection":{"type":"boolean"},"record":{"type":"boolean"},"status_callback":{"type":"string","maxLength":500,"format":"uri"},"scheduled_for":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"transfer_to":{"type":"string","minLength":3,"maxLength":20},"bridge_to":{"type":"string","minLength":3,"maxLength":20},"client_ref":{"type":"string","maxLength":64},"task_id":{"type":"string","maxLength":80}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/calls/{id}":{"get":{"operationId":"getCallsId","summary":"Fetch one call","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"calls:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/calls/{id}/ai":{"get":{"operationId":"getCallsIdAi","summary":"AI conversation of a call: transcript, QA score, vendors used, call-backs","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls/ID/ai' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/calls/{id}/ai-whisper":{"post":{"operationId":"postCallsIdAiWhisper","summary":"Whisper an instruction to the AI agent on a running call","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":3,"maxLength":300}},"required":["text"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:supervise","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/ai-whisper' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"text\":\"string\"}'"}]}},"/api/v1/calls/{id}/barge":{"post":{"operationId":"postCallsIdBarge","summary":"Supervisor barge on a call in progress","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","minLength":8,"maxLength":20}},"required":["endpoint"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:supervise","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/barge' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":\"string\"}'"}]}},"/api/v1/calls/{id}/callback":{"post":{"operationId":"postCallsIdCallback","summary":"Call back the caller of an inbound call (caller ID = the number they dialled)","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/callback' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001'"}]}},"/api/v1/calls/{id}/detail":{"get":{"operationId":"getCallsIdDetail","summary":"Call detail: cost breakdown, legs, events, transcript, recordings","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"calls:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls/ID/detail' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/calls/{id}/hangup":{"post":{"operationId":"postCallsIdHangup","summary":"End a call (cancels it while queued or ringing)","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/hangup' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001'"}]}},"/api/v1/calls/{id}/issue":{"post":{"operationId":"postCallsIdIssue","summary":"Report a problem with a call (free re-dial / refund by responsibility)","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["ai_wrong","wrong_person","no_sound","other"]},"note":{"type":"string","maxLength":300}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/issue' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"ai_wrong\"}'"}]}},"/api/v1/calls/{id}/listen":{"post":{"operationId":"postCallsIdListen","summary":"Supervisor listen on a call in progress","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","minLength":8,"maxLength":20}},"required":["endpoint"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"recordings:listen","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/listen' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":\"string\"}'"}]}},"/api/v1/calls/{id}/recording":{"get":{"operationId":"getCallsIdRecording","summary":"Short-lived signed playback link (audited)","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"recordings:listen","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls/ID/recording' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postCallsIdRecording","summary":"Recording control: notice_played, consent, start, stop, objection","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["notice_played","consent","start","stop","objection"]}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:create","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/recording' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"notice_played\"}'"}]}},"/api/v1/calls/{id}/transfer":{"post":{"operationId":"postCallsIdTransfer","summary":"Transfer a call in progress (cold or warm)","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":8,"maxLength":20},"type":{"default":"warm","type":"string","enum":["cold","warm"]}},"required":["to"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:create","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/transfer' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/calls/{id}/whisper":{"post":{"operationId":"postCallsIdWhisper","summary":"Supervisor whisper on a call in progress","tags":["calls"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","minLength":8,"maxLength":20}},"required":["endpoint"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:supervise","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/whisper' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":\"string\"}'"}]}},"/api/v1/calls/estimate":{"post":{"operationId":"postCallsEstimate","summary":"Price, caller ID and compliance checks for a call without placing it","tags":["calls"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":3,"maxLength":20},"from":{"type":"string","maxLength":20},"mode":{"default":"line","type":"string","enum":["line","ai_proxy","translation_bridge"]},"agent_id":{"type":"string","maxLength":80},"category":{"default":"transactional","type":"string","enum":["otp","transactional","marketing"]},"lawful_basis_ref":{"type":"string","maxLength":80},"personal":{"type":"boolean"},"caller_id_purpose":{"type":"string","enum":["campaign","trial","transfer","callback"]}},"required":["to"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"calls:create","x-required-permission":"calls:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/calls/estimate' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/calls/live":{"get":{"operationId":"getCallsLive","summary":"Calls in progress with supervisor capability flags","tags":["calls"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls/live' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/calls/live/stream":{"get":{"operationId":"getCallsLiveStream","summary":"Live calls (SSE snapshots)","tags":["calls"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/calls/live/stream' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/connectors":{"get":{"operationId":"getConnectors","summary":"My connectors (credentials are never returned; only the last 4 characters)","tags":["connectors"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postConnectors","summary":"Create a connector (Jiandaoyun / Google Sheets / file / webhook / LINE). The inbound secret of webhook and LINE connectors is shown once","tags":["connectors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["jiandaoyun","google_sheets","file","webhook","line"]},"name":{"type":"string","minLength":1,"maxLength":80},"credentials":{"type":"object","propertyNames":{"type":"string","maxLength":2000},"additionalProperties":{"type":"string","maxLength":2000}},"object":{"type":"string","maxLength":200},"keyField":{"type":"string","maxLength":120},"outboundUrl":{"type":"string","maxLength":500},"requireSignature":{"type":"boolean"},"ipAllowlist":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":45}},"pollEverySec":{"type":"integer","minimum":60,"maximum":3600},"quietSeconds":{"type":"integer","minimum":0,"maximum":3600}},"required":["kind","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"jiandaoyun\",\"name\":\"My key\"}'"}]}},"/api/v1/connectors/{id}":{"delete":{"operationId":"deleteConnectorsId","summary":"Delete a connector and everything it ingested","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/connectors/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"get":{"operationId":"getConnectorsId","summary":"One connector with its binding, mapping and counters","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/connectors/{id}/control":{"post":{"operationId":"postConnectorsIdControl","summary":"Pause or resume a connector","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume"]}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/control' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"pause\"}'"}]}},"/api/v1/connectors/{id}/copy-mapping":{"post":{"operationId":"postConnectorsIdCopyMapping","summary":"Copy this mapping as a template onto another connector (same company, or another company you administer)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":64},"tenantId":{"type":"string","maxLength":64}},"required":["connectorId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/copy-mapping' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"connectorId\":\"string\"}'"}]}},"/api/v1/connectors/{id}/credentials":{"post":{"operationId":"postConnectorsIdCredentials","summary":"Rotate the stored credential (and the inbound secret of webhook / LINE connectors)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"type":"object","propertyNames":{"type":"string","maxLength":60},"additionalProperties":{"type":"string","maxLength":2000}}},"required":["credentials"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/credentials' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"credentials\":{}}'"}]}},"/api/v1/connectors/{id}/discover":{"post":{"operationId":"postConnectorsIdDiscover","summary":"Test the credential, list the source fields, read 5 sample rows and suggest a mapping","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/discover' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/connectors/{id}/dlq":{"get":{"operationId":"getConnectorsIdDlq","summary":"Dead-letter queue and rows that need fixing","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors/ID/dlq' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/connectors/{id}/dlq/{eventId}/replay":{"post":{"operationId":"postConnectorsIdDlqEventIdReplay","summary":"Replay a dead-lettered / bad-row event","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/dlq/EVENTID/replay' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/connectors/{id}/dry-run":{"post":{"operationId":"postConnectorsIdDryRun","summary":"Dry-run: preview 5 real rows as slots, what would trigger, DNC hits; nothing is sent or charged","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/dry-run' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/connectors/{id}/enable":{"post":{"operationId":"postConnectorsIdEnable","summary":"Enable after a passing dry-run (only new changes from now on, or include existing records in frozen batches)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"include_existing":{"default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/enable' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/connectors/{id}/errors":{"get":{"operationId":"getConnectorsIdErrors","summary":"Download the rows that failed validation (CSV, formula cells escaped)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors/ID/errors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/connectors/{id}/events":{"get":{"operationId":"getConnectorsIdEvents","summary":"Recent events of a connector (log)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["received","processed","ignored","data_error","dlq"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors/ID/events' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postConnectorsIdEvents","summary":"Inbound record event: Bearer connector secret + X-SV-Timestamp / X-SV-Signature (HMAC-SHA256 of \"<timestamp>.<body>\", ±5 min); event_id de-duplicates","description":"Envelope: {\"event_id\",\"type\",\"occurred_at\",\"record\":{\"ref_no\",\"slots\":{…generic slots…}|\"fields\":{…mapped external names…}}}. 10 events/s, burst 50.","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"webhook","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/events'"}]}},"/api/v1/connectors/{id}/line":{"post":{"operationId":"postConnectorsIdLine","summary":"LINE Messaging API webhook of the tenant’s own OA (X-Line-Signature verified with the channel secret)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"webhook","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/line'"}]}},"/api/v1/connectors/{id}/line/bindings":{"get":{"operationId":"getConnectorsIdLineBindings","summary":"LINE users / staff groups bound to this OA connector","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors/ID/line/bindings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postConnectorsIdLineBindings","summary":"Create a one-time binding code (24 h) a staff member or group sends to the OA","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["user","group"]},"contactRef":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":80},"language":{"type":"string","enum":["zh","th","en","my"]}},"required":["kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/line/bindings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"user\"}'"}]}},"/api/v1/connectors/{id}/line/simulate":{"post":{"operationId":"postConnectorsIdLineSimulate","summary":"Simulator mode only: act as a LINE user / group (send the binding code, tap a quick-reply)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["user","group"]},"id":{"type":"string","minLength":1,"maxLength":64}},"required":["type","id"],"additionalProperties":false},"text":{"type":"string","maxLength":100},"postback":{"type":"string","maxLength":200}},"required":["source"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/line/simulate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"source\":{\"type\":\"user\",\"id\":\"string\"}}'"}]}},"/api/v1/connectors/{id}/mapping":{"get":{"operationId":"getConnectorsIdMapping","summary":"The field mapping, status map and write-back map of a connector","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/connectors/ID/mapping' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putConnectorsIdMapping","summary":"Save the mapping (generic slots only; unknown / privileged targets are refused)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","minLength":1,"maxLength":200},"mappings":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":120},"slot":{"type":"string"},"required":{"type":"boolean"},"default":{"type":"string","maxLength":300},"transform":{"type":"string","enum":["trim","upper","lower","digits","thai_buddhist_year"]}},"required":["field","slot"],"additionalProperties":false}},"statusMap":{"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"string","maxLength":100}},"writebacks":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"field":{"type":"string","minLength":1,"maxLength":120},"mode":{"default":"if_empty","type":"string","enum":["if_empty","append_note"]}},"required":["slot","field"],"additionalProperties":false}}},"required":["object","mappings"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/connectors/ID/mapping' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"object\":\"string\",\"mappings\":[{\"field\":\"string\",\"slot\":\"string\"}]}'"}]}},"/api/v1/connectors/{id}/sandbox":{"put":{"operationId":"putConnectorsIdSandbox","summary":"Simulator mode: the tenant’s test form / sheet (rows the poller reads; write-backs land here)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"keyField":{"type":"string","maxLength":80}},"required":["rows"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/connectors/ID/sandbox' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"rows\":[{}]}'"}]}},"/api/v1/connectors/{id}/upload":{"post":{"operationId":"postConnectorsIdUpload","summary":"File connector: upload a CSV / XLSX (re-uploading the same rows is a no-op)","tags":["connectors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/connectors/ID/upload' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/consents":{"delete":{"operationId":"deleteConsents","summary":"Withdraw a consent","tags":["consents"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":80}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/consents' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"id\":\"string\"}'"}]},"post":{"operationId":"postConsents","summary":"Record a recipient consent (wording version, granularity, evidence)","tags":["consents"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":8,"maxLength":20},"purpose":{"type":"string","enum":["marketing_sms","marketing_call","service_call","recording","data_processing","cross_border","ai_processing","line_messaging"]},"lawful_basis":{"default":"consent","type":"string","enum":["consent","contract","legitimate_interest","legal_obligation","vital_interest","public_task"]},"source":{"default":"api","type":"string","enum":["web_form","verbal_call","sms_reply","api","import","contract","own_number"]},"text_version":{"type":"string","maxLength":40},"notice_version":{"type":"string","maxLength":40},"granularity":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"}},"senders":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}}}},"evidence":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["number","purpose"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/consents' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"number\":\"+66000000001\",\"purpose\":\"marketing_sms\"}'"}]}},"/api/v1/contacts":{"get":{"operationId":"getContacts","summary":"My contacts","tags":["contacts"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/contacts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postContacts","summary":"Add a contact","tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"phone":{"type":"string","maxLength":24},"email":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"company":{"type":"string","maxLength":120},"language":{"type":"string","enum":["zh","th","en","my"]},"notes":{"type":"string","maxLength":500},"tags":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"doNotContact":{"type":"boolean"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/contacts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\"}'"}]}},"/api/v1/contacts/{id}":{"delete":{"operationId":"deleteContactsId","summary":"Delete a contact","tags":["contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/contacts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putContactsId","summary":"Edit a contact","tags":["contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"phone":{"type":"string","maxLength":24},"email":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"company":{"type":"string","maxLength":120},"language":{"type":"string","enum":["zh","th","en","my"]},"notes":{"type":"string","maxLength":500},"tags":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"doNotContact":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/contacts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/contacts/export":{"get":{"operationId":"getContactsExport","summary":"Export contacts as CSV (formula cells escaped)","tags":["contacts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/contacts/export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/contacts/import":{"post":{"operationId":"postContactsImport","summary":"Import contacts from CSV / XLSX (UTF-8, BOM or TIS-620). options: {\"dryRun\":true} previews without writing; {\"onDuplicate\":\"update\"}","tags":["contacts"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/contacts/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/contacts/import/{id}/errors":{"get":{"operationId":"getContactsImportIdErrors","summary":"Rows of an import that were refused, as CSV","tags":["contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/contacts/import/ID/errors' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/contacts/imports":{"get":{"operationId":"getContactsImports","summary":"Past contact imports","tags":["contacts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/contacts/imports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/coupons/mine":{"get":{"operationId":"getCouponsMine","summary":"Coupons I claimed and have not used yet","tags":["coupons"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/coupons/mine' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/coupons/redeem":{"post":{"operationId":"postCouponsRedeem","summary":"Redeem a coupon code","tags":["coupons"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":3,"maxLength":40}},"required":["code"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/coupons/redeem' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\"}'"}]}},"/api/v1/departments":{"get":{"operationId":"getDepartments","summary":"Departments / sub-accounts with budgets and quotas","tags":["members"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"departments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/departments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postDepartments","summary":"Create a department","tags":["members"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"parentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"budgetSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"null"}]},"quotaCalls":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]},"quotaSms":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"departments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/departments' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\"}'"}]}},"/api/v1/departments/{id}":{"delete":{"operationId":"deleteDepartmentsId","summary":"Delete a department","tags":["members"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"departments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/departments/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchDepartmentsId","summary":"Update a department (budget, quotas, parent)","tags":["members"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"parentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"budgetSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"null"}]},"quotaCalls":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]},"quotaSms":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"departments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/departments/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/dev/clock":{"get":{"operationId":"getDevClock","summary":"Read the server clock (E2E only)","tags":["dev"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/dev/clock'"}]},"post":{"operationId":"postDevClock","summary":"Fast-forward, set or reset the server clock (E2E only)","tags":["dev"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"advanceMs":{"type":"integer","minimum":0,"maximum":31622400000}},"required":["advanceMs"]},{"type":"object","properties":{"set":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["set"]},{"type":"object","properties":{"reset":{"type":"boolean","const":true}},"required":["reset"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/dev/clock' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"advanceMs\":0}'"}]}},"/api/v1/dev/line":{"post":{"operationId":"postDevLine","summary":"Simulate an inbound LINE message (mock provider, non-production)","tags":["dev"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"text"},"lineUserId":{"type":"string","minLength":4,"maxLength":64},"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["kind","lineUserId","text"]},{"type":"object","properties":{"kind":{"type":"string","const":"postback"},"lineUserId":{"type":"string","minLength":4,"maxLength":64},"data":{"type":"string","minLength":1,"maxLength":300}},"required":["kind","lineUserId","data"]},{"type":"object","properties":{"kind":{"type":"string","const":"follow"},"lineUserId":{"type":"string","minLength":4,"maxLength":64}},"required":["kind","lineUserId"]},{"type":"object","properties":{"kind":{"type":"string","const":"unfollow"},"lineUserId":{"type":"string","minLength":4,"maxLength":64}},"required":["kind","lineUserId"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/dev/line' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"text\",\"lineUserId\":\"string\",\"text\":\"string\"}'"}]}},"/api/v1/dev/messages":{"delete":{"operationId":"deleteDevMessages","summary":"Clear the dev mailbox","tags":["dev"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/dev/messages'"}]},"get":{"operationId":"getDevMessages","summary":"Dev mailbox / OTP viewer (non-production)","tags":["dev"],"parameters":[{"name":"target","in":"query","required":false,"schema":{"type":"string","maxLength":254}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/dev/messages'"}]}},"/api/v1/developer/diff":{"get":{"operationId":"getDeveloperDiff","summary":"Sandbox-vs-live: which endpoints answered differently with test and live keys","tags":["developer"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":1,"maximum":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/developer/diff' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/developer/logs":{"get":{"operationId":"getDeveloperLogs","summary":"Masked request log (live 30 days, sandbox 7 days)","tags":["developer"],"parameters":[{"name":"sandbox","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["ok","error"]}},{"name":"error_code","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"path","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"key_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"trace_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/developer/logs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/developer/logs/{traceId}":{"get":{"operationId":"getDeveloperLogsTraceId","summary":"Trace viewer: every request of one trace with masked headers and bodies","tags":["developer"],"parameters":[{"name":"traceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/developer/logs/TRACE_ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/developer/sandbox":{"get":{"operationId":"getDeveloperSandbox","summary":"Sandbox wallet balance and the magic numbers","tags":["developer"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/developer/sandbox' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postDeveloperSandbox","summary":"Refill the sandbox play-money wallet to ฿1,000","tags":["developer"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/developer/sandbox' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/developer/tail":{"get":{"operationId":"getDeveloperTail","summary":"Live tail: request log lines after a cursor","tags":["developer"],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/developer/tail' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/developer/usage":{"get":{"operationId":"getDeveloperUsage","summary":"API usage graph (requests per hour / day)","tags":["developer"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":1,"maximum":30}},{"name":"sandbox","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"apikeys:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/developer/usage' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/dl/{token}":{"get":{"operationId":"getDlToken","summary":"Download through a signed expiring link","tags":["tax-documents"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/dl/TOKEN'"}]}},"/api/v1/documents":{"get":{"operationId":"getDocuments","summary":"Quotations, contracts, purchase orders and delivery notes","tags":["documents"],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["quotation","sales_contract","purchase_order","delivery_note"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/documents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postDocuments","summary":"Draft a document (no charge until it is submitted)","tags":["documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["quotation","sales_contract","purchase_order","delivery_note"]},"title":{"type":"string","minLength":1,"maxLength":160},"language":{"default":"th","type":"string","enum":["th","en","zh"]},"counterparty":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":3,"maxLength":400},"taxId":{"type":["string","null"]},"branchCode":{"anyOf":[{"type":"string","pattern":"^\\d{5}$"},{"type":"null"}]},"contactPerson":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["name","address"]},"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"descriptionEn":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"quantity":{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$"},"unit":{"type":"string","minLength":1,"maxLength":30},"unitPrice":{"default":"0.00","type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},"serialNo":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"orderedQuantity":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["description","quantity","unit"]}},"vat":{"default":true,"type":"boolean"},"discount":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"paymentTerms":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"terms":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"validUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"deliveryPlace":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"place":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"quotationRef":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"poNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"startsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"autoRenew":{"type":"boolean"},"warrantyMonths":{"type":"integer","minimum":0,"maximum":120},"jurisdiction":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"additionalClauses":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"titleTh":{"type":"string","maxLength":200},"titleEn":{"type":"string","maxLength":200},"textTh":{"type":"string","maxLength":2000},"textEn":{"type":"string","maxLength":2000}},"required":["titleTh","textTh"]}},"remarks":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["type","counterparty","items"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/documents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"type\":\"quotation\",\"counterparty\":{\"name\":\"My key\",\"address\":\"string\"},\"items\":[{\"description\":\"string\",\"quantity\":\"string\",\"unit\":\"string\"}]}'"}]}},"/api/v1/documents/{id}":{"get":{"operationId":"getDocumentsId","summary":"A document with its event history, versions and signatures","tags":["documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/documents/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchDocumentsId","summary":"Edit a draft or returned document (new version)","tags":["documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["quotation","sales_contract","purchase_order","delivery_note"]},"title":{"type":"string","minLength":1,"maxLength":160},"language":{"default":"th","type":"string","enum":["th","en","zh"]},"counterparty":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":3,"maxLength":400},"taxId":{"type":["string","null"]},"branchCode":{"anyOf":[{"type":"string","pattern":"^\\d{5}$"},{"type":"null"}]},"contactPerson":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["name","address"]},"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"descriptionEn":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"quantity":{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$"},"unit":{"type":"string","minLength":1,"maxLength":30},"unitPrice":{"default":"0.00","type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},"serialNo":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"orderedQuantity":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,4})?$"},{"type":"null"}]}},"required":["description","quantity","unit"]}},"vat":{"default":true,"type":"boolean"},"discount":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"paymentTerms":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"terms":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"validUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"deliveryPlace":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"place":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"quotationRef":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"poNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"startsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"autoRenew":{"type":"boolean"},"warrantyMonths":{"type":"integer","minimum":0,"maximum":120},"jurisdiction":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"additionalClauses":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"titleTh":{"type":"string","maxLength":200},"titleEn":{"type":"string","maxLength":200},"textTh":{"type":"string","maxLength":2000},"textEn":{"type":"string","maxLength":2000}},"required":["titleTh","textTh"]}},"remarks":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"note":{"type":"string","maxLength":200}},"required":["type","counterparty","items"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/documents/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"type\":\"quotation\",\"counterparty\":{\"name\":\"My key\",\"address\":\"string\"},\"items\":[{\"description\":\"string\",\"quantity\":\"string\",\"unit\":\"string\"}]}'"}]}},"/api/v1/documents/{id}/pdf":{"get":{"operationId":"getDocumentsIdPdf","summary":"Document PDF (stored or draft preview)","tags":["documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"preview","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/documents/ID/pdf' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/documents/{id}/signers":{"post":{"operationId":"postDocumentsIdSigners","summary":"Request signatures","tags":["documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signers":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"role":{"default":"counterparty","type":"string","enum":["issuer","counterparty","witness1","witness2"]},"name":{"type":"string","minLength":1,"maxLength":120},"contact":{"type":"string","minLength":5,"maxLength":200},"channel":{"default":"email","type":"string","enum":["email","sms"]}},"required":["name","contact"]}}},"required":["signers"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/documents/ID/signers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"signers\":[{\"name\":\"My key\",\"contact\":\"string\"}]}'"}]}},"/api/v1/documents/{id}/transition":{"post":{"operationId":"postDocumentsIdTransition","summary":"Move a document through its lifecycle","tags":["documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["submit","approve","return","cancel","suspend","resume","mark_sent","request_confirmation","confirm","reopen"]},"note":{"type":"string","maxLength":300}},"required":["action"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"documents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/documents/ID/transition' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"submit\"}'"}]}},"/api/v1/event-rules":{"get":{"operationId":"getEventRules","summary":"Event → task / reminder / escalation rules (G10)","tags":["tasks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/event-rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postEventRules","summary":"Create a rule (disabled until you enable it): condition, actions, escalation ladder, stop condition, quiet list, storm caps","tags":["tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"connectorId":{"type":"string","maxLength":60},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"slot":{"type":"string"},"equals":{"type":"string","maxLength":200}},"required":["kind","slot","equals"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_empty_days"},"slot":{"type":"string"},"days":{"type":"integer","minimum":0,"maximum":365}},"required":["kind","slot","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"duplicate_key"},"slot":{"type":"string"}},"required":["kind","slot"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"amount_over"},"slot":{"default":"amount","type":"string"},"over":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"}},"required":["kind","over"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"validation"},"check":{"type":"string","enum":["negative_amount","status_conflict"]},"slot":{"type":"string"},"whenSlot":{"type":"string"},"whenEquals":{"type":"string","maxLength":100},"butSlot":{"type":"string"},"butEquals":{"type":"string","maxLength":100}},"required":["kind","check"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"due_passed"},"slot":{"default":"due_at","type":"string"},"afterMinutes":{"default":0,"type":"integer","minimum":0,"maximum":525600}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"daily_exists"},"slot":{"default":"scheduled_at","type":"string"},"byHour":{"default":"10:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["kind"],"additionalProperties":false}]},"actions":{"minItems":1,"maxItems":5,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"task"},"title":{"type":"string","minLength":1,"maxLength":160},"role":{"default":"staff","type":"string","enum":["owner","admin","finance","hr","staff"]},"dueMinutes":{"type":"integer","minimum":1,"maximum":525600}},"required":["kind","title"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"line"},"target":{"default":"user","type":"string","enum":["user","group"]},"text":{"type":"string","minLength":1,"maxLength":400},"connectorId":{"type":"string","maxLength":60}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"sms"},"body":{"type":"string","minLength":1,"maxLength":320}},"required":["kind","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"call"},"instanceId":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","instanceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"writeback"},"slot":{"type":"string","maxLength":40},"value":{"type":"string","maxLength":300}},"required":["kind","slot","value"],"additionalProperties":false}]}},"ladder":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"afterMinutes":{"type":"integer","minimum":1,"maximum":525600},"role":{"type":"string","enum":["owner","admin","finance","hr","staff"]},"userId":{"type":"string","maxLength":60}},"required":["afterMinutes"],"additionalProperties":false}},"stopCondition":{"type":"object","properties":{"slot":{"type":"string"},"equals":{"type":"string","maxLength":200},"nonEmpty":{"type":"boolean"}},"required":["slot"],"additionalProperties":false},"quietRefs":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","maxLength":120}},"maxPerHour":{"default":60,"type":"integer","minimum":1,"maximum":10000},"maxPerDay":{"default":500,"type":"integer","minimum":1,"maximum":100000},"quietSeconds":{"default":30,"type":"integer","minimum":0,"maximum":3600}},"required":["name","trigger","actions"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/event-rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"trigger\":{\"kind\":\"field_equals\",\"slot\":\"string\",\"equals\":\"string\"},\"actions\":[{\"kind\":\"task\",\"title\":\"string\"}]}'"}]}},"/api/v1/event-rules/{id}":{"put":{"operationId":"putEventRulesId","summary":"Edit a rule (bumps its version, disables it; every stage may fire again once under the new version)","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"connectorId":{"type":"string","maxLength":60},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"slot":{"type":"string"},"equals":{"type":"string","maxLength":200}},"required":["kind","slot","equals"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_empty_days"},"slot":{"type":"string"},"days":{"type":"integer","minimum":0,"maximum":365}},"required":["kind","slot","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"duplicate_key"},"slot":{"type":"string"}},"required":["kind","slot"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"amount_over"},"slot":{"default":"amount","type":"string"},"over":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"}},"required":["kind","over"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"validation"},"check":{"type":"string","enum":["negative_amount","status_conflict"]},"slot":{"type":"string"},"whenSlot":{"type":"string"},"whenEquals":{"type":"string","maxLength":100},"butSlot":{"type":"string"},"butEquals":{"type":"string","maxLength":100}},"required":["kind","check"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"due_passed"},"slot":{"default":"due_at","type":"string"},"afterMinutes":{"default":0,"type":"integer","minimum":0,"maximum":525600}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"daily_exists"},"slot":{"default":"scheduled_at","type":"string"},"byHour":{"default":"10:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["kind"],"additionalProperties":false}]},"actions":{"minItems":1,"maxItems":5,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"task"},"title":{"type":"string","minLength":1,"maxLength":160},"role":{"default":"staff","type":"string","enum":["owner","admin","finance","hr","staff"]},"dueMinutes":{"type":"integer","minimum":1,"maximum":525600}},"required":["kind","title"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"line"},"target":{"default":"user","type":"string","enum":["user","group"]},"text":{"type":"string","minLength":1,"maxLength":400},"connectorId":{"type":"string","maxLength":60}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"sms"},"body":{"type":"string","minLength":1,"maxLength":320}},"required":["kind","body"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"call"},"instanceId":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","instanceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"writeback"},"slot":{"type":"string","maxLength":40},"value":{"type":"string","maxLength":300}},"required":["kind","slot","value"],"additionalProperties":false}]}},"ladder":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"afterMinutes":{"type":"integer","minimum":1,"maximum":525600},"role":{"type":"string","enum":["owner","admin","finance","hr","staff"]},"userId":{"type":"string","maxLength":60}},"required":["afterMinutes"],"additionalProperties":false}},"stopCondition":{"type":"object","properties":{"slot":{"type":"string"},"equals":{"type":"string","maxLength":200},"nonEmpty":{"type":"boolean"}},"required":["slot"],"additionalProperties":false},"quietRefs":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","maxLength":120}},"maxPerHour":{"default":60,"type":"integer","minimum":1,"maximum":10000},"maxPerDay":{"default":500,"type":"integer","minimum":1,"maximum":100000},"quietSeconds":{"default":30,"type":"integer","minimum":0,"maximum":3600}},"required":["name","trigger","actions"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/event-rules/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"trigger\":{\"kind\":\"field_equals\",\"slot\":\"string\",\"equals\":\"string\"},\"actions\":[{\"kind\":\"task\",\"title\":\"string\"}]}'"}]}},"/api/v1/event-rules/{id}/enable":{"post":{"operationId":"postEventRulesIdEnable","summary":"Enable / disable a rule (also clears a storm-protection trip)","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/event-rules/ID/enable' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"enabled\":false}'"}]}},"/api/v1/event-rules/{id}/fires":{"get":{"operationId":"getEventRulesIdFires","summary":"What a rule fired (stage, record, task, status)","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/event-rules/ID/fires' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/event-rules/recipes":{"get":{"operationId":"getEventRulesRecipes","summary":"Rule recipes: G11 staff task chase, G12 payment received → downstream, overdue payment","tags":["tasks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/event-rules/recipes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postEventRulesRecipes","summary":"Create a (disabled) rule from a recipe on one of your connectors","tags":["tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","maxLength":40},"connectorId":{"type":"string","minLength":1,"maxLength":64},"language":{"default":"zh","type":"string","enum":["zh","th","en"]},"params":{"default":{},"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":60}}},"required":["key","connectorId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"connectors:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/event-rules/recipes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"connectorId\":\"string\"}'"}]}},"/api/v1/events/stream":{"get":{"operationId":"getEventsStream","summary":"Live account events (SSE)","tags":["events"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/events/stream' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/exports/{id}/download":{"get":{"operationId":"getExportsIdDownload","summary":"Download an export pack with its one-person link","tags":["exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":20,"maxLength":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/exports/ID/download' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/home":{"get":{"operationId":"getHome","summary":"Home: ledger balance, recent activity, next best actions","tags":["me"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/home' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/home/intent":{"post":{"operationId":"postHomeIntent","summary":"One-sentence entry: what the customer wants done → suggested package or screen","tags":["me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":2000}},"required":["text"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/home/intent' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"text\":\"string\"}'"}]}},"/api/v1/hub/assistant/cost-warnings":{"get":{"operationId":"getHubAssistantCostWarnings","summary":"Cost warnings: wallet < 3 days of spend, budgets ≥ 80 %, spend spike > 2× the 7-day mean","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/assistant/cost-warnings' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/assistant/report":{"get":{"operationId":"getHubAssistantReport","summary":"Stored daily / weekly reports (text in zh / th / en, every number with its source)","tags":["hub"],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["daily","weekly"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/assistant/report' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubAssistantReport","summary":"Generate (or regenerate) today's daily or weekly report now","tags":["hub"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["daily","weekly"]}},"required":["kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/assistant/report' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"daily\"}'"}]}},"/api/v1/hub/assistant/today":{"get":{"operationId":"getHubAssistantToday","summary":"What needs me today: approvals, reviews, comparisons, stale leads, stuck tasks, disputes, low balance","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/assistant/today' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/campaigns":{"get":{"operationId":"getHubCampaigns","summary":"SMS campaigns with phase, stats and budget","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/campaigns' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubCampaigns","summary":"Create a draft SMS campaign (offer, budget cap, audience, window within Mon–Fri 09:00–18:00)","tags":["hub"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"offer":{"type":"string","minLength":3,"maxLength":200},"budgetCapThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"language":{"default":"th","type":"string","enum":["zh","th","en"]},"audience":{"default":{"statuses":["new","qualified","contacted"],"minScore":0},"type":"object","properties":{"statuses":{"default":["new","qualified","contacted"],"minItems":1,"type":"array","items":{"type":"string","enum":["new","qualified","contacted"]}},"minScore":{"default":0,"type":"integer","minimum":0,"maximum":100}},"additionalProperties":false},"schedule":{"default":{"days":[1,2,3,4,5],"start":"09:00","end":"18:00","perMinute":20},"type":"object","properties":{"days":{"default":[1,2,3,4,5],"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"default":"09:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"default":"18:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"perMinute":{"default":20,"type":"integer","minimum":1,"maximum":120}},"additionalProperties":false}},"required":["name","offer","budgetCapThb"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/campaigns' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"offer\":\"string\",\"budgetCapThb\":\"string\"}'"}]}},"/api/v1/hub/campaigns/{id}":{"get":{"operationId":"getHubCampaignsId","summary":"One campaign with its copy drafts","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/campaigns/{id}/approve":{"post":{"operationId":"postHubCampaignsIdApprove","summary":"Owner/admin approves (copy approved, ready to start) or declines the campaign","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"default":true,"type":"boolean"},"note":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID/approve' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/hub/campaigns/{id}/copy":{"post":{"operationId":"postHubCampaignsIdCopy","summary":"Draft or save campaign copy (claim lint, opt-out line required)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"languages":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["zh","th","en"]}}},"required":["languages"],"additionalProperties":false},{"type":"object","properties":{"language":{"type":"string","enum":["zh","th","en"]},"body":{"type":"string","minLength":10,"maxLength":320}},"required":["language","body"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID/copy' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"languages\":[\"zh\"]}'"}]}},"/api/v1/hub/campaigns/{id}/pause":{"post":{"operationId":"postHubCampaignsIdPause","summary":"Pause a running campaign","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID/pause' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/campaigns/{id}/recipients":{"get":{"operationId":"getHubCampaignsIdRecipients","summary":"Recipients with status and skip reason (no_consent / dnc / outside_window …)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","sent","skipped","failed"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID/recipients' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/campaigns/{id}/start":{"post":{"operationId":"postHubCampaignsIdStart","summary":"Start or resume an approved campaign (the pacing job sends inside the window)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID/start' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/campaigns/{id}/submit":{"post":{"operationId":"postHubCampaignsIdSubmit","summary":"Freeze audience (live marketing consent only, DNC checked) and cost estimate; ask for approval","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/campaigns/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/candidates":{"get":{"operationId":"getHubCandidates","summary":"Candidates (masked contact details)","tags":["hub"],"parameters":[{"name":"jobId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","matched","needs_info","boss_review","approved_contact","contacted","declined","interview","hired","rejected"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/candidates' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/candidates/{id}":{"get":{"operationId":"getHubCandidatesId","summary":"Candidate detail (audited: who viewed which CV)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/candidates/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/candidates/{id}/access-export":{"get":{"operationId":"getHubCandidatesIdAccessExport","summary":"Right of access: everything held about the candidate (audited)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/access-export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/candidates/{id}/decision":{"post":{"operationId":"postHubCandidatesIdDecision","summary":"Hire or reject a candidate (human review mandatory)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["hire","reject"]},"note":{"type":"string","maxLength":300}},"required":["decision"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/decision' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"hire\"}'"}]}},"/api/v1/hub/candidates/{id}/erase":{"post":{"operationId":"postHubCandidatesIdErase","summary":"Right to erasure: scrub the candidate's personal data (name, phone, e-mail, CV text, screening)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":2,"maxLength":200},"keepDnc":{"type":"boolean"}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/erase' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/hub/candidates/{id}/group":{"post":{"operationId":"postHubCandidatesIdGroup","summary":"Boss overrides the automatic group (the reason is recorded next to the rules)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"string","enum":["matched","needs_info","boss_review"]},"note":{"type":"string","minLength":2,"maxLength":300}},"required":["group","note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/group' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"group\":\"matched\",\"note\":\"string\"}'"}]}},"/api/v1/hub/candidates/{id}/interviews":{"get":{"operationId":"getHubCandidatesIdInterviews","summary":"Interview slots of a candidate","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/interviews' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubCandidatesIdInterviews","summary":"Propose 1–5 interview slots (and SMS them to the candidate)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slots":{"minItems":1,"maxItems":5,"type":"array","items":{}},"location":{"type":"string","maxLength":200},"interviewerId":{"type":"string","maxLength":80},"notify":{"default":true,"type":"boolean"},"language":{"type":"string","enum":["zh","th","en"]}},"required":["slots"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/interviews' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"slots\":[\"string\"]}'"}]}},"/api/v1/hub/candidates/{id}/object":{"post":{"operationId":"postHubCandidatesIdObject","summary":"Right to object: stop all contact, cancel open interviews","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/object' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/candidates/{id}/onboarding":{"get":{"operationId":"getHubCandidatesIdOnboarding","summary":"Onboarding checklist of a hired candidate","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubCandidatesIdOnboarding","summary":"Create the default 6-item onboarding checklist (idempotent)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/candidates/{id}/rights-notice":{"post":{"operationId":"postHubCandidatesIdRightsNotice","summary":"SMS the candidate-rights notice once (purposes, retention, access / delete / object); records rightsNoticeAt","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"language":{"type":"string","enum":["zh","th","en"]},"force":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/rights-notice' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/hub/candidates/{id}/views":{"get":{"operationId":"getHubCandidatesIdViews","summary":"Who opened this candidate (viewer id and time)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/candidates/ID/views' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/funnel":{"get":{"operationId":"getHubFunnel","summary":"Lead funnel: counts per status and conversion percentages","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/funnel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/interviews":{"get":{"operationId":"getHubInterviews","summary":"Upcoming interviews (all candidates)","tags":["hub"],"parameters":[{"name":"from","in":"query","required":false,"schema":{}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/interviews' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/interviews/{id}/attendance":{"post":{"operationId":"postHubInterviewsIdAttendance","summary":"Record whether the candidate attended","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attended":{"type":"boolean"}},"required":["attended"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/interviews/ID/attendance' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"attended\":false}'"}]}},"/api/v1/hub/interviews/{id}/cancel":{"post":{"operationId":"postHubInterviewsIdCancel","summary":"Cancel an interview","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/interviews/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/interviews/{id}/confirm":{"post":{"operationId":"postHubInterviewsIdConfirm","summary":"Confirm a proposed slot (other proposed slots of the candidate are cancelled)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/interviews/ID/confirm' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/interviews/{id}/reschedule":{"post":{"operationId":"postHubInterviewsIdReschedule","summary":"Counter-propose a new time (max 3 changes); it must be confirmed again","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newSlot":{},"by":{"type":"string","enum":["candidate","company"]}},"required":["newSlot","by"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/interviews/ID/reschedule' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"newSlot\":\"string\",\"by\":\"candidate\"}'"}]}},"/api/v1/hub/jobs":{"get":{"operationId":"getHubJobs","summary":"Job posts with candidate counts per status","tags":["hub"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending_approval","open","paused","closed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/jobs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubJobs","summary":"Create a draft job post (title, headcount, salary, requirements: must-have skills / minimum years / available-by / screening questions)","tags":["hub"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":120},"description":{"type":"string","maxLength":4000},"headcount":{"default":1,"type":"integer","minimum":1,"maximum":500},"location":{"type":"string","maxLength":160},"salaryMinThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"salaryMaxThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"requirements":{"type":"object","properties":{"mustHaveSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"minYears":{"type":"number","minimum":0,"maximum":60},"availableBy":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"questions":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\":\"string\"}'"}]}},"/api/v1/hub/jobs/{id}":{"get":{"operationId":"getHubJobsId","summary":"One job post","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/jobs/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putHubJobsId","summary":"Edit a draft or paused job post","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":120},"description":{"type":"string","maxLength":4000},"headcount":{"default":1,"type":"integer","minimum":1,"maximum":500},"location":{"type":"string","maxLength":160},"salaryMinThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"salaryMaxThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"requirements":{"type":"object","properties":{"mustHaveSkills":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"minYears":{"type":"number","minimum":0,"maximum":60},"availableBy":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"questions":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/hub/jobs/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\":\"string\"}'"}]}},"/api/v1/hub/jobs/{id}/candidates/export":{"get":{"operationId":"getHubJobsIdCandidatesExport","summary":"Candidate CSV export (formula cells escaped; the export is audited)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/candidates/export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/jobs/{id}/candidates/import":{"post":{"operationId":"postHubJobsIdCandidatesImport","summary":"Import candidates from CSV/XLSX with dedupe, field extraction and transparent grouping","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/candidates/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/jobs/{id}/decision":{"post":{"operationId":"postHubJobsIdDecision","summary":"Owner/admin approves (job opens) or declines (back to draft) a submitted job","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":300}},"required":["approve"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/decision' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"approve\":false}'"}]}},"/api/v1/hub/jobs/{id}/regroup":{"post":{"operationId":"postHubJobsIdRegroup","summary":"Re-run the grouping rules for undecided candidates (boss overrides are kept)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/regroup' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/jobs/{id}/review":{"post":{"operationId":"postHubJobsIdReview","summary":"Boss review of the contact list: approve candidates for AI phone screening or decline them","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approveIds":{"default":[],"maxItems":2000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"declineIds":{"default":[],"maxItems":2000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/review' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/hub/jobs/{id}/screen":{"post":{"operationId":"postHubJobsIdScreen","summary":"Start the AI phone screen (package recruit_screening) for the approved candidates; needs an Idempotency-Key","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"dailyCap":{"type":"integer","minimum":1,"maximum":5000}},"required":["budgetThb"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/screen' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"budgetThb\":\"string\"}'"}]},"put":{"operationId":"putHubJobsIdScreen","summary":"Copy finished screening calls into the candidates (score + explanation)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/screen' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/jobs/{id}/status":{"post":{"operationId":"postHubJobsIdStatus","summary":"Pause, reopen or close a job post","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["paused","closed","open"]}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/status' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/hub/jobs/{id}/submit":{"post":{"operationId":"postHubJobsIdSubmit","summary":"Submit a draft job for owner/admin approval","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/jobs/ID/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/leads":{"get":{"operationId":"getHubLeads","summary":"Leads with score and the rules behind it (masked contact details)","tags":["hub"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","qualified","contacted","won","lost","disqualified"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/leads' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/leads/{id}/status":{"post":{"operationId":"postHubLeadsIdStatus","summary":"Move a lead along the funnel (new → qualified → contacted → won / lost)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","enum":["qualified","contacted","won","lost","disqualified"]}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/leads/ID/status' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/hub/leads/export":{"get":{"operationId":"getHubLeadsExport","summary":"Lead CSV export (formula cells escaped; audited)","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/leads/export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/leads/import":{"post":{"operationId":"postHubLeadsImport","summary":"Import leads (CSV/XLSX) with a consent-evidence column; dedupe and score","tags":["hub"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/leads/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/leads/qualify":{"post":{"operationId":"postHubLeadsQualify","summary":"Move every new lead at or above the score threshold (default 50) to qualified","tags":["hub"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"minScore":{"type":"integer","minimum":0,"maximum":100}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/leads/qualify' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/hub/onboarding/{id}":{"put":{"operationId":"putHubOnboardingId","summary":"Tick or untick an onboarding checklist item","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"done":{"type":"boolean"}},"required":["done"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/hub/onboarding/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"done\":false}'"}]}},"/api/v1/hub/rfqs":{"get":{"operationId":"getHubRfqs","summary":"RFQs with invite / quote counts","tags":["hub"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","sent","collecting","comparing","decided","closed"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/rfqs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubRfqs","summary":"Create an RFQ (title, spec, quantity, budget cap, deadline)","tags":["hub"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":2,"maxLength":160},"spec":{"type":"string","maxLength":4000},"unit":{"default":"pcs","type":"string","minLength":1,"maxLength":30},"quantity":{"type":"integer","minimum":1,"maximum":10000000},"budgetMaxThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"deadline":{},"chaseAfterHours":{"default":24,"type":"integer","minimum":1,"maximum":240}},"required":["title","quantity"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\":\"string\",\"quantity\":1}'"}]}},"/api/v1/hub/rfqs/{id}":{"get":{"operationId":"getHubRfqsId","summary":"One RFQ with invitations and quotes","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/rfqs/{id}/chase":{"post":{"operationId":"postHubRfqsIdChase","summary":"Run the chase now for this RFQ (one SMS to silent suppliers after the chase window, max 2, then no_response)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/chase' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/rfqs/{id}/compare":{"get":{"operationId":"getHubRfqsIdCompare","summary":"Comparison table: lowest price, fastest, within budget, missing data flagged","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/compare' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/rfqs/{id}/invites":{"post":{"operationId":"postHubRfqsIdInvites","summary":"Invite suppliers (SMS or AI call) to quote","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"suppliers":{"minItems":1,"maxItems":200,"type":"array","items":{"anyOf":[{"type":"object","properties":{"contactId":{"type":"string","maxLength":80}},"required":["contactId"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","minLength":8,"maxLength":20}},"required":["name","phone"],"additionalProperties":false}]}},"channel":{"default":"sms","type":"string","enum":["sms","call"]},"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"}},"required":["suppliers"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/invites' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"suppliers\":[{\"contactId\":\"string\"}]}'"}]}},"/api/v1/hub/rfqs/{id}/invites/{inviteId}/decline":{"post":{"operationId":"postHubRfqsIdInvitesInviteIdDecline","summary":"Record that a supplier declined to quote","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inviteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/invites/INVITEID/decline' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/rfqs/{id}/po":{"post":{"operationId":"postHubRfqsIdPo","summary":"Create the purchase-order draft (b10 document) from the selected quote","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":300},"taxId":{"type":"string","maxLength":20}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/po' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/hub/rfqs/{id}/quotes":{"post":{"operationId":"postHubRfqsIdQuotes","summary":"Record a supplier quote by hand (price THB, delivery days, terms)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierName":{"type":"string","minLength":1,"maxLength":200},"supplierContactId":{"type":"string","maxLength":80},"priceThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"priceBasis":{"default":"total","type":"string","enum":["total","unit"]},"deliveryDays":{"type":"integer","minimum":0,"maximum":365},"terms":{"type":"string","maxLength":500}},"required":["supplierName"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/quotes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"supplierName\":\"string\"}'"}]}},"/api/v1/hub/rfqs/{id}/quotes/capture":{"post":{"operationId":"postHubRfqsIdQuotesCapture","summary":"Extract quotes from replies (pasted text, inbound SMS, call transcripts)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierName":{"type":"string","minLength":1,"maxLength":200},"supplierContactId":{"type":"string","maxLength":80},"text":{"type":"string","minLength":2,"maxLength":2000},"source":{"default":"sms","type":"string","enum":["sms","call"]},"sourceRef":{"type":"string","minLength":1,"maxLength":120}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/quotes/capture' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/hub/rfqs/{id}/select":{"post":{"operationId":"postHubRfqsIdSelect","summary":"Select the winning quote (approval needed above the budget)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","maxLength":300}},"required":["quoteId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/select' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"quoteId\":\"string\"}'"}]},"put":{"operationId":"putHubRfqsIdSelect","summary":"Owner/admin approves or declines an over-budget selection","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":300}},"required":["approve"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/hub/rfqs/ID/select' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"approve\":false}'"}]}},"/api/v1/hub/rights-text":{"get":{"operationId":"getHubRightsText","summary":"Candidate-rights notice text in three languages","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/rights-text' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/suppliers":{"get":{"operationId":"getHubSuppliers","summary":"Suppliers (contacts tagged \"supplier\")","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/suppliers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubSuppliers","summary":"Import suppliers from a table","tags":["hub"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/suppliers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/truck-orders":{"get":{"operationId":"getHubTruckOrders","summary":"Truck orders","tags":["hub"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","quoting","awaiting_confirm","confirmed","ordering","ordered","cancelled"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/truck-orders' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postHubTruckOrders","summary":"Create a truck order draft (cargo, pickup, drop-off, budget, driver phone)","tags":["hub"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cargo":{"type":"string","minLength":2,"maxLength":300},"pickup":{"type":"string","minLength":3,"maxLength":300},"dropoff":{"type":"string","minLength":3,"maxLength":300},"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"contactPhone":{"type":"string","minLength":8,"maxLength":20}},"required":["cargo","pickup","dropoff"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/truck-orders' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"cargo\":\"string\",\"pickup\":\"string\",\"dropoff\":\"string\"}'"}]}},"/api/v1/hub/truck-orders/{id}":{"get":{"operationId":"getHubTruckOrdersId","summary":"One truck order with its quotes and confirmation state","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/truck-orders/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/truck-orders/{id}/cancel":{"post":{"operationId":"postHubTruckOrdersIdCancel","summary":"Cancel an order that was not placed yet","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/truck-orders/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/truck-orders/{id}/confirm":{"post":{"operationId":"postHubTruckOrdersIdConfirm","summary":"Confirm the quoted price (records price, user, time)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priceThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"}},"required":["priceThb"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/truck-orders/ID/confirm' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"priceThb\":\"string\"}'"}]}},"/api/v1/hub/truck-orders/{id}/order":{"post":{"operationId":"postHubTruckOrdersIdOrder","summary":"Place the order (only after the price was confirmed)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/truck-orders/ID/order' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/truck-orders/{id}/quote":{"post":{"operationId":"postHubTruckOrdersIdQuote","summary":"Get or record a quote for the order","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"method":{"type":"string","const":"manual"},"priceThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"driver":{"type":"string","maxLength":120}},"required":["method","priceThb"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"phone"},"driverPhone":{"type":"string","minLength":8,"maxLength":20},"driverName":{"type":"string","maxLength":80},"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"}},"required":["method","budgetThb"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"provider"},"provider":{"type":"string","enum":["lalamove","deliveree","simulator"]}},"required":["method","provider"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"capture"}},"required":["method"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/truck-orders/ID/quote' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"method\":\"manual\",\"priceThb\":\"string\"}'"}]}},"/api/v1/hub/truck-orders/{id}/select":{"post":{"operationId":"postHubTruckOrdersIdSelect","summary":"Choose which received quote is the active one (needs a new confirmation)","tags":["hub"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"type":"string","minLength":1,"maxLength":64}},"required":["quoteId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"contacts:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/hub/truck-orders/ID/select' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"quoteId\":\"string\"}'"}]}},"/api/v1/hub/truck-providers":{"get":{"operationId":"getHubTruckProviders","summary":"Truck booking routes available to this account","tags":["hub"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/hub/truck-providers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/hub/truck-providers/{name}":{"put":{"operationId":"putHubTruckProvidersName","summary":"Enable / disable a platform route (authorisation + credentials)","tags":["hub"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"authorised":{"type":"boolean"},"credentials":{"type":"object","properties":{"apiKey":{"type":"string","minLength":4,"maxLength":200},"apiSecret":{"type":"string","maxLength":200},"baseUrl":{"type":"string","maxLength":200,"format":"uri"},"market":{"type":"string","maxLength":8},"serviceType":{"type":"string","maxLength":40}},"required":["apiKey"],"additionalProperties":false}},"required":["authorised"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"hub:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/hub/truck-providers/NAME' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"authorised\":false}'"}]}},"/api/v1/inbound/screen-pop":{"get":{"operationId":"getInboundScreenPop","summary":"Inbound call screen-pop (SSE) with contact match","tags":["calls"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/inbound/screen-pop' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/invitations":{"get":{"operationId":"getInvitations","summary":"Open invitations","tags":["members"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"members:invite","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/invitations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postInvitations","summary":"Invite a person by e-mail or phone","tags":["members"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","minLength":3,"maxLength":254},"role":{"type":"string","enum":["admin","finance","hr","staff"]}},"required":["target","role"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"members:invite","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/invitations' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"target\":\"string\",\"role\":\"admin\"}'"}]}},"/api/v1/invitations/{id}":{"delete":{"operationId":"deleteInvitationsId","summary":"Revoke an invitation","tags":["members"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"members:invite","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/invitations/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/invitations/accept":{"post":{"operationId":"postInvitationsAccept","summary":"Accept an invitation (the signed-in user must own the invited contact)","tags":["members"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":100}},"required":["token"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/invitations/accept' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\"}'"}]}},"/api/v1/invitations/preview":{"post":{"operationId":"postInvitationsPreview","summary":"What an invitation link is for (company, role) — no personal data","tags":["members"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":100}},"required":["token"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/invitations/preview' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"token\":\"string\"}'"}]}},"/api/v1/ka/invoices/{id}/dispute":{"post":{"operationId":"postKaInvoicesIdDispute","summary":"Flag an invoice amount as disputed","tags":["key-accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountSatang":{"type":"string","pattern":"^\\d{1,13}$"},"reason":{"type":"string","minLength":5,"maxLength":500}},"required":["amountSatang","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ka/invoices/ID/dispute' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amountSatang\":\"string\",\"reason\":\"string\"}'"}]}},"/api/v1/ka/overview":{"get":{"operationId":"getKaOverview","summary":"Key-account overview: tier, credit position, usage and billing numbers","tags":["key-accounts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/ka/overview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/ka/quote-requests":{"post":{"operationId":"postKaQuoteRequests","summary":"Request a key-account quote (creates a lead)","tags":["key-accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactName":{"type":"string","minLength":1,"maxLength":120},"company":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":30},"expected":{"default":{},"type":"object","properties":{"smsPerMonth":{"type":"integer","minimum":0,"maximum":1000000000},"callMinutesPerMonth":{"type":"integer","minimum":0,"maximum":100000000},"otpShare":{"type":"number","minimum":0,"maximum":1},"tier":{"type":"string","maxLength":40},"needs":{"maxItems":5,"type":"array","items":{"type":"string","enum":["postpaid","below_list","dedicated_route","custom_sla","sub_accounts"]}}}},"note":{"type":"string","maxLength":1000}},"required":["contactName","company","email"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ka/quote-requests' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contactName\":\"string\",\"company\":\"string\",\"email\":\"string\"}'"}]}},"/api/v1/ka/reports":{"get":{"operationId":"getKaReports","summary":"Scheduled reports","tags":["key-accounts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/ka/reports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKaReports","summary":"Schedule a report (CSV / XLSX by e-mail or webhook)","tags":["key-accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["usage","messages","invoices","sla","calls"]},"format":{"default":"csv","type":"string","enum":["csv","xlsx"]},"frequency":{"default":"monthly","type":"string","enum":["daily","weekly","monthly"]},"hour_bkk":{"default":7,"type":"integer","minimum":0,"maximum":23},"delivery":{"default":"email","type":"string","enum":["email","webhook"]},"recipients":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["name","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ka/reports' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"kind\":\"usage\"}'"}]}},"/api/v1/ka/reports/{id}":{"delete":{"operationId":"deleteKaReportsId","summary":"Stop a scheduled report","tags":["key-accounts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/ka/reports/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/ka/request-quote":{"post":{"operationId":"postKaRequestQuote","summary":"Ask the account manager for a quote from your account","tags":["key-accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactName":{"type":"string","minLength":1,"maxLength":120},"company":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":30},"expected":{"default":{},"type":"object","properties":{"smsPerMonth":{"type":"integer","minimum":0,"maximum":1000000000},"callMinutesPerMonth":{"type":"integer","minimum":0,"maximum":100000000},"otpShare":{"type":"number","minimum":0,"maximum":1},"tier":{"type":"string","maxLength":40},"needs":{"maxItems":5,"type":"array","items":{"type":"string","enum":["postpaid","below_list","dedicated_route","custom_sla","sub_accounts"]}}}},"note":{"type":"string","maxLength":1000}},"required":["contactName","company","email"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ka/request-quote' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contactName\":\"string\",\"company\":\"string\",\"email\":\"string\"}'"}]}},"/api/v1/ka/sla":{"get":{"operationId":"getKaSla","summary":"SLA terms and monthly reports with credits","tags":["key-accounts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/ka/sla' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/ka/statements":{"get":{"operationId":"getKaStatements","summary":"Monthly statements and their invoices per issuing company","tags":["key-accounts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/ka/statements' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/ka/sub-accounts":{"get":{"operationId":"getKaSubAccounts","summary":"Sub-accounts (departments) with monthly budget and spend","tags":["key-accounts"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/ka/sub-accounts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKaSubAccounts","summary":"Create a sub-account billed on this account","tags":["key-accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"monthlyBudgetSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/ka/sub-accounts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\"}'"}]}},"/api/v1/ka/sub-accounts/{tenantId}":{"patch":{"operationId":"patchKaSubAccountsTenantId","summary":"Change a sub-account monthly budget","tags":["key-accounts"],"parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyBudgetSatang":{"anyOf":[{"type":"string","pattern":"^\\d{1,13}$"},{"type":"null"}]}},"required":["monthlyBudgetSatang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/ka/sub-accounts/TENANTID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"monthlyBudgetSatang\":\"string\"}'"}]}},"/api/v1/ka/usage":{"get":{"operationId":"getKaUsage","summary":"Usage of the billing group by product, account and day","tags":["key-accounts"],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/ka/usage' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb":{"delete":{"operationId":"deleteKb","summary":"Erase the whole knowledge base now (PDPA)","tags":["kb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","const":"DELETE_ALL"}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/kb' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"confirm\":\"DELETE_ALL\"}'"}]}},"/api/v1/kb/export":{"get":{"operationId":"getKbExport","summary":"Export all knowledge-base data (json, or csv of the facts)","tags":["kb"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/export' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/facts":{"get":{"operationId":"getKbFacts","summary":"Facts (filter by status / flag / category)","tags":["kb"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["unconfirmed","confirmed","conflicted","expired","deleted"]}},{"name":"flag","in":"query","required":false,"schema":{"type":"string","enum":["uncertain","conflict","stale","suspicious"]}},{"name":"category","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"sourceId","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"key","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/facts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKbFacts","summary":"Add a fact by hand (confirmed by the person who types it)","tags":["kb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"valueText":{"type":"string","minLength":1,"maxLength":1000},"category":{"type":"string","maxLength":40},"locale":{"type":"string","enum":["th","zh","en"]},"visibleRoles":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","caller","customer","staff","owner"]}},"validUntil":{},"acknowledgeSuspicious":{"type":"boolean"}},"required":["key","valueText"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/facts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"valueText\":\"string\"}'"}]}},"/api/v1/kb/facts/{id}":{"delete":{"operationId":"deleteKbFactsId","summary":"Delete a fact (soft delete; the AI stops using it at once)","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/kb/facts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"get":{"operationId":"getKbFactsId","summary":"Version history of a fact","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/facts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchKbFactsId","summary":"Edit a fact (creates a new version)","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"valueText":{"type":"string","minLength":1,"maxLength":1000},"visibleRoles":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","caller","customer","staff","owner"]}},"validUntil":{"anyOf":[{},{"type":"null"}]},"reason":{"type":"string","maxLength":300},"acknowledgeSuspicious":{"type":"boolean"}},"required":["valueText"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/kb/facts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"valueText\":\"string\"}'"}]}},"/api/v1/kb/facts/{id}/confirm":{"post":{"operationId":"postKbFactsIdConfirm","summary":"Confirm a candidate fact (flagged ones need acknowledgeSuspicious)","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"acknowledgeSuspicious":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/facts/ID/confirm' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/kb/facts/{id}/correct":{"post":{"operationId":"postKbFactsIdCorrect","summary":"Correct a live fact after a mistake was found (new version, reason recorded)","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"valueText":{"type":"string","minLength":1,"maxLength":1000},"visibleRoles":{"maxItems":5,"type":"array","items":{"type":"string","enum":["public","caller","customer","staff","owner"]}},"validUntil":{"anyOf":[{},{"type":"null"}]},"reason":{"type":"string","maxLength":300},"acknowledgeSuspicious":{"type":"boolean"}},"required":["valueText"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/facts/ID/correct' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"valueText\":\"string\"}'"}]}},"/api/v1/kb/facts/{id}/reject":{"post":{"operationId":"postKbFactsIdReject","summary":"Reject a candidate fact","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/facts/ID/reject' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/facts/resolve-conflict":{"post":{"operationId":"postKbFactsResolveConflict","summary":"Resolve a conflict: keep one value (optionally re-worded), discard the others","tags":["kb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"winnerId":{"type":"string","minLength":1,"maxLength":60},"valueText":{"type":"string","minLength":1,"maxLength":1000},"acknowledgeSuspicious":{"type":"boolean"},"key":{"type":"string","minLength":1,"maxLength":120}},"required":["winnerId","key"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/facts/resolve-conflict' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"winnerId\":\"string\",\"key\":\"string\"}'"}]}},"/api/v1/kb/forbidden":{"get":{"operationId":"getKbForbidden","summary":"Topics the AI must never answer","tags":["kb"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/forbidden' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKbForbidden","summary":"Add a forbidden topic (patterns, fixed reply, action)","tags":["kb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":80},"patterns":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":2,"maxLength":100}},"reply":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"action":{"default":"handover","type":"string","enum":["handover","decline","callback"]},"active":{"default":true,"type":"boolean"}},"required":["topic","patterns"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/forbidden' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"topic\":\"string\",\"patterns\":[\"string\"]}'"}]}},"/api/v1/kb/forbidden/{id}":{"delete":{"operationId":"deleteKbForbiddenId","summary":"Remove a forbidden topic","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/kb/forbidden/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchKbForbiddenId","summary":"Change a forbidden topic","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":80},"patterns":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":2,"maxLength":100}},"reply":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"action":{"default":"handover","type":"string","enum":["handover","decline","callback"]},"active":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/kb/forbidden/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/kb/health":{"get":{"operationId":"getKbHealth","summary":"Knowledge health score and what is missing","tags":["kb"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/health' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKbHealth","summary":"Recompute the health score now (stores a snapshot)","tags":["kb"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/health' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/rules":{"get":{"operationId":"getKbRules","summary":"Business rules (all versions)","tags":["kb"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending_approval","active","retired"]}},{"name":"key","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKbRules","summary":"Draft a rule (new version of its key)","tags":["kb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,60}$"},"kind":{"type":"string","enum":["dial_permission","approval","discount","template","budget","reminder"]},"description":{"type":"string","maxLength":300},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["key","kind","body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"key\":\"string\",\"kind\":\"dial_permission\",\"body\":{}}'"}]}},"/api/v1/kb/rules/{id}":{"post":{"operationId":"postKbRulesId","summary":"Move a rule through draft → pending_approval → active (approver ≠ author)","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["submit","approve","reject","retire"]}},"required":["action"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/rules/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"submit\"}'"}]}},"/api/v1/kb/search":{"post":{"operationId":"postKbSearch","summary":"Ask the knowledge base as the AI would (role caller)","tags":["kb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":200},"lang":{"type":"string","enum":["th","zh","en"]},"categories":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}}},"required":["query"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/search' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"query\":\"string\"}'"}]}},"/api/v1/kb/sources":{"get":{"operationId":"getKbSources","summary":"Knowledge-base sources with extraction status","tags":["kb"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/sources' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKbSources","summary":"Upload a document / photo for the knowledge base","tags":["kb"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/sources' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/sources/{id}":{"delete":{"operationId":"deleteKbSourcesId","summary":"Delete a source: file, text and chunks are erased now (PDPA); its facts are soft-deleted","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/kb/sources/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"get":{"operationId":"getKbSourcesId","summary":"One source with its versions","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/sources/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/sources/{id}/versions":{"post":{"operationId":"postKbSourcesIdVersions","summary":"Upload a new version of a source","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/sources/ID/versions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/suggestions":{"get":{"operationId":"getKbSuggestions","summary":"AI / call / quote suggestions waiting for a person","tags":["kb"],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","accepted","rejected","expired"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kb/suggestions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kb/suggestions/{id}":{"post":{"operationId":"postKbSuggestionsId","summary":"Accept (creates a confirmed fact approved by you) or reject a suggestion","tags":["kb"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","maxLength":120},"valueText":{"type":"string","minLength":1,"maxLength":1000},"acknowledgeSuspicious":{"type":"boolean"},"decision":{"type":"string","const":"accept"}},"required":["decision"]},{"type":"object","properties":{"decision":{"type":"string","const":"reject"}},"required":["decision"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kb:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kb/suggestions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"decision\":\"accept\"}'"}]}},"/api/v1/keyword-rules":{"get":{"operationId":"getKeywordRules","summary":"Inbound keyword rules","tags":["messages"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sms:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/keyword-rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postKeywordRules","summary":"Route an inbound keyword: auto-reply, webhook with tag, or tag only","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","minLength":1,"maxLength":30},"to":{"type":"string","maxLength":20},"action":{"type":"string","enum":["reply","webhook","tag"]},"reply_text":{"type":"string","maxLength":300},"tag":{"type":"string","maxLength":40}},"required":["keyword","action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sms:send","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/keyword-rules' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"keyword\":\"YES\",\"action\":\"reply\"}'"}]}},"/api/v1/keyword-rules/{id}":{"delete":{"operationId":"deleteKeywordRulesId","summary":"Delete a keyword rule","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sms:send","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/keyword-rules/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kyc":{"get":{"operationId":"getKyc","summary":"Verification level, open submission, company registration and the operation waiting for a raise","tags":["kyc"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/kyc' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/kyc/callback":{"post":{"operationId":"postKycCallback","summary":"eKYC vendor callback (hint only; result is re-queried)","tags":["kyc"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kyc/callback'"}]}},"/api/v1/kyc/company-lookup":{"post":{"operationId":"postKycCompanyLookup","summary":"Look up a company by tax ID (registry autofill)","tags":["kyc"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"taxId":{"type":"string","minLength":13,"maxLength":17}},"required":["taxId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kyc/company-lookup' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"taxId\":\"string\"}'"}]}},"/api/v1/kyc/registration":{"post":{"operationId":"postKycRegistration","summary":"Bind the company registration (tax ID) to this account; automatic when the registry confirms an active company","tags":["kyc"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"taxId":{"type":"string","minLength":13,"maxLength":17},"branchCode":{"type":"string","pattern":"^\\d{1,5}$"},"manual":{"type":"object","properties":{"nameTh":{"type":"string","minLength":2,"maxLength":200},"address":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":200}}},"required":["nameTh"]}},"required":["taxId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kyc/registration' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"taxId\":\"string\"}'"}]}},"/api/v1/kyc/submit":{"post":{"operationId":"postKycSubmit","summary":"Submit identity verification (ID document, selfie, consent)","tags":["kyc"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subjectType":{"type":"string","enum":["person","company"]},"docType":{"type":"string","enum":["id_card","passport"]},"idNumber":{"type":"string","minLength":6,"maxLength":20},"fullName":{"type":"string","minLength":2,"maxLength":160},"dateOfBirth":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nationality":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"front":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"back":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"selfie":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"consent":{"type":"boolean"},"purposeText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"scenario":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]}},"required":["subjectType","docType","idNumber","fullName","front","selfie","consent"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/kyc/submit' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"subjectType\":\"person\",\"docType\":\"id_card\",\"idNumber\":\"string\",\"fullName\":\"string\",\"front\":\"string\",\"selfie\":\"string\",\"consent\":false}'"}]}},"/api/v1/legal":{"get":{"operationId":"getLegal","summary":"Latest published legal documents visible to the caller","tags":["legal"],"parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh","th","en"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/legal'"}]}},"/api/v1/legal/{key}":{"get":{"operationId":"getLegalKey","summary":"A legal document (rendered HTML + hash/version)","tags":["legal"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh","th","en"]}},{"name":"version","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+(\\.\\d+){0,3}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/legal/KEY'"}]}},"/api/v1/legal/{key}/pdf":{"get":{"operationId":"getLegalKeyPdf","summary":"Download a legal document as PDF","tags":["legal"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh","th","en"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/legal/KEY/pdf'"}]}},"/api/v1/legal/accept":{"post":{"operationId":"postLegalAccept","summary":"Accept the latest version of legal documents (single consent)","tags":["legal"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","pattern":"^[a-z0-9-]{2,80}$"}},"context":{"type":"string","enum":["checkout","enterprise_contract","reaccept","marketing_optin"]}},"required":["keys","context"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"legal:accept","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/legal/accept' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"keys\":[\"string\"],\"context\":\"checkout\"}'"}]}},"/api/v1/legal/acceptances":{"get":{"operationId":"getLegalAcceptances","summary":"My acceptance records","tags":["legal"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/legal/acceptances' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/legal/pending":{"get":{"operationId":"getLegalPending","summary":"Documents whose latest version I have not accepted yet","tags":["legal"],"parameters":[{"name":"context","in":"query","required":false,"schema":{"default":"signup_consumer","type":"string","enum":["signup_consumer","signup_business","checkout","enterprise_contract"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/legal/pending' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/limits":{"get":{"operationId":"getLimits","summary":"My level, limits in force, today's use, caps, events and what raises them","tags":["limits"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/limits' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/limits/caps":{"put":{"operationId":"putLimitsCaps","summary":"Set or clear a user / default spend cap","tags":["limits"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"period":{"type":"string","enum":["daily","monthly","per_task"]},"capSatang":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^\\d{1,13}$"},{"type":"integer","minimum":0,"maximum":9007199254740991}]},{"type":"null"}]}},"required":["userId","period","capSatang"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"limits:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/limits/caps' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"userId\":\"string\",\"period\":\"daily\",\"capSatang\":\"string\"}'"}]}},"/api/v1/limits/forecast":{"get":{"operationId":"getLimitsForecast","summary":"My promo forecasts","tags":["limits"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/limits/forecast' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postLimitsForecast","summary":"Announce a peak (promo forecast)","tags":["limits"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"product":{"type":"string","enum":["sms","voice","ai"]},"volume":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"note":{"type":"string","maxLength":500}},"required":["startsAt","endsAt","product","volume"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"limits:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/limits/forecast' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"startsAt\":\"2026-12-01T03:00:00Z\",\"endsAt\":\"2026-12-01T03:00:00Z\",\"product\":\"sms\",\"volume\":\"string\"}'"}]}},"/api/v1/links":{"get":{"operationId":"getLinks","summary":"List short links","tags":["links"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/links' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postLinks","summary":"Create a controlled short link (our own domain; destination is reviewed)","tags":["links"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"string","maxLength":500,"format":"uri"},"label":{"type":"string","maxLength":60},"expires_in_days":{"type":"integer","minimum":1,"maximum":365}},"required":["destination"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"links:write","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/links' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"destination\":\"https://example.com/promo\"}'"}]}},"/api/v1/links/{id}":{"delete":{"operationId":"deleteLinksId","summary":"Revoke a link at once (the short URL answers 410 afterwards)","tags":["links"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"links:write","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/links/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"get":{"operationId":"getLinksId","summary":"One short link with its clicks","tags":["links"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/links/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/lookups/{number}":{"get":{"operationId":"getLookupsNumber","summary":"Look up one number (format, country, carrier, line type, active, ported); cached 24 h","tags":["lookups"],"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"lookups:read","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/lookups/%2B66000000001' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/lookups/batch":{"post":{"operationId":"postLookupsBatch","summary":"Clean a CSV list of numbers (plain UTF-8 CSV text, ≤ 10 000 rows); the result CSV comes back inline","tags":["lookups"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":2000000},"file_name":{"type":"string","maxLength":120}},"required":["csv"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"lookups:read","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/lookups/batch' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"csv\":\"number\\n+66000000001\\n\"}'"}]}},"/api/v1/me":{"get":{"operationId":"getMe","summary":"Current user, active account, role, permissions, factors, session state","tags":["me"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/me' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchMe","summary":"Update my name, language and remembered preferences","tags":["me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"locale":{"type":"string","enum":["zh","th","en","ja","ko"]},"preferences":{"type":"object","properties":{"amounts":{"maxItems":8,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":10000000}},"lastTopupSatang":{"type":"string","pattern":"^\\d{1,15}$"},"paymentMethod":{"type":"string","enum":["promptpay","card","alipay","wechat","unionpay","bank_transfer"]},"callerId":{"type":"string","maxLength":40},"budgetSatang":{"type":"string","pattern":"^\\d{1,15}$"},"invoiceTitle":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"taxId":{"type":"string","pattern":"^\\d{13}$"},"address":{"type":"string","maxLength":300}},"required":["name"]},"notifyChannel":{"type":"string","enum":["in_app","email","line","sms"]},"contactsRecent":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}}}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/me' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/me/contact":{"post":{"operationId":"postMeContact","summary":"Send a code to a new phone/e-mail to link or change it","tags":["me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["phone","email"]},"value":{"type":"string","minLength":3,"maxLength":254}},"required":["kind","value"]}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/me/contact' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"phone\",\"value\":\"ACME\"}'"}]}},"/api/v1/me/contact/{id}":{"delete":{"operationId":"deleteMeContactId","summary":"Cancel a pending contact change","tags":["me"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/me/contact/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/contact/confirm":{"post":{"operationId":"postMeContactConfirm","summary":"Confirm a new phone/e-mail with its code (7-day cool-down when replacing)","tags":["me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["phone","email"]},"value":{"type":"string","minLength":3,"maxLength":254},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["kind","value","code"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/me/contact/confirm' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"phone\",\"value\":\"ACME\",\"code\":\"123456\"}'"}]}},"/api/v1/me/devices/{id}":{"delete":{"operationId":"deleteMeDevicesId","summary":"Forget a device (signs out its sessions)","tags":["me"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/me/devices/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/line":{"delete":{"operationId":"deleteMeLine","summary":"Unlink my LINE account (7-day cool-down before linking another)","tags":["me"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/me/line' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/line/link-code":{"post":{"operationId":"postMeLineLinkCode","summary":"Create a one-time code to link my LINE account (send it to the official account)","tags":["me"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/me/line/link-code' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/password":{"post":{"operationId":"postMePassword","summary":"Set or change the optional password (argon2id)","tags":["me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":10,"maxLength":128}},"required":["password"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/me/password' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"password\":\"string\"}'"}]}},"/api/v1/me/push":{"delete":{"operationId":"deleteMePush","summary":"Unsubscribe this browser (or all devices when no endpoint is given)","tags":["notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":600,"format":"uri"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/me/push' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]},"get":{"operationId":"getMePush","summary":"Web push: this user's subscribed devices and what may be pushed","tags":["notifications"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/me/push' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postMePush","summary":"Subscribe this browser to web push (security, billing and task results only; never required)","tags":["notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":600,"format":"uri"},"keys":{"type":"object","properties":{"p256dh":{"type":"string","pattern":"^[A-Za-z0-9_-]{80,100}$"},"auth":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,32}$"}},"required":["p256dh","auth"],"additionalProperties":false},"locale":{"type":"string","maxLength":5}},"required":["endpoint","keys"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/me/push' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"endpoint\":\"https://example.com\",\"keys\":{\"p256dh\":\"string\",\"auth\":\"string\"}}'"}]}},"/api/v1/me/security":{"get":{"operationId":"getMeSecurity","summary":"Security overview: factors, devices, sessions, recent sign-ins","tags":["me"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/me/security' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/sessions":{"get":{"operationId":"getMeSessions","summary":"My active sessions","tags":["me"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/me/sessions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/sessions/{id}":{"delete":{"operationId":"deleteMeSessionsId","summary":"Revoke one of my sessions","tags":["me"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/me/sessions/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/me/sessions/revoke-all":{"post":{"operationId":"postMeSessionsRevokeAll","summary":"Sign out everywhere else","tags":["me"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/me/sessions/revoke-all' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/members":{"get":{"operationId":"getMembers","summary":"Members of the active account","tags":["members"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"members:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/members' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/members/{id}":{"delete":{"operationId":"deleteMembersId","summary":"Remove a member (or leave the account)","tags":["members"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/members/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchMembersId","summary":"Change a member role or department","tags":["members"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","finance","hr","staff"]},"departmentId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"members:update_role","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/members/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/messages":{"get":{"operationId":"getMessages","summary":"List messages (cursor pagination)","tags":["messages"],"parameters":[{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","sent","delivered","failed","rejected","expired","received","blocked","scheduled","accepted","sending","undelivered","canceled"]}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["otp","transactional","marketing"]}},{"name":"client_ref","in":"query","required":false,"schema":{"type":"string"}},{"name":"date_created_gte","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"date_created_lt","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postMessages","summary":"Send one SMS (async; returns the message in queued / scheduled)","tags":["messages"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":8,"maxLength":20},"body":{"type":"string","minLength":1,"maxLength":1600},"template_id":{"type":"string","maxLength":80},"template_vars":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}},"from":{"type":"string","minLength":1,"maxLength":15},"category":{"default":"transactional","type":"string","enum":["otp","transactional","marketing"]},"status_callback":{"type":"string","maxLength":500,"format":"uri"},"validity_period":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"send_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"smart_encoding":{"type":"boolean"},"client_ref":{"type":"string","maxLength":64},"lawful_basis_ref":{"type":"string","maxLength":80},"max_segments":{"type":"integer","minimum":1,"maximum":10},"priority":{"type":"string","enum":["normal","urgent"]}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/messages' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/messages/{id}":{"delete":{"operationId":"deleteMessagesId","summary":"Delete message content after it is final (PDPA); the record stays","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/messages/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"get":{"operationId":"getMessagesId","summary":"Fetch one message","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postMessagesId","summary":"Cancel a scheduled or queued message","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"canceled"}},"required":["status"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/messages/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\":\"canceled\"}'"}]}},"/api/v1/messages/{id}/detail":{"get":{"operationId":"getMessagesIdDetail","summary":"Message detail with cost breakdown and timeline","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages/ID/detail' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/messages/{id}/events":{"get":{"operationId":"getMessagesIdEvents","summary":"Status event history of a message","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages/ID/events' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/messages/batches":{"get":{"operationId":"getMessagesBatches","summary":"List batches","tags":["messages"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages/batches' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postMessagesBatches","summary":"Send an SMS batch (≤ 10 000 recipients, async; dry_run validates and prices only)","tags":["messages"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipients":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"object","properties":{"to":{"type":"string","minLength":5,"maxLength":24},"vars":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":300}},"client_ref":{"type":"string","maxLength":64}},"required":["to"]}},"body":{"type":"string","minLength":1,"maxLength":1600},"template_id":{"type":"string","maxLength":80},"from":{"type":"string","minLength":1,"maxLength":15},"category":{"default":"transactional","type":"string","enum":["otp","transactional","marketing"]},"status_callback":{"type":"string","maxLength":500,"format":"uri"},"client_ref":{"type":"string","maxLength":64},"dry_run":{"default":false,"type":"boolean"}},"required":["recipients"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/messages/batches' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"recipients\":[{\"to\":\"+66000000001\"}]}'"}]}},"/api/v1/messages/batches/{id}":{"get":{"operationId":"getMessagesBatchesId","summary":"Batch status with per-state counts","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages/batches/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/messages/batches/{id}/cancel":{"post":{"operationId":"postMessagesBatchesIdCancel","summary":"Cancel what has not been handed to a provider yet","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/messages/batches/ID/cancel' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001'"}]}},"/api/v1/messages/batches/{id}/items":{"get":{"operationId":"getMessagesBatchesIdItems","summary":"Per-recipient status of a batch (live message status)","tags":["messages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/messages/batches/ID/items' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/messages/estimate":{"post":{"operationId":"postMessagesEstimate","summary":"Estimate segments, price and compliance checks without sending","tags":["messages"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":8,"maxLength":20},"body":{"type":"string","minLength":1,"maxLength":1600},"category":{"default":"transactional","type":"string","enum":["otp","transactional","marketing"]},"smart_encoding":{"type":"boolean"},"from":{"type":"string","maxLength":15},"lawful_basis_ref":{"type":"string","maxLength":80}},"required":["to","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/messages/estimate' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\",\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/migrate/import":{"post":{"operationId":"postMigrateImport","summary":"Import a DNC list, templates or a sender list from CSV (plain UTF-8 text; archives are refused)","tags":["migrate"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["dnc","templates","senders"]},"csv":{"type":"string","minLength":1,"maxLength":2000000}},"required":["kind","csv"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sms:send","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/migrate/import' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"dnc\",\"csv\":\"number\\n+66000000001\\n\"}'"}]}},"/api/v1/notifications":{"get":{"operationId":"getNotifications","summary":"In-app inbox (newest first, localised in the viewer's language)","tags":["notifications"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"unread","in":"query","required":false,"schema":{"default":"0","type":"string","enum":["0","1"]}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["security","billing","team","system","product"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/notifications' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/notifications/preferences":{"get":{"operationId":"getNotificationsPreferences","summary":"Notification channel preferences per category","tags":["notifications"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/notifications/preferences' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putNotificationsPreferences","summary":"Turn a channel on/off for a category (security alerts cannot be turned off)","tags":["notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["security","billing","team","system","product"]},"channel":{"type":"string","enum":["email","sms","line"]},"enabled":{"type":"boolean"}},"required":["category","channel","enabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/notifications/preferences' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"category\":\"transactional\",\"channel\":\"sms\",\"enabled\":false}'"}]}},"/api/v1/notifications/read":{"post":{"operationId":"postNotificationsRead","summary":"Mark notifications read","tags":["notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"anyOf":[{"type":"string","const":"all"},{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}]}},"required":["ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/notifications/read' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ids\":\"all\"}'"}]}},"/api/v1/numbers":{"get":{"operationId":"getNumbers","summary":"Numbers rented by this account (with routing)","tags":["numbers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/numbers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postNumbers","summary":"Rent a number (first month is charged now; renews monthly)","tags":["numbers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["mobile","landline"]},"region":{"type":"string","maxLength":20},"number":{"type":"string","pattern":"^\\+66\\d{8,9}$"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"numbers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/numbers' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/numbers/{id}":{"delete":{"operationId":"deleteNumbersId","summary":"Release a number (quarantined before re-rental)","tags":["numbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"numbers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/numbers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"get":{"operationId":"getNumbersId","summary":"One number with routing","tags":["numbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/numbers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchNumbersId","summary":"Rename a number","tags":["numbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["label"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"numbers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/numbers/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"label\":\"string\"}'"}]}},"/api/v1/numbers/{id}/forwarding-test":{"get":{"operationId":"getNumbersIdForwardingTest","summary":"Result of the latest forwarding test","tags":["numbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/numbers/ID/forwarding-test' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postNumbersIdForwardingTest","summary":"Start the \"does call forwarding work?\" test call","tags":["numbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"originalNumber":{"type":"string","pattern":"^\\+66\\d{8,9}$"}},"required":["originalNumber"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"numbers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/numbers/ID/forwarding-test' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"originalNumber\":\"string\"}'"}]}},"/api/v1/numbers/{id}/routing":{"put":{"operationId":"putNumbersIdRouting","summary":"Set inbound routing for a number","tags":["numbers"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"routes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["ai_agent","human","forward","voicemail"]},"agentId":{"type":["string","null"]},"target":{"anyOf":[{"type":"string","pattern":"^\\+\\d{8,15}$"},{"type":"null"}]},"priority":{"default":1,"type":"integer","minimum":1,"maximum":20},"schedule":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"end":{"type":"string","pattern":"^\\d{2}:\\d{2}$"}},"required":["days","start","end"]}},{"type":"null"}]},"fallbackTransferNumber":{"anyOf":[{"type":"string","pattern":"^\\+\\d{8,15}$"},{"type":"null"}]}},"required":["action"]}},"inboundDailyMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]}},"required":["routes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"numbers:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/numbers/ID/routing' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"routes\":[{\"action\":\"ai_agent\"}]}'"}]}},"/api/v1/numbers/available":{"get":{"operationId":"getNumbersAvailable","summary":"Number stock and monthly fee","tags":["numbers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/numbers/available' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/numbers/forwarding-codes":{"get":{"operationId":"getNumbersForwardingCodes","summary":"Call-forwarding codes for the wizard","tags":["numbers"],"parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","pattern":"^\\+66\\d{8,9}$"}},{"name":"carrier","in":"query","required":false,"schema":{"type":"string","enum":["ais","true","dtac","nt","gsm"]}},{"name":"seconds","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":5,"maximum":30}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/numbers/forwarding-codes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/onboarding":{"delete":{"operationId":"deleteOnboarding","summary":"Leave the waiting list","tags":["onboarding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"get":{"operationId":"getOnboarding","summary":"Sandbox / waitlist / live state of this account","tags":["onboarding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postOnboarding","summary":"Join the waiting list for live lines (free)","tags":["onboarding"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scenario":{"type":"string","minLength":3,"maxLength":500},"volumeBand":{"type":"string","enum":["lt_1k","1k_10k","10k_100k","100k_1m","gt_1m"]},"products":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["sms","otp","voice","ai_phone","api"]}}},"required":["scenario","volumeBand","products"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"kyc:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/onboarding' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scenario\":\"string\",\"volumeBand\":\"lt_1k\",\"products\":[\"sms\"]}'"}]}},"/api/v1/openapi.json":{"get":{"operationId":"getOpenapiJson","summary":"OpenAPI 3.1 document of the public API (generated from the route registry)","tags":["developers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/openapi.json'"}]}},"/api/v1/package-instances":{"get":{"operationId":"getPackageInstances","summary":"My outcome package instances","tags":["packages"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/package-instances' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postPackageInstances","summary":"Create (and start) an outcome package instance","tags":["packages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"packageKey":{"type":"string","minLength":2,"maxLength":60},"name":{"type":"string","minLength":1,"maxLength":120},"params":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"languages":{"default":["th"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["zh","th","en"]}},"contacts":{"maxItems":50000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":400}}},"csv":{"type":"string","maxLength":12000000},"fromNumberId":{"type":"string","maxLength":80},"lawfulBasis":{"default":"contract","type":"string","enum":["contract","consent","lia"]},"schedule":{"default":{"windows":[{"days":[1,2,3,4,5,6],"start":"09:00","end":"19:00"}],"maxConcurrent":3,"perMinute":20},"type":"object","properties":{"windows":{"default":[{"days":[1,2,3,4,5,6],"start":"09:00","end":"19:00"}],"minItems":1,"maxItems":7,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["days","start","end"]}},"maxConcurrent":{"default":3,"type":"integer","minimum":1,"maximum":50},"perMinute":{"default":20,"type":"integer","minimum":1,"maximum":120}},"additionalProperties":false},"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"dailyCap":{"type":"integer","minimum":1,"maximum":50000},"siteId":{"type":"string","maxLength":80},"holdoutPct":{"default":0,"type":"integer","minimum":0,"maximum":20},"activate":{"default":true,"type":"boolean"},"dryRun":{"default":false,"type":"boolean"}},"required":["packageKey","budgetThb"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/package-instances' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"packageKey\":\"string\",\"budgetThb\":\"string\"}'"}]}},"/api/v1/package-instances/{id}":{"get":{"operationId":"getPackageInstancesId","summary":"Instance dashboard: volume, outcomes, success rate, cost per outcome, grades","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/package-instances/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchPackageInstancesId","summary":"Pause / resume / archive / activate an instance or change its budget","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","archive","activate","set_budget"]},"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"},"reason":{"type":"string","maxLength":80}},"required":["action"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/package-instances/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"pause\"}'"}]}},"/api/v1/package-instances/{id}/ab":{"get":{"operationId":"getPackageInstancesIdAb","summary":"A/B comparison of the instance's template versions","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/package-instances/ID/ab' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putPackageInstancesIdAb","summary":"Split an instance's traffic between two published versions","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionB":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"splitPct":{"type":"integer","minimum":0,"maximum":100}},"required":["versionB","splitPct"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/package-instances/ID/ab' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"versionB\":\"string\",\"splitPct\":0}'"}]}},"/api/v1/package-instances/{id}/contacts":{"post":{"operationId":"postPackageInstancesIdContacts","summary":"Add contacts to a running instance (CSV text or rows)","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","maxLength":12000000},"contacts":{"maxItems":50000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":400}}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/package-instances/ID/contacts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/package-instances/{id}/outcomes":{"get":{"operationId":"getPackageInstancesIdOutcomes","summary":"Outcomes of an instance (JSON or CSV)","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"default":"json","type":"string","enum":["json","csv"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/package-instances/ID/outcomes' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/package-instances/{id}/subjects":{"get":{"operationId":"getPackageInstancesIdSubjects","summary":"The contact list of an instance with each contact's status","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"cursor","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/package-instances/ID/subjects' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/package-outcomes/{id}/dispute":{"post":{"operationId":"postPackageOutcomesIdDispute","summary":"Dispute a charged outcome","tags":["packages"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["not_reached","wrong_outcome","duplicate","other"]},"note":{"type":"string","maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"agents:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/package-outcomes/ID/dispute' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"not_reached\"}'"}]}},"/api/v1/packages":{"get":{"operationId":"getPackages","summary":"Outcome package catalogue with prices","tags":["packages"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/packages' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/packages/{key}/addendum":{"post":{"operationId":"postPackagesKeyAddendum","summary":"Accept a package compliance addendum","tags":["packages"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:update","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/packages/KEY/addendum' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/packages/{key}/estimate":{"post":{"operationId":"postPackagesKeyEstimate","summary":"Estimate the cost of a package run","tags":["packages"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"integer","minimum":1,"maximum":50000},"dailyCap":{"type":"integer","minimum":1,"maximum":50000},"budgetThb":{"type":"string","pattern":"^\\d{1,10}(\\.\\d{1,2})?$"}},"required":["contacts","dailyCap"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/packages/KEY/estimate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contacts\":1,\"dailyCap\":1}'"}]}},"/api/v1/packs":{"get":{"operationId":"getPacks","summary":"Prepaid packs and mine","tags":["packs"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/packs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/packs/purchase":{"post":{"operationId":"postPacksPurchase","summary":"Buy a prepaid pack (12 months, price locked at purchase)","tags":["packs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"packCode":{"type":"string","pattern":"^[a-z0-9_]{2,60}$"},"method":{"type":"string","enum":["promptpay","card","truemoney","rabbit_linepay","alipay","wechat","unionpay"]},"savedMethodId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"couponCode":{"type":"string","maxLength":40}},"required":["packCode","method"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/packs/purchase' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"packCode\":\"string\",\"method\":\"promptpay\"}'"}]}},"/api/v1/payments/auto-topup":{"get":{"operationId":"getPaymentsAutoTopup","summary":"Auto top-up settings and suggested defaults","tags":["payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/auto-topup' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putPaymentsAutoTopup","summary":"Save auto top-up (explicit authorisation)","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thresholdAmount":{"type":"string","pattern":"^\\d{1,12}$"},"topupAmount":{"type":"string","pattern":"^\\d{1,12}$"},"monthlyCap":{"type":"string","pattern":"^\\d{1,12}$"},"methodChain":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["thresholdAmount","topupAmount","monthlyCap","methodChain"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:auto_topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/payments/auto-topup' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"thresholdAmount\":\"string\",\"topupAmount\":\"string\",\"monthlyCap\":\"string\",\"methodChain\":[\"string\"]}'"}]}},"/api/v1/payments/auto-topup/allow-more":{"post":{"operationId":"postPaymentsAutoTopupAllowMore","summary":"Allow more auto top-up this month (X-82)","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,12}$"}},"required":["amount"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:auto_topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/auto-topup/allow-more' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\":\"string\"}'"}]}},"/api/v1/payments/auto-topup/status":{"post":{"operationId":"postPaymentsAutoTopupStatus","summary":"Turn auto top-up on, pause or off","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","off","paused"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:auto_topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/auto-topup/status' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"status\":\"active\"}'"}]}},"/api/v1/payments/bank/claims":{"get":{"operationId":"getPaymentsBankClaims","summary":"Transfers offered to me (\"is this your transfer?\")","tags":["payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/bank/claims' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postPaymentsBankClaims","summary":"Claim an unidentified bank transfer","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","minLength":1,"maxLength":64},"bankRef":{"type":"string","minLength":3,"maxLength":80},"amount":{"type":"string","pattern":"^\\d{1,13}$"},"slipFileKey":{"type":"string","maxLength":200}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/bank/claims' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/payments/bank/requests":{"get":{"operationId":"getPaymentsBankRequests","summary":"My bank-transfer payment requests","tags":["payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/bank/requests' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postPaymentsBankRequests","summary":"Create a bank-transfer payment request","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,13}$"},"whtBp":{"type":"integer","minimum":0,"maximum":500}},"required":["amount"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/bank/requests' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\":\"string\"}'"}]}},"/api/v1/payments/bank/requests/{id}":{"delete":{"operationId":"deletePaymentsBankRequestsId","summary":"Cancel an open payment request","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/payments/bank/requests/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"get":{"operationId":"getPaymentsBankRequestsId","summary":"One bank-transfer payment request (status polling)","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/bank/requests/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/payments/bank/requests/{id}/simulate":{"post":{"operationId":"postPaymentsBankRequestsIdSimulate","summary":"Simulate paying my payment request (simulator bank only)","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,13}$"},"payerName":{"type":"string","minLength":2,"maxLength":200},"viaReference":{"default":true,"type":"boolean"}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/bank/requests/ID/simulate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/payments/bank/webhook":{"post":{"operationId":"postPaymentsBankWebhook","summary":"Bank real-time credit notification (HMAC-signed; never credits by itself — matching decides)","tags":["payments"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"webhook","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/bank/webhook'"}]}},"/api/v1/payments/intents":{"get":{"operationId":"getPaymentsIntents","summary":"My payments, newest first","tags":["payments"],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/intents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postPaymentsIntents","summary":"Create a payment (top-up) intent","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,12}$"},"method":{"type":"string","enum":["promptpay","card","truemoney","rabbit_linepay","alipay","wechat","unionpay"]},"savedMethodId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"cardToken":{"anyOf":[{"type":"string","pattern":"^tokn_[A-Za-z0-9_]{4,64}$"},{"type":"null"}]},"saveCard":{"type":"boolean"},"quoteId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"scenario":{"anyOf":[{"type":"string","enum":["success","expire","late_pay","decline","challenge_3ds","disconnect"]},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^\\+?\\d{8,15}$"},{"type":"null"}]},"whtBp":{"type":"number","const":300}},"required":["amount","method"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/intents' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\":\"string\",\"method\":\"promptpay\"}'"}]}},"/api/v1/payments/intents/{id}":{"get":{"operationId":"getPaymentsIntentsId","summary":"One payment (re-checks the gateway while unpaid)","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/intents/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/payments/intents/{id}/cancel":{"post":{"operationId":"postPaymentsIntentsIdCancel","summary":"Cancel an unpaid payment","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/intents/ID/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/payments/methods":{"get":{"operationId":"getPaymentsMethods","summary":"Payment methods, saved cards and presets","tags":["payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/methods' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/payments/methods/{id}":{"delete":{"operationId":"deletePaymentsMethodsId","summary":"Remove a saved payment method","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/payments/methods/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/payments/methods/{id}/default":{"post":{"operationId":"postPaymentsMethodsIdDefault","summary":"Make a saved method the default","tags":["payments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/methods/ID/default' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/payments/mock/{id}":{"get":{"operationId":"getPaymentsMockId","summary":"Simulated gateway: charge shown on the hosted pay page","tags":["payments-simulator"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/mock/ID'"}]}},"/api/v1/payments/mock/{id}/pay":{"post":{"operationId":"postPaymentsMockIdPay","summary":"Simulated gateway: customer action on the hosted page","tags":["payments-simulator"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pay","approve_3ds","decline","expire"]},"card":{"type":"object","properties":{"number":{"type":"string","minLength":12,"maxLength":23},"expMonth":{"type":"integer","minimum":1,"maximum":12},"expYear":{"type":"integer","minimum":2000,"maximum":2100},"cvc":{"type":"string","minLength":3,"maxLength":4}},"required":["number","expMonth","expYear","cvc"],"additionalProperties":false}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/mock/ID/pay' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"pay\"}'"}]}},"/api/v1/payments/quotes/fx":{"post":{"operationId":"postPaymentsQuotesFx","summary":"Gateway CNY quote for a top-up","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,12}$"},"method":{"type":"string","enum":["alipay","wechat","unionpay"]}},"required":["amount","method"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/quotes/fx' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"amount\":\"string\",\"method\":\"alipay\"}'"}]}},"/api/v1/payments/refunds":{"get":{"operationId":"getPaymentsRefunds","summary":"My refunds","tags":["payments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/payments/refunds' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postPaymentsRefunds","summary":"Request a refund of unused credit","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intentId":{"type":"string","minLength":1,"maxLength":64},"amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,12}$"},{"type":"null"}]},"reason":{"type":"string","maxLength":300}},"required":["intentId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"refunds:request","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/refunds' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"intentId\":\"string\"}'"}]}},"/api/v1/payments/refunds/preview":{"post":{"operationId":"postPaymentsRefundsPreview","summary":"Preview a refund (amount, fee, net)","tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intentId":{"type":"string","minLength":1,"maxLength":64},"amount":{"anyOf":[{"type":"string","pattern":"^\\d{1,12}$"},{"type":"null"}]}},"required":["intentId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"refunds:request","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/refunds/preview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"intentId\":\"string\"}'"}]}},"/api/v1/payments/webhooks/{gateway}":{"post":{"operationId":"postPaymentsWebhooksGateway","summary":"Payment gateway callback (signature + re-fetch verified; never moves a balance by itself)","tags":["payments"],"parameters":[{"name":"gateway","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"webhook","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/payments/webhooks/GATEWAY'"}]}},"/api/v1/plans":{"get":{"operationId":"getPlans","summary":"Plans with limits and prices for a customer kind","tags":["pricing"],"parameters":[{"name":"customer","in":"query","required":false,"schema":{"default":"personal","type":"string","enum":["personal","business_non_vat","business_vat"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/plans'"}]}},"/api/v1/postman.json":{"get":{"operationId":"getPostmanJson","summary":"Postman / Insomnia collection (generated from the route registry)","tags":["developers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/postman.json'"}]}},"/api/v1/pricing":{"get":{"operationId":"getPricing","summary":"Public price list, plans, packs and bonus tiers","tags":["pricing"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/pricing'"}]}},"/api/v1/pricing/estimate":{"post":{"operationId":"postPricingEstimate","summary":"Price a basket (calculator)","tags":["pricing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"default":"personal","type":"string","enum":["personal","business_non_vat","business_vat"]},"items":{"minItems":1,"maxItems":30,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"usage"},"product":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"units":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","pattern":"^\\d{1,10}$"}]},"destination":{"type":"string","pattern":"^\\+?[0-9]{0,15}$"}},"required":["kind","product","units"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan"},"planCode":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"period":{"type":"string","enum":["month","year"]}},"required":["kind","planCode","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pack"},"packCode":{"type":"string","pattern":"^[a-z0-9_]{2,60}$"},"qty":{"default":1,"type":"integer","minimum":1,"maximum":10}},"required":["kind","packCode"],"additionalProperties":false}]}},"couponCode":{"type":"string","maxLength":40}},"required":["items"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/pricing/estimate' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"items\":[{\"kind\":\"usage\",\"product\":\"string\",\"units\":-9007199254740991}]}'"}]}},"/api/v1/pricing/quote":{"post":{"operationId":"postPricingQuote","summary":"Signed 15-minute quote","tags":["pricing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"default":"personal","type":"string","enum":["personal","business_non_vat","business_vat"]},"items":{"minItems":1,"maxItems":30,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"usage"},"product":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"units":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","pattern":"^\\d{1,10}$"}]},"destination":{"type":"string","pattern":"^\\+?[0-9]{0,15}$"}},"required":["kind","product","units"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"plan"},"planCode":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"period":{"type":"string","enum":["month","year"]}},"required":["kind","planCode","period"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pack"},"packCode":{"type":"string","pattern":"^[a-z0-9_]{2,60}$"},"qty":{"default":1,"type":"integer","minimum":1,"maximum":10}},"required":["kind","packCode"],"additionalProperties":false}]}},"couponCode":{"type":"string","maxLength":40}},"required":["items"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/pricing/quote' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"items\":[{\"kind\":\"usage\",\"product\":\"string\",\"units\":-9007199254740991}]}'"}]}},"/api/v1/referral":{"get":{"operationId":"getReferral","summary":"My referral code, referred accounts and commissions","tags":["referral"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/referral' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/referral/payout":{"post":{"operationId":"postReferralPayout","summary":"Request a commission payout","tags":["referral"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bank":{"type":"object","properties":{"bankName":{"type":"string","minLength":2,"maxLength":60},"accountName":{"type":"string","minLength":2,"maxLength":100},"accountNo":{"type":"string","pattern":"^\\d{8,16}$"}},"required":["bankName","accountName","accountNo"],"additionalProperties":false}},"required":["bank"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"notifications:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/referral/payout' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"bank\":{\"bankName\":\"string\",\"accountName\":\"string\",\"accountNo\":\"string\"}}'"}]}},"/api/v1/resources/{id}":{"get":{"operationId":"getResourcesId","summary":"One resource","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/resources/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchResourcesId","summary":"Change hours, capacity, services or deactivate a resource","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["staff","room","chair","vehicle","table"]},"capacity":{"type":"integer","minimum":1,"maximum":500},"slotMinutes":{"type":"integer","minimum":5,"maximum":480},"hours":{"anyOf":[{"type":"object","properties":{"weekly":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"breaks":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["start","end"],"additionalProperties":false}}},"required":["days","start","end"],"additionalProperties":false}},"closed":{"default":[],"maxItems":400,"type":"array","items":{"type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])$"}},"closeOnHolidays":{"default":true,"type":"boolean"}},"required":["weekly"],"additionalProperties":false},{"maxItems":14,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"breaks":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["start","end"],"additionalProperties":false}}},"required":["days","start","end"],"additionalProperties":false}}]},"services":{"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"active":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/resources/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/risk/appeals":{"get":{"operationId":"getRiskAppeals","summary":"Paused capabilities and my appeals","tags":["risk"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/risk/appeals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postRiskAppeals","summary":"Appeal a risk decision","tags":["risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":3,"maxLength":2000},"riskId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"breakerId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["note"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"limits:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/risk/appeals' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"note\":\"string\"}'"}]}},"/api/v1/risk/appeals/unlock-link":{"post":{"operationId":"postRiskAppealsUnlockLink","summary":"New unlock link for a paused capability","tags":["risk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"breakerId":{"type":"string","minLength":1,"maxLength":80}},"required":["breakerId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"limits:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/risk/appeals/unlock-link' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"breakerId\":\"string\"}'"}]}},"/api/v1/risk/unlock/{token}":{"get":{"operationId":"getRiskUnlockToken","summary":"What the unlock link is for and how it can be completed","tags":["risk"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/risk/unlock/TOKEN'"}]},"post":{"operationId":"postRiskUnlockToken","summary":"Complete the one-step self unlock","tags":["risk"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"method":{"type":"string","const":"callback_otp"},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["method","code"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"selfie"},"idNumber":{"type":"string","minLength":10,"maxLength":20},"fullName":{"type":"string","minLength":2,"maxLength":160},"front":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"selfie":{"type":"string","minLength":8,"maxLength":8500000,"pattern":"^[A-Za-z0-9+/_=-]+$"},"scenario":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]}},"required":["method","idNumber","fullName","front","selfie"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"forecast"},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"product":{"type":"string","enum":["sms","voice","ai"]},"volume":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}$"},{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}]},"note":{"type":"string","maxLength":500}},"required":["method","startsAt","endsAt","product","volume"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/risk/unlock/TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"method\":\"callback_otp\",\"code\":\"123456\"}'"}]}},"/api/v1/risk/unlock/{token}/otp":{"post":{"operationId":"postRiskUnlockTokenOtp","summary":"Send the unlock code to the verified phone on file","tags":["risk"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/risk/unlock/TOKEN/otp'"}]}},"/api/v1/screen-pop":{"get":{"operationId":"getScreenPop","summary":"Active inbound calls for the screen-pop","tags":["calls"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"calls:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/screen-pop' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/senders":{"get":{"operationId":"getSenders","summary":"Sender IDs of the account","tags":["senders"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/senders' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postSenders","summary":"Request a sender ID (reviewed by the platform)","tags":["senders"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":11},"category":{"type":"string","enum":["otp","transactional","marketing"]},"urls":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":300,"format":"uri"}}},"required":["value","category"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/senders' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"value\":\"ACME\",\"category\":\"transactional\"}'"}]}},"/api/v1/sign/{token}":{"get":{"operationId":"getSignToken","summary":"What a signer sees on the signing page","tags":["signing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sign/TOKEN'"}]}},"/api/v1/sign/{token}/decline":{"post":{"operationId":"postSignTokenDecline","summary":"Decline to sign","tags":["signing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":300}},"required":["reason"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/sign/TOKEN/decline' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"reason\":\"string\"}'"}]}},"/api/v1/sign/{token}/otp":{"post":{"operationId":"postSignTokenOtp","summary":"Send the signing confirmation code","tags":["signing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/sign/TOKEN/otp'"}]}},"/api/v1/sign/{token}/pdf":{"get":{"operationId":"getSignTokenPdf","summary":"The PDF being signed","tags":["signing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sign/TOKEN/pdf'"}]}},"/api/v1/sign/{token}/sign":{"post":{"operationId":"postSignTokenSign","summary":"Sign with a typed or drawn name and the confirmation code","tags":["signing"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","enum":["typed","drawn"]},"typedName":{"type":"string","minLength":2,"maxLength":120},"drawnPng":{"type":"string","maxLength":400000},"otp":{"type":"string","pattern":"^\\d{6}$"},"consent":{"type":"boolean","const":true}},"required":["method","otp","consent"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/sign/TOKEN/sign' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"method\":\"typed\",\"otp\":\"string\",\"consent\":true}'"}]}},"/api/v1/sites":{"get":{"operationId":"getSites","summary":"Sites / branches of this account","tags":["appointments"],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sites' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSites","summary":"Add a site / branch","tags":["appointments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9_-]{0,19}$"},"name":{"type":"string","minLength":1,"maxLength":120},"address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^[+\\d][\\d\\s\\-()]{5,24}$"},{"type":"null"}]},"timezone":{"default":"Asia/Bangkok","type":"string"},"costCentre":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["code","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/sites' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\",\"name\":\"My key\"}'"}]}},"/api/v1/sites/{id}":{"get":{"operationId":"getSitesId","summary":"One site","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sites/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchSitesId","summary":"Edit or deactivate a site","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^[+\\d][\\d\\s\\-()]{5,24}$"},{"type":"null"}]},"timezone":{"type":"string"},"costCentre":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"active":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/sites/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/sites/{id}/resources":{"get":{"operationId":"getSitesIdResources","summary":"Resources (tables, technicians, rooms…) of a site","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sites/ID/resources' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSitesIdResources","summary":"Add a resource with opening hours to a site","tags":["appointments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"default":"staff","type":"string","enum":["staff","room","chair","vehicle","table"]},"capacity":{"default":1,"type":"integer","minimum":1,"maximum":500},"slotMinutes":{"default":30,"type":"integer","minimum":5,"maximum":480},"hours":{"anyOf":[{"type":"object","properties":{"weekly":{"maxItems":14,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"breaks":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["start","end"],"additionalProperties":false}}},"required":["days","start","end"],"additionalProperties":false}},"closed":{"default":[],"maxItems":400,"type":"array","items":{"type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])$"}},"closeOnHolidays":{"default":true,"type":"boolean"}},"required":["weekly"],"additionalProperties":false},{"maxItems":14,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"breaks":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"}},"required":["start","end"],"additionalProperties":false}}},"required":["days","start","end"],"additionalProperties":false}}]},"services":{"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"required":["name","hours"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/sites/ID/resources' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\",\"hours\":{\"weekly\":[{\"days\":[1],\"start\":\"string\",\"end\":\"string\"}]}}'"}]}},"/api/v1/sites/billing-split":{"get":{"operationId":"getSitesBillingSplit","summary":"Per-site billing split (JSON, or CSV for the accountant)","tags":["appointments"],"parameters":[{"name":"from","in":"query","required":true,"schema":{}},{"name":"to","in":"query","required":true,"schema":{}},{"name":"format","in":"query","required":false,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"exports:create","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sites/billing-split' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/sites/overview":{"get":{"operationId":"getSitesOverview","summary":"Head-office overview across sites (today, utilisation, next free slot)","tags":["appointments"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sites/overview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/slots":{"get":{"operationId":"getSlots","summary":"Free slots (or all slots with all=1) for a window of at most 60 days","tags":["appointments"],"parameters":[{"name":"site_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"resource_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"service","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"from","in":"query","required":false,"schema":{}},{"name":"to","in":"query","required":false,"schema":{}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":2000}},{"name":"all","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/slots' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSlots","summary":"Block / unblock slots (maintenance) or change one slot capacity","tags":["appointments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"action":{"type":"string","const":"capacity"},"slotId":{"type":"string","minLength":1,"maxLength":80},"capacity":{"type":"integer","minimum":1,"maximum":500}},"required":["action","slotId","capacity"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["block","unblock"]},"slotIds":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1}},"reason":{"type":"string","maxLength":200}},"required":["action","slotIds"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["block","unblock"]},"resourceId":{"type":"string","minLength":1},"from":{},"to":{},"reason":{"type":"string","maxLength":200}},"required":["action","resourceId","from","to"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"appointments:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/slots' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"capacity\",\"slotId\":\"string\",\"capacity\":1}'"}]}},"/api/v1/sms/analytics":{"get":{"operationId":"getSmsAnalytics","summary":"Delivery rate and latency by carrier, category and hour (missing receipts count as unknown)","tags":["messages"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"sms:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/sms/analytics' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/status":{"get":{"operationId":"getStatus","summary":"Public status page snapshot","tags":["trust"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/status'"}]}},"/api/v1/subscriptions":{"get":{"operationId":"getSubscriptions","summary":"My subscription, plan limits and upgrade prompts","tags":["subscriptions"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/subscriptions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSubscriptions","summary":"Subscribe to a plan","tags":["subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planCode":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"period":{"type":"string","enum":["month","year"]},"method":{"type":"string","enum":["promptpay","card","truemoney","rabbit_linepay","alipay","wechat","unionpay"]},"savedMethodId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"couponCode":{"type":"string","maxLength":40},"acceptRenewalTerms":{"type":"boolean"},"saveCard":{"type":"boolean"},"quote":{"type":"string","maxLength":200}},"required":["planCode","period","method","acceptRenewalTerms"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/subscriptions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"planCode\":\"string\",\"period\":\"month\",\"method\":\"promptpay\",\"acceptRenewalTerms\":false}'"}]}},"/api/v1/subscriptions/cancel":{"post":{"operationId":"postSubscriptionsCancel","summary":"Cancel the subscription","tags":["subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"default":"period_end","type":"string","enum":["period_end","now_refund"]},"reason":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/subscriptions/cancel' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/subscriptions/change":{"delete":{"operationId":"deleteSubscriptionsChange","summary":"Withdraw the scheduled change","tags":["subscriptions"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/subscriptions/change' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSubscriptionsChange","summary":"Schedule a downgrade for the next cycle","tags":["subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planCode":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"period":{"type":"string","enum":["month","year"]}},"required":["planCode"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/subscriptions/change' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"planCode\":\"string\"}'"}]}},"/api/v1/subscriptions/charges":{"get":{"operationId":"getSubscriptionsCharges","summary":"Subscription charges (receipts)","tags":["subscriptions"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/subscriptions/charges' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/subscriptions/upgrade":{"post":{"operationId":"postSubscriptionsUpgrade","summary":"Upgrade the plan (pro-rated)","tags":["subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planCode":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"method":{"type":"string","enum":["promptpay","card","truemoney","rabbit_linepay","alipay","wechat","unionpay"]},"savedMethodId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["planCode","method"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/subscriptions/upgrade' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"planCode\":\"string\",\"method\":\"promptpay\"}'"}]}},"/api/v1/subscriptions/upgrade/preview":{"get":{"operationId":"getSubscriptionsUpgradePreview","summary":"What an upgrade costs today (pro-rated, VAT shown)","tags":["subscriptions"],"parameters":[{"name":"planCode","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/subscriptions/upgrade/preview' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/support/chat":{"get":{"operationId":"getSupportChat","summary":"Web chat messages after a cursor","tags":["support"],"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/support/chat' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSupportChat","summary":"Send a web chat message (a help request opens a ticket)","tags":["support"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/support/chat' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/support/info":{"get":{"operationId":"getSupportInfo","summary":"Support hours, availability and LINE link status","tags":["support"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/support/info' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/support/tickets":{"get":{"operationId":"getSupportTickets","summary":"My support tickets (owners and admins see the whole account)","tags":["support"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/support/tickets' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postSupportTickets","summary":"Ask for help (opens a ticket; optionally about a call)","tags":["support"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","maxLength":5000},"category":{"default":"general","type":"string","enum":["general","billing","tech","complaint","fraud_report"]},"callId":{"type":"string","minLength":1,"maxLength":60}},"required":["subject"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/support/tickets' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"subject\":\"string\"}'"}]}},"/api/v1/support/tickets/{id}":{"get":{"operationId":"getSupportTicketsId","summary":"One of my tickets with its public conversation (internal notes are never included)","tags":["support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/support/tickets/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/support/tickets/{id}/csat":{"post":{"operationId":"postSupportTicketsIdCsat","summary":"Rate a resolved ticket (1-5)","tags":["support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":1000}},"required":["score"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/support/tickets/ID/csat' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"score\":1}'"}]}},"/api/v1/support/tickets/{id}/messages":{"post":{"operationId":"postSupportTicketsIdMessages","summary":"Reply on my ticket","tags":["support"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/support/tickets/ID/messages' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"body\":\"Your order has shipped\"}'"}]}},"/api/v1/task-rotas":{"get":{"operationId":"getTaskRotas","summary":"Rotas used when a task has no assignee","tags":["tasks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/task-rotas' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putTaskRotas","summary":"Set the rota of a role (members only)","tags":["tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","finance","hr","staff"]},"userIds":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":64}}},"required":["role","userIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"members:update_role","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/task-rotas' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"role\":\"owner\",\"userIds\":[\"string\"]}'"}]}},"/api/v1/tasks":{"get":{"operationId":"getTasks","summary":"My tasks (state machine, newest first)","tags":["tasks"],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["draft","planned","awaiting_approval","running","waiting_external","waiting_payment","completed","failed","cancelled","paused"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","maxLength":30}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tasks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postTasks","summary":"Create a task from steps (idempotent with Idempotency-Key)","tags":["tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"type":"string","minLength":1,"maxLength":120},"steps":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["notify","send_sms","place_call","wait","human"]},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"maxAttempts":{"type":"integer","minimum":1,"maximum":5}},"required":["kind"],"additionalProperties":false}},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"budget_cap_satang":{"type":"string","pattern":"^\\d{1,13}$"},"approval":{"type":"object","properties":{"required":{"type":"boolean"},"role":{"type":"string","enum":["owner","admin"]},"over_satang":{"type":"string","pattern":"^\\d{1,13}$"},"four_eyes":{"type":"boolean"}},"required":["required"],"additionalProperties":false},"failure_strategy":{"type":"string","enum":["retry","fallback","escalate_human","abort"]},"scheduled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"due_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"assignee_role":{"type":"string","enum":["owner","admin","finance","hr","staff"]}},"required":["intent","steps"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tasks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"intent\":\"string\",\"steps\":[{\"kind\":\"notify\"}]}'"}]}},"/api/v1/tasks/{id}":{"get":{"operationId":"getTasksId","summary":"One task with steps, event log and approvals","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tasks/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/tasks/{id}/actions":{"post":{"operationId":"postTasksIdActions","summary":"Pause / resume / cancel / retry / approve / reject / complete (the person’s step) a task","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","cancel","retry","approve","reject","complete"]},"note":{"type":"string","maxLength":300}},"required":["action"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tasks/ID/actions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"pause\"}'"}]}},"/api/v1/tasks/{id}/payment":{"get":{"operationId":"getTasksIdPayment","summary":"Payment state of a task in waiting_payment (paid → it continues by itself)","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tasks:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tasks/ID/payment' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postTasksIdPayment","summary":"Open the inline top-up for the missing amount of a waiting_payment task (ACC-B5)","tags":["tasks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"default":"promptpay","type":"string","enum":["promptpay","card","truemoney","rabbit_linepay","alipay","wechat"]},"saved_method_id":{"type":"string","maxLength":60}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:topup","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tasks/ID/payment' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/tax-docs":{"get":{"operationId":"getTaxDocs","summary":"Tax documents of this account","tags":["tax-documents"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"type","in":"query","required":false,"schema":{"type":"string","maxLength":4}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tax-docs' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/tax-docs/{id}":{"get":{"operationId":"getTaxDocsId","summary":"One tax document with its lines and credit notes","tags":["tax-documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tax-docs/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/tax-docs/{id}/file":{"get":{"operationId":"getTaxDocsIdFile","summary":"Download a tax document (pdf or xml)","tags":["tax-documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"default":"pdf","type":"string","enum":["pdf","xml"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tax-docs/ID/file' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/tax-docs/bundle":{"get":{"operationId":"getTaxDocsBundle","summary":"Merged PDF or accountant zip of one payment","tags":["tax-documents"],"parameters":[{"name":"refType","in":"query","required":false,"schema":{"default":"payment_intent","type":"string","enum":["payment_intent","refund","chargeback","refund_fee"]}},{"name":"refId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"format","in":"query","required":false,"schema":{"default":"pdf","type":"string","enum":["pdf","zip"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tax-docs/bundle' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/tax-docs/link":{"post":{"operationId":"postTaxDocsLink","summary":"Create an expiring download link","tags":["tax-documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["tax","bundle","bundle_zip","doc","wht"]},"id":{"type":"string","minLength":1,"maxLength":64},"format":{"default":"pdf","type":"string","enum":["pdf","xml","file"]},"ttlSec":{"type":"integer","minimum":30,"maximum":3600}},"required":["kind","id"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tax-docs/link' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"tax\",\"id\":\"string\"}'"}]}},"/api/v1/tax-profile":{"get":{"operationId":"getTaxProfile","summary":"Tax profile used on tax documents","tags":["tax-documents"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tax-profile' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"put":{"operationId":"putTaxProfile","summary":"Save the tax profile (affects future documents)","tags":["tax-documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["individual","juristic"]},"country":{"default":"TH","type":"string","minLength":2,"maxLength":2},"legalName":{"type":"string","minLength":2,"maxLength":200},"legalNameEn":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"taxId":{"type":["string","null"]},"branchCode":{"default":"00000","type":"string"},"address":{"type":"string","minLength":5,"maxLength":400},"postalCode":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"vatRegistered":{"default":false,"type":"boolean"}},"required":["kind","legalName","address"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://nexora-ai-call.com/api/v1/tax-profile' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"kind\":\"individual\",\"legalName\":\"string\",\"address\":\"string\"}'"}]}},"/api/v1/tax-profile/lookup":{"post":{"operationId":"postTaxProfileLookup","summary":"Autofill the tax profile from a 13-digit tax ID","tags":["tax-documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"taxId":{"type":"string","minLength":10,"maxLength":20}},"required":["taxId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tax-profile/lookup' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"taxId\":\"string\"}'"}]}},"/api/v1/tenants":{"get":{"operationId":"getTenants","summary":"My accounts (tenants) with role, balance and member counts","tags":["tenants"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tenants' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postTenants","summary":"Create an enterprise account (I become owner)","tags":["tenants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"legalName":{"type":"string","minLength":1,"maxLength":200},"taxId":{"type":"string","pattern":"^\\d{13}$"},"accept":{"default":false,"type":"boolean"}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tenants' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"My key\"}'"}]}},"/api/v1/tenants/current":{"get":{"operationId":"getTenantsCurrent","summary":"The active account","tags":["tenants"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/tenants/current' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchTenantsCurrent","summary":"Update the active account profile","tags":["tenants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"legalName":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","pattern":"^\\d{13}$"},{"type":"null"}]},"branchCode":{"type":"string","pattern":"^\\d{5}$"},"defaultLocale":{"type":"string","enum":["zh","th","en"]},"address":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"district":{"type":"string","maxLength":100},"province":{"type":"string","maxLength":100},"postcode":{"type":"string","maxLength":10}},"required":["line1"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:update","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/tenants/current' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/tenants/switch":{"post":{"operationId":"postTenantsSwitch","summary":"Switch the active account","tags":["tenants"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","minLength":1,"maxLength":64}},"required":["tenantId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/tenants/switch' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"tenantId\":\"string\"}'"}]}},"/api/v1/trial/claim":{"post":{"operationId":"postTrialClaim","summary":"Claim the free trial credit","tags":["trial"],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/trial/claim' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/trust":{"get":{"operationId":"getTrust","summary":"Trust centre: operator facts, authorization status, transparency counts","tags":["trust"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/trust'"}]}},"/api/v1/upgrade/offer":{"get":{"operationId":"getUpgradeOffer","summary":"Inline upgrade offer for a limit","tags":["subscriptions"],"parameters":[{"name":"metric","in":"query","required":true,"schema":{"type":"string","enum":["concurrentCalls","dailyCalls","contacts","kbMb","seats"]}},{"name":"current","in":"query","required":true,"schema":{"type":"integer","minimum":0,"maximum":1000000000}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/upgrade/offer' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/upgrade/prompts":{"get":{"operationId":"getUpgradePrompts","summary":"Open upgrade banners","tags":["subscriptions"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/upgrade/prompts' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/upgrade/prompts/{id}":{"delete":{"operationId":"deleteUpgradePromptsId","summary":"Dismiss an upgrade banner","tags":["subscriptions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/upgrade/prompts/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/verification-checks":{"post":{"operationId":"postVerificationChecks","summary":"Check a code entered by the end user","tags":["verify"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verification_id":{"type":"string","minLength":3,"maxLength":80},"to":{"type":"string","minLength":8,"maxLength":20},"code":{"type":"string","pattern":"^\\d{4,8}$"}},"required":["code"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"verify:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/verification-checks' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"code\":\"123456\"}'"}]}},"/api/v1/verifications":{"get":{"operationId":"getVerifications","summary":"Recent verifications (no codes)","tags":["verify"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/verifications' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"post":{"operationId":"postVerifications","summary":"Send a verification code (SMS, with optional LINE / voice fallback)","description":"Generates and stores only a hash of the code, enforces resend interval, per-number limits and pumping protection. Sandbox magic numbers: +66000000001 approves with code 123456, +66000000002 never accepts the code, +66000000003 expires at once.","tags":["verify"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":8,"maxLength":20},"channel":{"default":"sms","type":"string","enum":["sms","line","voice"]},"fallback":{"maxItems":2,"type":"array","items":{"type":"string","enum":["sms","line","voice"]}},"locale":{"type":"string","enum":["zh","th","en"]},"brand":{"type":"string","minLength":1,"maxLength":20},"code_length":{"type":"integer","minimum":4,"maximum":8},"expiry_sec":{"type":"integer","minimum":60,"maximum":900},"client_ref":{"type":"string","maxLength":64}},"required":["to"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"verify:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/verifications' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY' \\\n  -H 'Idempotency-Key: 6f1c2d54-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"to\":\"+66000000001\"}'"}]}},"/api/v1/verifications/{id}":{"delete":{"operationId":"deleteVerificationsId","summary":"Cancel a pending verification","tags":["verify"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"verify:send","x-required-permission":"sms:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/verifications/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]},"get":{"operationId":"getVerificationsId","summary":"Fetch one verification (another account's id answers 404)","tags":["verify"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearerAuth":[]},{"hmacAuth":[],"hmacTimestamp":[],"hmacSignature":[]}],"x-auth":"apikey","x-required-scope":"read:logs","x-required-permission":"sms:read","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/verifications/ID' \\\n  -H 'Authorization: Bearer sv_test_YOUR_KEY'"}]}},"/api/v1/waitlist":{"delete":{"operationId":"deleteWaitlist","summary":"Withdraw from the waitlist (contact is erased)","tags":["trust"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"string","minLength":3,"maxLength":120}},"required":["contact"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/waitlist' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contact\":\"string\"}'"}]},"post":{"operationId":"postWaitlist","summary":"Join the invitation waitlist (LINE ID or e-mail)","tags":["trust"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"string","minLength":3,"maxLength":120},"scenario":{"type":"string","enum":["booking","parcel","repair","hotel","sms","other"]},"volumeBand":{"type":"string","enum":["lt_1k","1k_10k","10k_100k","gt_100k"]},"locale":{"default":"th","type":"string","enum":["th","zh","en","ja","ko"]}},"required":["contact"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-auth":"public","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/waitlist' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contact\":\"string\"}'"}]}},"/api/v1/wallet":{"get":{"operationId":"getWallet","summary":"Wallet balance and status","tags":["wallet"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/wallet' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/wallet/transactions":{"get":{"operationId":"getWalletTransactions","summary":"Wallet movements, newest first","tags":["wallet"],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"wallet:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/wallet/transactions' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/webhooks":{"get":{"operationId":"getWebhooks","summary":"Webhook endpoints of the account","tags":["webhooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/webhooks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"post":{"operationId":"postWebhooks","summary":"Register a webhook endpoint (https only; private / loopback / metadata addresses are refused). The signing secret is shown once.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":500,"format":"uri"},"events":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string"}},"description":{"type":"string","maxLength":120}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/webhooks' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"url\":\"https://example.com/webhooks/siamvoice\",\"events\":[\"string\"]}'"}]}},"/api/v1/webhooks/{id}":{"delete":{"operationId":"deleteWebhooksId","summary":"Delete an endpoint","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://nexora-ai-call.com/api/v1/webhooks/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]},"patch":{"operationId":"patchWebhooksId","summary":"Change URL, events, description or enable / disable an endpoint","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":500,"format":"uri"},"events":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled"]},"description":{"type":"string","maxLength":120}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://nexora-ai-call.com/api/v1/webhooks/ID' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"}]}},"/api/v1/webhooks/{id}/rotate":{"post":{"operationId":"postWebhooksIdRotate","summary":"Rotate the signing secret (the old one stays valid for 24 h)","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/webhooks/ID/rotate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/webhooks/{id}/test":{"post":{"operationId":"postWebhooksIdTest","summary":"Send a signed test event to the endpoint now","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/webhooks/ID/test' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/webhooks/deliveries":{"get":{"operationId":"getWebhooksDeliveries","summary":"Delivery log (30 days): status, attempts, response code, duration","tags":["webhooks"],"parameters":[{"name":"webhook_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","delivered","failed","dead"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/webhooks/deliveries' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/webhooks/deliveries/{id}/replay":{"post":{"operationId":"postWebhooksDeliveriesIdReplay","summary":"Re-send a delivery (a new, separately logged attempt of the same event)","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/webhooks/deliveries/ID/replay' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/webhooks/events":{"get":{"operationId":"getWebhooksEvents","summary":"Event catalogue with sample payloads","tags":["webhooks"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"webhooks:manage","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/webhooks/events' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/wht":{"get":{"operationId":"getWht","summary":"Withholding tax records and eligibility","tags":["tax-documents"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/wht' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/api/v1/wht/{id}/certificate":{"post":{"operationId":"postWhtIdCertificate","summary":"Upload a 50 Tawi (WHT certificate) certificate","tags":["tax-documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":120},"contentBase64":{"type":"string","minLength":20,"maxLength":7200000},"fields":{"type":"object","properties":{"certificateNo":{"type":"string","minLength":1,"maxLength":40},"paymentDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"paidAmount":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},"withheldAmount":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$"},"payerTaxId":{"type":"string"}},"required":["certificateNo","paymentDate","paidAmount","withheldAmount"]}},"required":["fileName","contentBase64","fields"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"tenant:billing_profile","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/api/v1/wht/ID/certificate' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"fileName\":\"string\",\"contentBase64\":\"string\",\"fields\":{\"certificateNo\":\"string\",\"paymentDate\":\"string\",\"paidAmount\":\"string\",\"withheldAmount\":\"string\"}}'"}]}},"/api/v1/wht/certificates/{id}/file":{"get":{"operationId":"getWhtCertificatesIdFile","summary":"Download an uploaded 50 Tawi (WHT certificate)","tags":["tax-documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"cookieAuth":[]}],"x-auth":"session","x-required-permission":"invoices:read","x-sandbox":false,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/api/v1/wht/certificates/ID/file' \\\n  -H 'Cookie: sv_session=YOUR_SESSION' -H 'Origin: https://nexora-ai-call.com'"}]}},"/compat/thaibulksms/credit":{"get":{"operationId":"getCompatThaibulksmsCredit","summary":"ThaiBulkSMS-style: remaining credit","tags":["compat"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"read:balance","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://nexora-ai-call.com/compat/thaibulksms/credit' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'msisdn=+66000000001' \\\n  --data-urlencode 'message=Hello' \\\n  --data-urlencode 'sender=ACME'"}]}},"/compat/thaibulksms/sms":{"post":{"operationId":"postCompatThaibulksmsSms","summary":"ThaiBulkSMS-style: send (msisdn, message, sender, force, scheduled_delivery)","tags":["compat"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Safe retries: the same key + same body replays the first response; a different body answers 409 IDEMPOTENCY_CONFLICT."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"description":"Rate limited (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"basicAuth":[]}],"x-auth":"apikey","x-required-scope":"messages:send","x-sandbox":true,"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://nexora-ai-call.com/compat/thaibulksms/sms' \\\n  -u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \\\n  --data-urlencode 'msisdn=+66000000001' \\\n  --data-urlencode 'message=Hello' \\\n  --data-urlencode 'sender=ACME'"}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Authorization: Bearer sv_live_… or sv_test_…"},"basicAuth":{"type":"http","scheme":"basic","description":"Compatibility layer: username = account SID or key id, password = API key"},"hmacAuth":{"type":"apiKey","in":"header","name":"X-SV-Key","description":"Key id; with X-SV-Timestamp and X-SV-Signature = hex(HMAC_SHA256(hmac_secret, timestamp\\nMETHOD\\npath+query\\nsha256(body)))"},"hmacTimestamp":{"type":"apiKey","in":"header","name":"X-SV-Timestamp"},"hmacSignature":{"type":"apiKey","in":"header","name":"X-SV-Signature"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"sv_session","description":"Dashboard session (browser); not for server-to-server use"}},"schemas":{"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable string code (switch on this)"},"numeric":{"type":"integer","description":"Public numeric code (Twilio-style where one exists)"},"message":{"type":"string"},"details":{},"trace_id":{"type":"string","description":"Look it up in the developer console"},"requestId":{"type":"string"},"fix_url":{"type":"string","format":"uri","description":"One-click fix (top up, verify, raise limit …)"},"permanent":{"type":"boolean","description":"Retrying the same request cannot succeed"}}}}}},"responses":{"Error":{"description":"Error (unified envelope)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"x-error-codes":[{"code":"VALIDATION_ERROR","numeric":20001,"http":400,"permanent":true,"message":"The request is invalid."},{"code":"UNAUTHENTICATED","numeric":20003,"http":401,"permanent":true,"message":"Authentication is required."},{"code":"FORBIDDEN","numeric":20004,"http":403,"permanent":true,"message":"You do not have permission for this action."},{"code":"TENANT_FORBIDDEN","numeric":20005,"http":403,"permanent":true,"message":"This resource belongs to another account."},{"code":"ORIGIN_MISMATCH","numeric":20006,"http":403,"permanent":true,"message":"Request origin is not allowed."},{"code":"NOT_FOUND","numeric":20404,"http":404,"permanent":true,"message":"The resource was not found."},{"code":"CONFLICT","numeric":20409,"http":409,"permanent":false,"message":"The resource already exists or conflicts."},{"code":"INVALID_STATE","numeric":20410,"http":409,"permanent":false,"message":"The resource is not in a state that allows this action."},{"code":"UNSUPPORTED","numeric":20501,"http":501,"permanent":true,"message":"This operation is not supported."},{"code":"RATE_LIMITED","numeric":20429,"http":429,"permanent":false,"message":"Too many requests. Retry later."},{"code":"IDEMPOTENCY_CONFLICT","numeric":20422,"http":422,"permanent":true,"message":"Idempotency-Key was reused with a different request."},{"code":"IDEMPOTENCY_IN_PROGRESS","numeric":20423,"http":409,"permanent":false,"message":"A request with this Idempotency-Key is still in progress."},{"code":"IDEMPOTENCY_KEY_REQUIRED","numeric":20002,"http":400,"permanent":true,"message":"The Idempotency-Key header is required."},{"code":"INSUFFICIENT_BALANCE","numeric":30402,"http":402,"permanent":false,"message":"Insufficient balance. Top up and retry."},{"code":"BUDGET_EXCEEDED","numeric":30403,"http":402,"permanent":false,"message":"The budget cap would be exceeded."},{"code":"PAYMENT_FAILED","numeric":30404,"http":402,"permanent":false,"message":"The payment failed."},{"code":"DNC_BLOCKED","numeric":21610,"http":403,"permanent":true,"message":"The recipient has opted out or is on a do-not-contact list."},{"code":"CALLING_HOURS","numeric":21411,"http":403,"permanent":false,"message":"Outside permitted calling hours."},{"code":"FREQUENCY_LIMIT","numeric":21412,"http":429,"permanent":false,"message":"Contact frequency limit reached for this destination."},{"code":"LAWFUL_BASIS_REQUIRED","numeric":21413,"http":422,"permanent":true,"message":"A lawful_basis_ref is required."},{"code":"CONSENT_REQUIRED","numeric":21414,"http":403,"permanent":true,"message":"Recipient consent is required."},{"code":"KYC_REQUIRED","numeric":21415,"http":403,"permanent":false,"message":"Identity verification is required for this action."},{"code":"CALLER_ID_NOT_VERIFIED","numeric":21212,"http":403,"permanent":false,"message":"The caller ID is not verified for this account."},{"code":"NUMBER_SUSPENDED","numeric":21416,"http":403,"permanent":false,"message":"The number is suspended."},{"code":"TENANT_SUSPENDED","numeric":21417,"http":403,"permanent":false,"message":"The account is suspended."},{"code":"RISK_BLOCKED","numeric":21418,"http":403,"permanent":false,"message":"Blocked by risk controls."},{"code":"REVIEW_REQUIRED","numeric":21419,"http":202,"permanent":false,"message":"Held for review."},{"code":"CIRCUIT_OPEN","numeric":50301,"http":503,"permanent":false,"message":"Temporarily paused by a circuit breaker."},{"code":"APPROVAL_REQUIRED","numeric":20411,"http":409,"permanent":false,"message":"Approval is required."},{"code":"PROVIDER_ERROR","numeric":40002,"http":502,"permanent":false,"message":"The upstream provider returned an error."},{"code":"PROVIDER_UNAVAILABLE","numeric":40003,"http":503,"permanent":false,"message":"The upstream provider is unavailable."},{"code":"SIGNATURE_INVALID","numeric":20007,"http":401,"permanent":true,"message":"The signature is invalid."},{"code":"INTERNAL_ERROR","numeric":50000,"http":500,"permanent":false,"message":"Internal error."},{"code":"LEDGER_INVARIANT","numeric":50010,"http":500,"permanent":true,"message":"A ledger invariant was violated; the operation was rejected."},{"code":"TENANT_FROZEN","numeric":50011,"http":423,"permanent":false,"message":"The account is frozen pending a balance check."},{"code":"LICENSE_GATE_CLOSED","numeric":21420,"http":403,"permanent":false,"message":"This capability is not yet enabled (licence gate closed)."},{"code":"LEGAL_GATE_CLOSED","numeric":21421,"http":403,"permanent":false,"message":"This capability is not yet enabled (legal gate closed)."},{"code":"INVALID_DESTINATION","numeric":21211,"http":400,"permanent":true,"message":"The destination number is not valid."},{"code":"DESTINATION_NOT_PERMITTED","numeric":21408,"http":403,"permanent":true,"message":"This account may not send to that destination."},{"code":"CONTENT_FILTERED","numeric":30007,"http":422,"permanent":true,"message":"The message content was filtered."},{"code":"LEASE_EXHAUSTED","numeric":30405,"http":402,"permanent":false,"message":"Spend lease exhausted; renew the lease."},{"code":"CREDIT_LIMIT_EXCEEDED","numeric":32002,"http":402,"permanent":false,"message":"Credit limit reached. Pay an open invoice or ask your account manager for a higher limit."},{"code":"STORAGE_ERROR","numeric":40010,"http":502,"permanent":false,"message":"Object storage error."},{"code":"MFA_REQUIRED","numeric":20008,"http":403,"permanent":false,"message":"A second factor is required to continue."},{"code":"STEP_UP_REQUIRED","numeric":20009,"http":403,"permanent":false,"message":"Please verify again (step-up) to do this."},{"code":"SECOND_FACTOR_REQUIRED","numeric":20010,"http":403,"permanent":false,"message":"Set up a second factor (passkey or authenticator app) to unlock this action."},{"code":"SENSITIVE_FROZEN","numeric":20011,"http":423,"permanent":false,"message":"Sensitive actions are temporarily frozen for your protection."},{"code":"ACCEPT_REQUIRED","numeric":20012,"http":422,"permanent":false,"message":"Please accept the terms to continue."},{"code":"LIMIT_EXCEEDED","numeric":21430,"http":403,"permanent":false,"message":"You have reached a limit on your account. Verify or wait to raise it."},{"code":"CAPABILITY_PAUSED","numeric":21431,"http":423,"permanent":false,"message":"This capability is paused for your protection. You can unlock it in one step."},{"code":"SENDER_NOT_APPROVED","numeric":31001,"http":403,"permanent":false,"message":"The sender ID is not approved for this message category."},{"code":"NO_ROUTE","numeric":33001,"http":503,"permanent":false,"message":"No route is available for this destination right now."},{"code":"NO_RATE","numeric":32005,"http":422,"permanent":true,"message":"No price is published for this destination."}],"x-webhook-events":[{"type":"message.status","description":"A message changed state (sent, delivered, undelivered, failed, expired, rejected).","sample":{"id":"msg_x","status":"delivered","error_code":null,"client_ref":"order-1","to":"+66812345678"}},{"type":"message.received","description":"An inbound message arrived on one of your numbers (STOP replies are handled first and not forwarded).","sample":{"id":"msg_y","from":"+66812345678","to":"+6620000000","body":"YES"}},{"type":"message.priced","description":"The final price of a message was recorded.","sample":{"id":"msg_x","price":"-0.75000","price_unit":"THB"}},{"type":"batch.completed","description":"A batch / campaign finished.","sample":{"id":"batch_1","total":100,"delivered":97}},{"type":"call.status","description":"A call changed state.","sample":{"id":"call_x","status":"completed","error_code":null}},{"type":"call.recording_ready","description":"A call recording is ready to download.","sample":{"id":"call_x"}},{"type":"sender_id.status","description":"A sender ID was approved, rejected or suspended.","sample":{"id":"snd_1","value":"ACME","status":"approved"}},{"type":"balance.low","description":"The wallet balance fell under your alert threshold.","sample":{"balance":"120.00","threshold":"200.00"}},{"type":"credit_limit.threshold","description":"Credit use passed 80 / 90 / 100 %.","sample":{"percent":80}},{"type":"invoice.issued","description":"An invoice was issued.","sample":{"id":"inv_1"}},{"type":"sla.credit_issued","description":"An SLA credit note was issued for a month that missed its service levels.","sample":{"period":"2026-10","credit_net":"1200.00"}},{"type":"invoice.paid","description":"An invoice was paid in full.","sample":{"id":"inv_1","status":"paid"}},{"type":"report.ready","description":"A scheduled report was generated (small reports carry the file as base64).","sample":{"name":"Monthly usage","format":"csv","period":"2026-10","rows":120}},{"type":"limit.raised","description":"Your account limits were raised.","sample":{"tier":"L2"}},{"type":"key.auto_revoked","description":"An API key was revoked automatically (leak pattern, cap burn from a new network, abnormal volume). Create a new key.","sample":{"key_id":"key_1","prefix":"sv_live_ab12","reason":"spend_cap_reached_from_new_network"}},{"type":"verification.approved","description":"A verification code was entered correctly.","sample":{"id":"vf_1","to":"+66812345678","channel":"sms"}},{"type":"verification.expired","description":"A verification expired without approval.","sample":{"id":"vf_1","to":"+66812345678"}},{"type":"link.clicked","description":"A controlled short link was opened by a person (bots excluded).","sample":{"id":"k3m9x2p7qa","label":"promo","at":"2026-11-22T03:00:00Z"}},{"type":"slot.booked","description":"A booking was made in your appointment book (by staff, the AI receptionist, the API or an import).","sample":{"id":"bkg_1","ref":"BK-7F3K9Q","status":"booked","slot_id":"slt_1","starts_at":"2026-12-01T03:00:00.000Z","phone":"+66812345678","source":"ai"}},{"type":"slot.changed","description":"A booking was moved to another slot (the new booking points back to the old one).","sample":{"id":"bkg_2","ref":"BK-9M2XQ4","previous_id":"bkg_1","slot_id":"slt_2","previous_slot_id":"slt_1"}},{"type":"slot.cancelled","description":"A booking was cancelled and its seat is free again.","sample":{"id":"bkg_1","ref":"BK-7F3K9Q","status":"canceled","slot_id":"slt_1"}},{"type":"webhook.test","description":"Sent by the \"send test event\" button.","sample":{"hello":"world"}}],"x-magic-numbers":{"messages":[{"number":"+66000000001","result":"delivered"},{"number":"+66000000002","result":"undelivered (30003)"},{"number":"+66000000003","result":"failed (33004), not charged"},{"number":"+66000000004","result":"rejected as spam (30007)"},{"number":"+66000000005","result":"expired (30011)"},{"number":"+66000000006","result":"delivered after 60 s"},{"number":"+66000000007","result":"no receipt: status stays sent, dlr_unknown = true"},{"number":"+66000000008","result":"delivered (duplicate receipt ignored)"},{"number":"+66000000009","result":"delivered (out-of-order receipts)"}],"calls":[{"number":"+66000000001","result":"answered, 30 s"},{"number":"+66000000002","result":"busy"},{"number":"+66000000003","result":"no answer"},{"number":"+66000000004","result":"rejected (34003)"},{"number":"+66000000005","result":"invalid number"},{"number":"+66000000006","result":"failed (503)"},{"number":"+66000000007","result":"answered by a machine (with machine_detection)"}],"verify":[{"number":"+66000000001","result":"code 123456 approves"},{"number":"+66000000002","result":"the code is never accepted (wrong-code path)"},{"number":"+66000000003","result":"expires at once"}],"lookups":[{"number":"+66000000001","result":"active"},{"number":"+66000000002","result":"inactive (with the HLR simulator)"},{"number":"+66000000003","result":"ported to NT (with the HLR simulator)"}]},"x-rate-limits":{"headers":["X-RateLimit-Limit","X-RateLimit-Remaining","X-RateLimit-Reset","Retry-After"],"algorithm":"token bucket per key; refill = TPS of your level, burst = 2 × TPS"}}