All pages

API reference

Have the agent say something

POST /v1/conversations/{conversation_id}/say

View as Markdown

The agent says text on the call, word for word and in its own voice, once it has finished what it is saying. Answers at once with the command. Needs calls:control.

Parameters

Name In Type Required Description
conversation_id path string (uuid) Yes

Body

Sent as JSON. A field this operation does not take is refused, so a typo fails loudly.

Field Type Required Description
text string Yes Said by the agent, word for word, in its voice.

Answer

202 with ConversationCommandObject.

Errors

Every error is a problem document with a stable code.

Status When
401 The key is missing, mistyped, unknown, revoked or expired.
403 The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something.
404 This key reaches no such conversation.
409 The call has not been answered, has ended, or is not a call.
422 Validation Error
429 Too many requests for this key or its organization; see Retry-After.
500 Something went wrong on our side. Quote the request_id to support.

Examples

Have the agent say something
#!/bin/sh
# Have the agent say something
curl -sS --fail-with-body -X POST "https://api.aigently.ai/v1/conversations/5b7d9f1b-3d5f-4b7d-a9f1-b3d5f7b9dbfd/say" \
  -H "Authorization: Bearer $AIGENTLY_API_KEY" \
  --json '{
  "text": "Your table for four is booked for seven this evening."
}'

Try it

Sends this request to the API from your browser, with a test key. Nothing it does rings a phone.