DOCS · REFERENCE
Operation reference
Each operation below works the same way everywhere: POST /v1/operations/<name> on the HTTP API, the tool name_with_underscores on the MCP server, and sagot <name> in the CLI. Inputs are JSON; most operations take the workspaceId they act on. The machine-readable contract is openapi.json. New here? Start with the developer docs.
Access
access.info
Read public registration availability (closed alpha is the default) and whether the caller's session or credential is valid (signedIn). Requires no sign-in.
Waitlist
waitlist.join
Request alpha participation with contact consent. Does not create an account or send email. Requires no sign-in.
| Field | Type | Required |
|---|---|---|
name | string | yes |
email | string | yes |
company | string | yes |
useCase | string | yes |
consent | boolean | yes |
website | string | yes |
waitlist.list
Platform operators only: review the alpha queue, oldest first, with status and pagination. Requires read permission.
| Field | Type | Required |
|---|---|---|
status | "waiting" | "contacted" | "invited" | "admitted" | "closed" | no |
offset | integer | yes |
limit | integer | yes |
waitlist.update
Platform operators only: mark an applicant waiting, contacted or closed. Requires configure permission.
| Field | Type | Required |
|---|---|---|
id | UUID | yes |
status | "waiting" | "contacted" | "closed" | yes |
waitlist.delete
Platform operators only: permanently remove an applicant's waitlist information. Does not delete their account or invitations. Requires configure permission.
| Field | Type | Required |
|---|---|---|
id | UUID | yes |
Invitations
invitations.create
Platform operators only: issue an email-bound, single-use private invitation. Returns the token once; share privately. Does not send email. Replaces prior unused invitations for that email. Requires configure permission.
| Field | Type | Required |
|---|---|---|
email | string | yes |
expiresInDays | integer | yes |
invitations.list
Platform operators only: list invitation states without tokens, newest first. Requires read permission.
| Field | Type | Required |
|---|---|---|
offset | integer | yes |
limit | integer | yes |
invitations.revoke
Platform operators only: revoke an unused invitation. Existing accounts are unaffected. Requires configure permission.
| Field | Type | Required |
|---|---|---|
id | UUID | yes |
Account
account.register
Operation in the shared contract. Requires no sign-in.
| Field | Type | Required |
|---|---|---|
name | string | yes |
email | string | yes |
password | string | yes |
invitationToken | string | no |
memberInvitationToken | string | no |
acceptTermsMust be true: you accept the current Terms of Service (/terms), Data Processing Addendum (/data-processing) and Privacy Notice (/privacy). | boolean | yes |
account.login
Operation in the shared contract. Requires no sign-in.
| Field | Type | Required |
|---|---|---|
email | string | yes |
password | string | yes |
codeTwo-step sign-in: the 6-digit authenticator code or a recovery code. | string | no |
account.me
Operation in the shared contract. Requires read permission.
account.logout
Operation in the shared contract. Requires configure permission.
account.acceptTerms
Signed-in session only: accept the current Terms of Service, Data Processing Addendum and Privacy Notice (version from account.me termsVersion). Records the version and time on your account. Requires configure permission.
| Field | Type | Required |
|---|---|---|
versionThe termsVersion you accept (see account.me). | string | yes |
account.mfaSetup
Signed-in session only: start turning on two-step sign-in. Confirms your password and returns a new authenticator secret and otpauth:// URI (scan as a QR code). Nothing changes until account.mfaEnable confirms a code. Requires configure permission.
| Field | Type | Required |
|---|---|---|
password | string | yes |
account.mfaEnable
Signed-in session only: confirm a 6-digit code from the authenticator app to turn two-step sign-in on. Returns 10 one-time recovery codes once; store them safely. Sign-in then needs a code (account.login code). Requires configure permission.
| Field | Type | Required |
|---|---|---|
code | string | yes |
account.mfaDisable
Signed-in session only: turn two-step sign-in off with your password and a current code or recovery code. SAGOT staff cannot use the platform console without it. Requires configure permission.
| Field | Type | Required |
|---|---|---|
password | string | yes |
code | string | yes |
account.mfaRecoveryCodes
Signed-in session only: replace all recovery codes after confirming a current code. Returns the 10 new codes once. Requires configure permission.
| Field | Type | Required |
|---|---|---|
code | string | yes |
account.delete
Signed-in session only: delete your own SAGOT account after confirming your password. Refused while you own a workspace (transfer ownership or delete it first) or hold a SAGOT staff role. Removes you from every workspace, revokes your sessions and API keys and anonymises your account; your email can register again. Requires configure permission.
| Field | Type | Required |
|---|---|---|
passwordYour current password, to confirm it is you. | string | yes |
Assistants
assistants.preview
Check an OAuth authorization request from an AI assistant (Claude, ChatGPT, Gemini or any MCP client) before consent: returns the assistant's name, the address it returns to, the scopes requested in plain words, or the problem with the request. Requires no sign-in.
| Field | Type | Required |
|---|---|---|
request | object | yes |
assistants.authorize
Signed-in session only: allow (with a workspaceId) or deny an AI assistant's request to use SAGOT. Allowing gives that assistant the listed scopes in one workspace — never admin, never more than your role — and returns redirectTo, the address to send the browser back to. Requires read permission.
| Field | Type | Required |
|---|---|---|
request | object | yes |
allow | boolean | yes |
workspaceIdWorkspace the assistant may use; required to allow. | UUID | no |
assistants.list
Signed-in session only: AI assistants connected to your account through OAuth, with workspace, scopes, when connected and last used. Requires read permission.
assistants.revoke
Signed-in session only: disconnect an AI assistant. Its access and refresh tokens stop working immediately; it must ask again to reconnect. Requires read permission.
| Field | Type | Required |
|---|---|---|
id | UUID | yes |
assistants.clients.create
Signed-in session only: create an OAuth client ID and secret for an assistant that asks for them, such as Gemini Enterprise (redirect https://vertexaisearch.cloud.google.com/oauth-redirect). The secret is returned once. People who sign in through it still choose their own workspace. Requires read permission.
| Field | Type | Required |
|---|---|---|
name | string | yes |
redirectUris | string[] | yes |
assistants.clients.list
Signed-in session only: OAuth client IDs you created for assistants, with their redirect addresses. Requires read permission.
assistants.clients.revoke
Signed-in session only: revoke an OAuth client ID you created; assistants using it can no longer sign in or refresh tokens. Requires read permission.
| Field | Type | Required |
|---|---|---|
id | string | yes |
Workspaces
workspaces.create
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
name | string | yes |
kindpersonal: calling hours 9–20 every day and a published agent that calls businesses for you (phase 41-02). | "team" | "personal" | yes |
timezoneIANA time zone for calling hours, e.g. America/New_York. | string | no |
workspaces.list
Operation in the shared contract. Requires read permission.
workspaces.update
Operation in the shared contract. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
name | string | yes |
workspaces.region
Owner only, signed-in session: choose where AI providers process this workspace's call audio and text — "eu" (European Union) or "us" (United States). No call starts until a region is chosen. Choosing it means accepting this statement: "I am the owner of this workspace. I have chosen this processing region myself and confirm it meets the data protection laws, contracts and customer commitments that apply to this workspace and the people it calls. SAGOT processes call audio and text in the region I choose and is not responsible for the consequences of choosing a region that does not meet those obligations." Applies to calls queued after the change. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
region | "eu" | "us" | yes |
acceptResponsibilityMust be true: the owner accepts processingRegionStatement (see the description). | boolean | yes |
workspaces.delete
Owner only, signed-in session: permanently delete this workspace and everything in it — agents, contacts, calls, recordings, transcripts, lines, API keys and members' access. confirmName must equal the workspace name. Refused while calls are active or a Twilio line exists (delete it first so SAGOT removes what it created in your Twilio account). Cannot be undone; backups expire within about 31 days. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
confirmNameThe workspace's exact current name, to confirm. | string | yes |
Members
members.list
List the people in this workspace with their roles (viewer, editor, operator, admin, owner). Admins also see invitations and their status; tokens are never shown. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
members.invite
Admins: invite an email to this workspace with a role, optionally limited to agentIds (viewer/editor/operator only). SAGOT emails the invitation when email is configured; the one-time link path (/join#member=…) is also returned once as a fallback. The invitee signs in or creates an account with that email. Only the owner can invite admins. Re-inviting an email replaces its earlier pending invitation. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
email | string | yes |
role | "viewer" | "editor" | "operator" | "admin" | yes |
agentIds | UUID[] | null | no |
expiresInDays | integer | yes |
members.update
Admins: change a member's role and, with agentIds, limit a viewer/editor/operator to selected agents (null = all agents). Takes effect on their next request, including their API keys. The owner's role cannot change; only the owner grants or removes admin. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
accountId | UUID | yes |
role | "viewer" | "editor" | "operator" | "admin" | yes |
agentIds | UUID[] | null | no |
members.transfer
Owner only, signed-in session: make another member the owner. You become an admin; any agent limit on them is removed. The new owner is emailed. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
accountId | UUID | yes |
members.remove
Admins remove a member; any member may remove themselves to leave. The owner cannot be removed. Their sessions and API keys stop working in this workspace immediately. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
accountId | UUID | yes |
members.revoke
Admins: revoke a pending member invitation by id so its link stops working. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
members.preview
Public: show what a member invitation link grants (workspace, inviter, role, invited email, status) before accepting. Requires no sign-in.
| Field | Type | Required |
|---|---|---|
token | string | yes |
members.accept
Signed-in account session only: accept a member invitation issued to this account's email and join the workspace with its role. Requires configure permission.
| Field | Type | Required |
|---|---|---|
token | string | yes |
Credentials
credentials.create
Operation in the shared contract. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
name | string | yes |
scopes | "read" | "configure" | "publish" | "call" | "admin"[] | yes |
credentials.list
Operation in the shared contract. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
credentials.revoke
Operation in the shared contract. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Agents
agents.create
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
persona | object | yes |
agents.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
agents.get
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
agents.save
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
revision | integer | yes |
persona | object | yes |
agents.test
Validate the current draft and its integration. This is configuration validation, not a voice-quality score. Use a draft SIP call to hear the result. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
revision | integer | yes |
agents.publish
Publish a validated draft for new calls. Active calls keep their original snapshot. Requires publish permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
revision | integer | yes |
agents.pause
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
agents.rollback
Point new calls to a previous published version. Requires publish permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
version | UUID | yes |
agents.retire
Operation in the shared contract. Requires publish permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
version | UUID | yes |
Integrations
integrations.save
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | no |
revision | integer | no |
name | string | yes |
mode | "sandbox" | "https" | yes |
endpoint | string | yes |
reconciliationEndpoint | string | yes |
eventEndpoint | string | yes |
secret | string | no |
actionName | string | yes |
descriptionWhen the agent should use this action and what it accomplishes. | string | yes |
requiredFields | string[] | yes |
integrations.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
integrations.get
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
integrations.test
Exercise the connector with a test payload. Sandbox never writes to an external product. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
payload | object | yes |
integrations.disconnect
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Contacts
contacts.import
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
contacts | object[] | yes |
contacts.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
contacts.history
Review all retained calls, conversations, outcomes, actions, follow-ups and activity for one contact across agents in this workspace. Missing or deleted evidence is labeled. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
contacts.export
Export the contact's retained evidence as a readable Markdown or structured JSON audit snapshot. Export is logged; it does not create recordings or recover deleted content. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
format | "markdown" | "json" | yes |
contacts.update
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
revision | integer | yes |
name | string | yes |
source | string | yes |
eligibility | string | yes |
contacts.suppress
Permanently suppress this contact from new calls in this workspace. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
reason | string | yes |
contacts.erase
Admins: permanently erase one person's personal data from this workspace — by contact id or by phone number (destination), including inbound callers who are not contacts. Removes the contact, its activity history, and every call's recording, transcript, outcome, number and linked action/handoff content. Calls keep only time, status, duration and cost. Refused while a call with them is active or one of their actions is unresolved. With doNotCall (always, if they had opted out) a one-way fingerprint of the number keeps them from being called or answered again. Use for data-subject erasure requests; download the audit first if you need to answer an access request. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
idThe contact to erase. Give this or destination, not both. | UUID | no |
destinationErase by number, e.g. an inbound caller who is not a contact. | string | string | no |
doNotCallKeep the number on this workspace's do-not-call list as a one-way fingerprint. Always kept when the contact had opted out. | boolean | yes |
Campaigns
campaigns.save
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | no |
revision | integer | no |
name | string | yes |
agentId | UUID | yes |
contactIds | UUID[] | yes |
budgetCentavos | integer | yes |
lineId | UUID | null | no |
campaigns.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
campaigns.get
Read one campaign. A running campaign that can't call anyone now has `waiting` ({code, message, fix, since}), e.g. outside the calling hours or no processing region; it starts again by itself once that is fixed. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
campaigns.preview
Inspect eligible contacts, exclusion reasons and the maximum reserved cost without dialing. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
campaigns.start
Operation in the shared contract. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
campaigns.pause
Operation in the shared contract. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
campaigns.resume
Operation in the shared contract. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
campaigns.cancel
Operation in the shared contract. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Calls
calls.create
Queue one call with an agent to a contact. Give `task` for what this one call must achieve (the personal starter agent follows it). During the alpha a line only calls its test numbers, unless it is a SAGOT number line in live mode. Calls on SAGOT numbers reserve their maximum cost from the prepaid balance (BALANCE_TOO_LOW, SPEND_LIMIT_REACHED, COUNTRY_NOT_SUPPORTED). When an AI assistant connected by OAuth asks for a call and the policy's assistantCallApproval is on (default), the call is created with status awaiting_approval and nothing dials until a person approves it on the website: tell them, and give them the returned approvalUrl. It is canceled if not approved within 24 hours. Then read the result with calls.get. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
agentId | UUID | yes |
contactId | UUID | yes |
idempotencyKey | string | yes |
draft | boolean | yes |
lineId | UUID | no |
taskWhat this one call must achieve, in plain words — e.g. 'Ask for a table for 4 on Friday 18 Oct at 7pm under Cruz; 7–8pm is fine; no deposit.' Given to the agent beneath its instructions. | string | no |
calls.list
List calls, newest first. Status `refused` = an incoming call SAGOT didn't answer: `refusal` says why ({code, message, fix}), what the caller experienced (`handling`: rang_through = the phone kept ringing for a person, hung_up, message_played = a short notice) and how often it repeated within 10 minutes (`repeats`). Refused calls cost nothing and don't count as calls in usage. A queued call canceled before dialing carries the same `refusal`. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
calls.get
Read one call: status, outcome, transcript, recording, cost, carrier cost and, for calls SAGOT refused, `refusal` (see calls.list). `disclosure` says whether the person was told it's an AI and recorded: {mode, status: given | not_given, at, words, checkedBy: model | keywords | recording}. `runtimeStartup` says how long the voice agent took to get ready before pickup or dialing ({snapshotMs, roomMs, sessionMs, speechMs, totalMs, clipsReused}). Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
calls.recording
Get recording availability and authenticated audio URL. Fetch that URL with the same bearer credential to play/download Ogg audio; CLI supports --output file. Older unrecorded calls have no audio. Status discarded: the call ended before the person was told it is recorded, so no audio was kept (the transcript is). Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
calls.cancel
Cancel a queued or active call. On a finished call with a scheduled automatic retry, cancels that retry instead. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
calls.approve
Signed-in session only (a person, not an API key or assistant): approve a call an AI assistant asked for (status awaiting_approval). Eligibility is checked again and the call is queued. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
calls.decline
Signed-in session only: decline a call an AI assistant asked for. It is canceled and its reserved budget released. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Actions
actions.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
actions.reconcile
Query the owning system about an uncertain action. Does not repeat the business write. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Handoffs
handoffs.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
handoffs.update
Operation in the shared contract. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
revision | integer | yes |
status | "accepted" | "resolved" | "canceled" | yes |
owner | string | yes |
Events
events.list
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
limit | integer | yes |
cursor | UUID | no |
events.replay
Retry delivery of this event with its original event ID. Requires call permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Policies
policies.get
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
policies.update
Operation in the shared contract. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
revision | integer | yes |
policy | object | yes |
Usage
usage.get
SAGOT charges, reservations and credits for the workspace (PHP centavos, by line and per call in `ledger`), plus phone carrier costs (phase 44): `carrierCosts` totals per currency, `carrierPendingCalls` still waiting for the provider's price, per line `carrierCosts` and `carrierCostTracking` (provider = Twilio's actual price, line_rate = your rate on the line, included = in SAGOT's charge, not_tracked), and per call `carrierCost`. Carrier costs are billed by your carrier, not SAGOT. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
Billing
billing.get
The workspace's prepaid balance for calls on SAGOT numbers (PHP centavos): balance (paid top-ups + SAGOT credits − charges), reserved for calls in progress, available, this month's spend and the optional monthly cap (policy monthlySpendLimitCentavos, null = none), recent top-ups, the proposed rate per country and whether card top-ups are offered. Other line types are not paid from the balance. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
billing.topUp
Admin only, never an assistant: start a card payment (Stripe Checkout) that adds amountCentavos (₱500–₱50,000) to the prepaid balance. Returns `checkoutUrl`; give it to the person to pay. The balance rises when Stripe confirms the payment. Fails PAYMENTS_UNAVAILABLE when this deployment takes no payments. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
amountCentavos | integer | yes |
Routes
routes.list
Deprecated alias of lines.list: offered routes with health and the workspace's default line as `bound`. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
routes.bind
Deprecated alias: add (if needed) and make default the line for this route; inboundAgentId as in lines.update. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
route | "sip-test" | "phone-gateway" | yes |
inboundAgentId | UUID | null | no |
routes.clearAlert
Deprecated alias of lines.clearAlert for the workspace's default line. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
Lines
lines.list
List this workspace's phone lines (provider, default, mode, test numbers, ring window, live health, inbound answering, telco warning) and the providers this deployment offers. Secrets are never returned. `callBlockers` lists what would stop this line's calls right now ({code, message, fix: {label, path} | null, affects: inbound/outbound}), e.g. no processing region or no answering agent: tell the user and point them to `fix.path` on the website. `lastRefused` is the newest call SAGOT didn't answer on this line in the last 7 days. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
lines.get
Read one phone line with its live health, warning, `callBlockers` and `lastRefused` (see lines.list). Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
lines.create
Add a phone line from an offered provider. Adding never dials. The first line becomes the default for new calls and campaigns. Lines start in test mode: only the line's test numbers can be called. A `gateway` line (your own computer + phone) returns a one-time `pairing.code` (30 minutes) that the SAGOT gateway app exchanges for its own credential; the code is shown only once. A `twilio` line connects your own Twilio account: pass accountSid, apiKeySid, apiKeySecret (a Standard API key; write-only) and the numbers to attach (lines.twilioNumbers lists them). SAGOT creates an Elastic SIP Trunk, a credential list, an origination URL and attaches the numbers in your account, records every object it created and removes exactly those when the line is deleted. Twilio bills the calls to your account. A `sagot` line (SAGOT number, one per workspace) calls from SAGOT's shared numbers and is paid from the workspace's prepaid balance (billing.get shows rates); it can't receive calls. Add its test numbers with lines.verifyNumber and lines.confirmNumber. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
provider | "sandbox" | "legacy_gateway" | "gateway" | "twilio" | "sagot" | yes |
name | string | no |
isDefault | boolean | no |
accountSid | string | no |
apiKeySid | string | no |
apiKeySecret | string | no |
numbers | string[] | no |
callerId | string | no |
edge | "singapore" | "tokyo" | "sydney" | "ashburn" | "umatilla" | "dublin" | "frankfurt" | "sao-paulo" | no |
lines.twilioNumbers
Check a Twilio Standard API key (accountSid, apiKeySid, apiKeySecret) and list the account's voice-capable numbers and whether Twilio is reachable. Changes nothing and stores nothing. Use it before lines.create with provider twilio. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
accountSid | string | yes |
apiKeySid | string | yes |
apiKeySecret | string | yes |
lines.update
Rename a line, make it the default, choose the published inboundAgentId that answers its callers (gateway lines; null stops answering), set testNumbers (customer gateway and Twilio lines), rotatePairing to issue a new pairing code and sign the paired device out, or capacity (Twilio lines: concurrent calls 1–10; phone gateways, SAGOT numbers and shared routes carry one call). The deployment also caps concurrent calls overall. On a SAGOT number line testNumbers can only remove numbers (add them with lines.verifyNumber). `carrierRate` {amountPerMinute, currency, increment minute|second} (null clears) records what your carrier charges on lines whose provider doesn't report prices (phone gateway SIM): calls then show an estimated carrier cost. Twilio lines report Twilio's actual price instead; SAGOT number lines include telecom in SAGOT's charge. `mode: "live"` (admin, not an assistant) lets a SAGOT number line call any number in a supported country once SAGOT has turned live calling on; otherwise it fails LIVE_MODE_UNAVAILABLE. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
revision | integer | yes |
name | string | no |
isDefault | boolean | no |
mode | "test" | "live" | no |
inboundAgentId | UUID | null | no |
testNumbers | string[] | no |
rotatePairing | boolean | no |
capacity | integer | no |
carrierRate | object | null | no |
lines.verifyNumber
SAGOT number lines, admin only (never an assistant): send a verification code to a phone number the person owns, by SMS (default) or a voice call (`channel: "call"`). Then call lines.confirmNumber with the code. Verified numbers can be called in test mode. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
number | string | yes |
channel | "sms" | "call" | yes |
lines.confirmNumber
SAGOT number lines, admin only: check the code sent by lines.verifyNumber and add the number to the line's test numbers. A wrong or expired code fails VERIFICATION_FAILED; send a new one. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
number | string | yes |
code | string | yes |
lines.test
Check a line's readiness without dialing: provider offered, health, test numbers. Use calls.create with lineId for a real test call. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
lines.clearAlert
Clear this line's telco warning after fixing the cause (for example topping up the gateway SIM). Held automatic retries and campaigns on this line resume. An answered call also clears it. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
lines.delete
Remove a phone line. Refused while it has active calls. For a Twilio line SAGOT first deletes the trunk, credentials and origination URL it created in your account and detaches your numbers (the numbers stay yours). Finished calls keep their history; scheduled retries on it are skipped. Another line becomes the default if needed. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Artifacts
artifacts.export
Operation in the shared contract. Requires read permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
artifacts.delete
Operation in the shared contract. Requires configure permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
Support
support.list
Workspace admins: SAGOT support access requests and grants for this workspace, with what staff read while access was active. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
support.approve
Workspace admins: approve a pending SAGOT support access request. The staff member gets read-only access for the requested hours, starting now. Nothing can be changed by staff. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
support.deny
Workspace admins: deny a pending SAGOT support access request. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |
support.revoke
Workspace admins: end active SAGOT support access immediately. Requires admin permission.
| Field | Type | Required |
|---|---|---|
workspaceId | UUID | yes |
id | UUID | yes |