Skip to main content
POST
/
v2
/
workspaces
/
{workspace_id}
/
sessions
/
{session_id}
/
messages
Create Messages For Session
curl --request POST \
  --url http://localhost:8000/v2/workspaces/{workspace_id}/sessions/{session_id}/messages/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "content": "<string>",
      "peer_id": "<string>",
      "metadata": {},
      "configuration": {
        "deriver": {
          "enabled": true,
          "custom_instructions": "<string>"
        },
        "peer_card": {
          "use": true,
          "create": true
        }
      },
      "created_at": "2023-11-07T05:31:56Z"
    }
  ]
}
'
[
  {
    "id": "<string>",
    "content": "<string>",
    "peer_id": "<string>",
    "session_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "workspace_id": "<string>",
    "token_count": 123,
    "metadata": {}
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

workspace_id
string
required
session_id
string
required

Body

application/json

Schema for batch message creation with a max of 100 messages

messages
MessageCreate · object[]
required
Required array length: 1 - 100 elements

Response

Successful Response

id
string
required
content
string
required
peer_id
string
required
session_id
string
required
created_at
string<date-time>
required
workspace_id
string
required
token_count
integer
required
metadata
Metadata · object