Skip to main content
POST
/
api
/
v1
/
contexts
/
{context_id}
/
history
Add Context History Item
curl --request POST \
  --url https://api.example.com/api/v1/contexts/{context_id}/history \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "artifactId": "<string>",
  "parts": [
    {
      "text": "<string>",
      "kind": "text",
      "metadata": {}
    }
  ],
  "description": "<string>",
  "extensions": [
    "<string>"
  ],
  "metadata": {},
  "name": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

context_id
string<uuid>
required

Body

application/json

Represents a file, data structure, or other resource generated by an agent during a task.

artifactId
string
required
parts
(TextPart · object | FilePart · object | DataPart · object)[]
required

Represents a text segment within a message or artifact.

description
string | null
extensions
string[] | null
metadata
Metadata · object
name
string | null

Response

Successful Response