Chat with this agent draft in text - no publish, no dial, no recording
POST
/v1/agents/{agent_id}/chat
const url = 'https://api.vocapable.com/v1/agents/example/chat';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"messages":[{"role":"user","content":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/agents/example/chat \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "messages": [ { "role": "user", "content": "example" } ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”agent_id
required
Agent Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
AgentChatRequest
The full visible transcript, oldest first, ending with the user’s new message.
object
messages
required
Messages
Array<object>
AgentChatMessageobject
role
required
Role
string
content
required
Content
string
Responses
Section titled “Responses”Server-sent events: delta / guard / proposal / done / problem.
Examplegenerated
examplestring
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}