Acontext
SessionSession_idMessages

Store message to session

POST
/session/{session_id}/messages

Supports JSON and multipart/form-data. In multipart mode: the payload is a JSON string placed in a form field. The format parameter indicates the format of the input message (default: openai, same as GET). The blob field should be a complete message object: for openai, use OpenAI ChatCompletionMessageParam format (with role and content); for anthropic, use Anthropic MessageParam format (with role and content); for acontext (internal), use {role, parts} format. The optional meta field allows attaching user-provided metadata to the message, which can be retrieved via get_messages().metas or updated via patch_message_meta().

Authorization

BearerAuth
Authorization<token>

Project Bearer token (e.g., "Bearer sk-ac-xxxx")

In: header

Path Parameters

session_id*string

Session ID

Formatuuid

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://loading/api/v1/session/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages" \  -H "Content-Type: application/json" \  -d '{}'
{
  "code": 0,
  "error": "string",
  "msg": "string",
  "data": {
    "created_at": "string",
    "id": "string",
    "meta": {},
    "parent_id": "string",
    "parts": [
      {}
    ],
    "role": "string",
    "session_id": "string",
    "session_task_process_status": "string",
    "task_id": "string",
    "updated_at": "string"
  }
}