Ir para o conteúdo

Endpoints

Calls

AI phone calls placed by the Coordinator: history, summaries, transcripts and new calls.

Os caminhos são relativos à URL base. Cada card lista a permissão que a chamada exige e todos os parâmetros, com tipo e limites.

GET
/calls

List calls, newest first. Summaries and transcripts are left out of the list.

Permissão: call_agent
Paginado

Parâmetros de query

  • directionopcionalenum

    Call direction.

    Valores permitidos:inboundoutbound

  • outcomeopcionalstring

    Call outcome, up to 50 characters.

  • contact_idopcionalinteger

    Calls with this contact.

  • fromopcionalstring (ISO 8601 date-time with offset)

    Calls created at or after this time.

  • toopcionalstring (ISO 8601 date-time with offset)

    Calls created at or before this time.

GET
/calls/:id

Retrieve a call with its outcome, summary and transcript.

Permissão: call_agent

Parâmetros de caminho

  • idobrigatóriostring

    Call ID (a UUID).

POST
/calls

Have the AI call one person. Send exactly one of contact_id or phone.

Permissão: call_agent

Corpo JSON

  • contact_idopcionalinteger

    The contact to call.

  • phoneopcionalstring (E.164)

    Number to call, e.g. +14155550123. A contact is found or created for it.

  • template_idopcionalstring

    A call template of this workspace. Send template_id or instructions.

  • instructionsopcionalstring

    What the AI should achieve on the call, 1–8,000 characters. Used when no template is given.

  • purposeopcionalstring

    Alias of instructions.

  • channel_idopcionalinteger

    The phone or WhatsApp channel to call from (see GET /channels). It must be able to place outbound calls.

  • scheduled_atopcionalstring (ISO 8601 date-time with offset)

    Call later instead of now.

  • Answers 201 with the queued call (status "pending").
  • 403 coordinator_disabled until the Coordinator is enabled for the workspace; 422 number_blocked for a number on the call blocklist; 422 do_not_call for a Do-Not-Call contact; 422 channel_not_connected when no channel can place the call.
POST
/calls/queue

Queue AI calls to several contacts.

Permissão: call_agent

Corpo JSON

  • contact_idsobrigatórioarray of integers

    1–500 contact IDs.

  • template_idopcionalstring

    A call template of this workspace. Send template_id or instructions.

  • instructionsopcionalstring

    What the AI should achieve on the call, 1–8,000 characters. Used when no template is given.

  • purposeopcionalstring

    Alias of instructions.

  • channel_idopcionalinteger

    The phone or WhatsApp channel to call from (see GET /channels). It must be able to place outbound calls.

  • scheduled_atopcionalstring (ISO 8601 date-time with offset)

    Call later instead of now.

  • Answers 201 with the queued calls plus queued, skipped_do_not_call and skipped_not_found counts.
DELETE
/calls/queue/:id

Cancel a queued call that has not started yet.

Permissão: call_agent

Parâmetros de caminho

  • idobrigatóriostring

    Queued call ID.