Skip to main content
POST
/
api
/
v1
/
chats
/
{chat_id}
/
messages
Create a message
curl --request POST \
  --url https://app.sure.am/api/v1/chats/{chat_id}/messages \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "model": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "user_message",
  "role": "user",
  "content": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "model": "<string>",
  "tool_calls": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "function_name": "<string>",
      "function_arguments": {},
      "created_at": "2023-11-07T05:31:56Z",
      "function_result": {}
    }
  ],
  "ai_response_status": "pending",
  "ai_response_message": "<string>"
}

Headers

Authorization
string
required

Bearer token with write scope

Path Parameters

chat_id
string
required

Chat ID

Body

application/json
content
string
required
model
string

Response

message created

id
string<uuid>
required
type
enum<string>
required
Available options:
user_message,
assistant_message
role
enum<string>
required
Available options:
user,
assistant
content
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
chat_id
string<uuid>
required
model
string | null
tool_calls
object[] | null
ai_response_status
enum<string> | null
Available options:
pending,
complete,
failed
ai_response_message
string | null