Skip to main content
POST
/
messages
Create Message
curl --request POST \
  --url https://api.example.com/messages \
  --header 'Content-Type: application/json' \
  --data '
{
  "task_id": "<string>",
  "content": {
    "content": "<string>",
    "type": "text",
    "style": "static",
    "format": "plain",
    "attachments": [
      {
        "file_id": "<string>",
        "name": "<string>",
        "size": 123,
        "type": "<string>"
      }
    ]
  },
  "created_at": "2023-11-07T05:31:56Z"
}
'
{
  "task_id": "<string>",
  "content": {
    "content": "<string>",
    "type": "text",
    "style": "static",
    "format": "plain",
    "attachments": [
      {
        "file_id": "<string>",
        "name": "<string>",
        "size": 123,
        "type": "<string>"
      }
    ]
  },
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
task_id
string
required
content
TextContent · object
required
streaming_status
enum<string> | null
Available options:
IN_PROGRESS,
DONE
created_at
string<date-time> | null

Optional timestamp for the message. Workflow callers should pass workflow.now() (Temporal's deterministic monotonic clock) so that two awaited messages.create calls from the same workflow are guaranteed to have monotonic timestamps regardless of HTTP scheduling at the server. If omitted, the server's wall clock at insert time is used.

Response

Successful Response

Represents a message in the agent system.

This entity is used to store messages in MongoDB, with each message associated with a specific task.

task_id
string
required

ID of the task this message belongs to

content
TextContent · object
required

The content of the message. This content is not OpenAI compatible. These are messages that are meant to be displayed to the user.

id
string | null

The task message's unique id

streaming_status
enum<string> | null
Available options:
IN_PROGRESS,
DONE
created_at
string<date-time> | null

The timestamp when the message was created

updated_at
string<date-time> | null

The timestamp when the message was last updated