Skip to main content
POST
/
ai
/
conversations
/
{conversation_id}
/
message
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.ai.conversations.addMessage('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
  role: 'role',
});

console.log(response);
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

conversation_id
string<uuid>
required

The ID of the conversation The ID of the conversation

Body

application/json
role
string
required
content
string
default:""
name
string
tool_choice
tool_calls
Tool Calls · object[]
tool_call_id
string
sent_at
string<date-time>
metadata
Metadata · object

Response

Successful Response