Add a message to a specific thread
cURL
curl --request POST \ --url https://api.anyapi.ai/v1/threads/{thread_id}/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "role": "user", "content": "<string>" } '
{ "id": "<string>", "object": "message", "thread_id": "<string>", "role": "<string>", "content": [ {} ], "created_at": 123 }
Bearer token authentication. Get your API key from the dashboard.
The ID of the thread
Role of the message sender
user
assistant
Message content
Message created successfully
Message ID
"message"
Thread ID
Message role
Creation timestamp