Context

Asynchronously queue context data to add to the context processor

POST
/api/v1/context/add-async

This endpoint accepts context data and queues it for asynchronous processing by the context processor. It returns a success or error response depending on the queuing result.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

documents*array<>

Array of documents with content and additional metadata

source*string

The source of the context data

context_type*string

Type of context being added

Value in

  • "resource"
  • "conversation"
  • "instruction"
scope*string

Scope of the context

Default"internal"

Value in

  • "internal"
  • "external"
metadata?

Additional metadata for the context

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/context/add-async" \  -H "Content-Type: application/json" \  -d '{    "documents": [      {        "content": "Customer asked about pricing for the Scale plan."      }    ],    "source": "support-inbox",    "context_type": "resource",    "scope": "internal",    "metadata": {      "fileName": "support_thread_TCK-1234.txt",      "fileType": "text/plain",      "groupName": [        "support",        "pricing"      ],      "lastModified": "2025-01-10T12:34:56.000Z",      "fileSize": 2048    }  }'
{  "queued": true,  "jobId": "string"}