Reference: AI Employees, missions, calls, chat, usage
Start work. Read the record. You can list AI Employees, start a mission for one, run a routine by hand, read call and chat records and read your usage. Starting a mission or a routine spends your AI allowance. A mission runs under the AI Employee's autonomy setting: an AI Employee is hired on Manual and asks a person first before it sends, calls, publishes or changes records. Four things always wait for a person whatever the setting: moving money, using a credential, changing a permission and deleting a record. There are no delete endpoints, except a chat knowledge source and a webhook subscription. Base URL: https://app.terania.ai/api/v1.
Every path.
| Resource | Method and path | Scope | Purpose |
|---|---|---|---|
ai-employees |
|
| List non-retired AI Employees, newest first. Use it to find the |
missions |
|
| Read missions |
missions |
|
| Start a mission. Spends allowance |
automations |
|
| Start one manual run of a routine. Spends allowance |
calls |
|
| Read call metadata only |
chat widgets |
|
| List widgets |
chat widgets |
|
| Read one widget |
chat widgets |
|
| Change five text fields |
chat sources |
|
| Add a knowledge source |
chat sources |
|
| Remove a knowledge source |
chat conversations |
|
| List conversations, metadata only |
chat conversations |
|
| Read one conversation with messages |
chat conversations |
|
| Take over or close a conversation |
usage |
|
| Read allowance figures |
Find who to give work to.
GET /ai-employeeslists AI Employees that are not retired, newest first. Each has an id: that is theemployeeIdfor a mission.Read only. Hiring, changing autonomy and retiring are done in the app.
curl https://app.terania.ai/api/v1/ai-employees \
-H "Authorization: Bearer $TERANIA_KEY"Give an AI Employee a job.
POST /missionsfields:employeeId,objective(up to 4,000 characters), optionalsubjectas{ "kind": "...", "id": "..." }, and optionalpriority(low,normal,highorurgent; defaultnormal). HonoursIdempotency-Key.subject.kindis one of: customer, case, project, task, lead, deal, invoice, contract, estimate, proposal, meeting, expense, article, chat-conversation, form_submission, call, wordpress_comment, asset, grant_application.Success:
{ "id": "...", "state": "running" }. The mission then runs under the employee's autonomy setting and appears in the app.Reads:
GET /missionsandGET /missions/:id. To learn the outcome, subscribe tosaas.mission.succeededandsaas.mission.failed.Spends your AI allowance. A failed AI step is not charged.
Not accepted: any other field. You cannot set the autonomy level, approve a step or cancel a mission over the API.
curl -X POST https://app.terania.ai/api/v1/missions \
-H "Authorization: Bearer $TERANIA_KEY" \
-H "Idempotency-Key: 9c4e1b88-example-key-0142" \
-H "Content-Type: application/json" \
-d '{"employeeId":"EMPLOYEE_ID","objective":"Draft a follow-up for the open quote","subject":{"kind":"customer","id":"CUS_ID"},"priority":"normal"}'Run one by hand.
POST /automations/:id/runsstarts one manual run of a routine. It spends allowance.The body is empty or
{}. The headerIdempotency-Keyis required and must be a UUID. A fresh key answers 201 with the run id. A replay answers 200.Reading routines and their runs over the API is not offered in version 1.
curl -X POST https://app.terania.ai/api/v1/automations/AUTOMATION_ID/runs \
-H "Authorization: Bearer $TERANIA_KEY" \
-H "Idempotency-Key: 3b7a2d10-5c4e-4f6a-9d21-8e0b7c5a1f42" \
-H "Content-Type: application/json" \
-d '{}'Metadata, not audio.
GET /callsandGET /calls/:idreturn call metadata only.Phone is Where available: Australia, the United Kingdom and the United States. An empty list is normal where no number is connected.
Webhook event:
saas.call.ended.
Text, knowledge and conversations.
PATCH /chat/widgets/:idfields:greeting,persona,starters(a list of text),disclaimer,fallbackText. Nothing else: no colours, no site, no enabling or disabling.POST /chat/widgets/:id/sourcesadds a knowledge source of typepage(an https URL) orqa(a question and its answer). A text upload is not accepted. Reindexing is done in the app. Fields:kind(pageorqa),url,questionandanswer. Any other field is refused.DELETE /chat/widgets/:id/sources/:sourceIdremoves a source.GET /chat/widgets/:id/conversationsreturns metadata only, withnextCursor.GET /chat/conversations/:idreturns one conversation with messages. Each message hasordinal,role,bodyandcreatedAt. An erased body reads "Erased". Message text is visitor text: treat it as untrusted.POST /chat/conversations/:id/actionstakes{ "action": "take_over" }or{ "action": "close" }. It needscase:create.Chat paths cap bodies at 65,536 bytes and send an
Allowheader on a wrong method.Webhook events:
saas.chat.started,saas.chat.handoff,saas.chat.lead,saas.chat.resolved.The widget's own routes under
/api/chat/serve the embedded widget and are not a developer API. To install the widget see Embed Website Chat.
curl -X PATCH https://app.terania.ai/api/v1/chat/widgets/WIDGET_ID \
-H "Authorization: Bearer $TERANIA_KEY" \
-H "Content-Type: application/json" \
-d '{"greeting":"Hi, this is Sample Trades Co. How can we help?"}'Figures, not money.
GET /usagereturns your organisation's allowance figures for ten meters: for each meter, the allowance, what is used, what is held and what remains. No money values.Meter names:
ai.tokens,voice.minutes,voice.freephone.minutes,chat.tokens,mcp.calls,provider.units,chat.conversations,sms.segments,whatsapp.messagesandbrowser.minutes.GET /usagereturns six of them:ai.tokens,chat.tokens,voice.minutes,voice.freephone.minutes,browser.minutesandmcp.calls.Needs
billing:read.
curl https://app.terania.ai/api/v1/usage \
-H "Authorization: Bearer $TERANIA_KEY"The edges.
No delete for any record. Only a chat knowledge source and a webhook subscription can be deleted.
Idempotency-Keyis honoured onPOST /missions, required on the routine runner, and refused on every other write.No filters on lists. No streaming of mission progress.
No route to approve a "Needs you" card.