Skip to main content

Assistant Chat

POST 
/ai/assistants/:assistant_id/chat

This endpoint allows a client to send a chat message to a specific AI Assistant. The assistant processes the message and returns a relevant reply based on the current conversation context.

Request

Path Parameters

    assistant_id Assistant Idrequired

Body

required

    content Content (string)required

    The message content sent by the client to the assistant

    name Name (string)

    The optional display name of the user sending the message

    conversation_id Conversation Id (string)required

    A unique identifier for the conversation thread, used to maintain context

Responses

200: Successful Response

422: Validation Error

Request samples


curl -L 'https://api.telnyx.com/v2/ai/assistants/:assistant_id/chat' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"content": "Tell me a joke about cats",
"name": "Charlie",
"conversation_id": "42b20469-1215-4a9a-8964-c36f66b406f4"
}'

Response samples


{
"content": "Why did the cat sit on the computer? Because it wanted to keep an eye on the mouse!"
}