Docs menu

Docs Connect

REST API

The REST API does everything the MCP tools do, over plain HTTPS, from any language. Agents that call web APIs, such as Meta Muse, use it too.

Base address and key

https://app.smitline.com/v1

Make an API key in the dashboard under Connect → API keys. It's shown once. Send it on every request:

Authorization: Bearer YOUR_SMITLINE_KEY

Keep the key out of chats, code you share and logs. Check it with GET /profile: a 401 means it's wrong or revoked.

Place a call

Start a call
curl https://app.smitline.com/v1/calls \
  -H "Authorization: Bearer YOUR_SMITLINE_KEY" \
  -H "content-type: application/json" \
  -d '{
    "channel": "phone",
    "to": "+14165550134",
    "onBehalfOf": "Alex Chen",
    "objective": "Book a table for 2 at 7 pm on Friday.",
    "questions": ["Is 7 pm free? If not, the closest time before 8 pm?"],
    "mayAgreeTo": ["any time from 6:30 to 8 pm"]
  }'

The answer is the call, with its id and status. The brief's fields are in How a call works. To check a brief without calling, POST /calls/check: a 422 brief_incomplete lists what's missing, with a question to ask for each.

Follow it

Ask for the call again until its status is completed, failed or canceled:

Wait up to 60 seconds for news
curl "https://app.smitline.com/v1/calls/CALL_ID/wait?timeout=60" -H "Authorization: Bearer YOUR_SMITLINE_KEY"

Add since= (empty the first time, then the last answer's live.cursor) to follow the conversation as it happens, in live.transcript.

Endpoints

  • POST /calls: start a call from a brief.
  • POST /calls/check: check a brief without calling.
  • GET /calls/{id}: a call, with its result once it's done.
  • GET /calls/{id}/wait: wait for news on a call (timeout, since).
  • POST /calls/{id}/instructions: tell a call in progress something, {"text": "..."}.
  • POST /calls/{id}/end: end a call politely, or cancel one that hasn't connected.
  • GET /profile: your account, including your credit. Also a quick way to check your key.

Errors

Errors come as {"error": {"code": "...", "message": "..."}}. The message is written to pass on to a person. Common ones are in Troubleshooting.