Skip to content

DOCS · QUICKSTART

HTTP API quickstart

Every SAGOT operation is one HTTP endpoint: POST https://sagots.com/v1/operations/<name> with a JSON body. There are no other routes to learn; the operation reference lists them all.

1. Set your key

Create an API key under Settings → API keys, then keep it in an environment variable rather than in commands:

export SAGOT_TOKEN=…   # paste your key

2. List your workspaces

curl -s https://sagots.com/v1/operations/workspaces.list \
  -H "Authorization: Bearer $SAGOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

3. Read your agents and phone lines

curl -s https://sagots.com/v1/operations/agents.list \
  -H "Authorization: Bearer $SAGOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"<workspace id>"}'

Use lines.list the same way to see which lines can call and their test numbers.

4. Start a call

calls.create takes the agent, the contact and an idempotency key, so a retried request never places a second call:

curl -s https://sagots.com/v1/operations/calls.create \
  -H "Authorization: Bearer $SAGOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"<workspace id>","agentId":"<agent id>","contactId":"<contact id>","idempotencyKey":"first-call-0001"}'

Then poll calls.get with the returned id for the status, outcome and transcript.

Frequently asked questions

Is there a machine-readable contract?

Yes: https://sagots.com/openapi.json describes every operation's input schema.

What happens if a call is not allowed?

The request fails with a structured error that says why, for example that the number is outside the calling window or not one of the line's test numbers.

Updated 2026-10-15

Join the closed alpha waitlist →