---
title: "Asynchronously queue context data to add to the context processor"
method: POST
path: "/api/v1/context/add-async"
tags: ["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.

## Request body

- object
  - `documents` object[], required — Array of documents with content and additional metadata
    - `content` string — The content of the document
  - `source` string, required — The source of the context data
  - `context_type` 'resource' | 'conversation' | 'instruction', required — Type of context being added
  - `scope` 'internal' | 'external', required — Scope of the context
  - `metadata` object — Additional metadata for the context
    - `fileName` string — Name of the file
    - `fileType` string — Type/MIME of the file
    - `groupName` string[] — Array of Group Name to which the file belongs to
    - `lastModified` string — Last modified timestamp
    - `fileSize` number — Size of the file in bytes

## Response `201`

Context queued successfully

- object
  - `queued` boolean, required
  - `jobId` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Not Found - Invalid context data format
- `500` — Internal Server Error

## Changes

- **2026-01-03** `510cbb709bed` — 3 breaking, 6 info
  - the request property `context_type` became required
  - the request property `documents` became required
  - the request property `source` became required
  - the request property `scope` with a default value became required
  - …5 more
- **2025-12-24** `3f676384b4bb` — 1 info
  - api operation id `addContextAsync` was added
- **2025-12-10** `601abf4c6518` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/changes/api/v1/context/add-async/post.md)

---

[API](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation.md) · [All operations](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/alchemyst-ai/alchemyst-ai-api-v1-documentation/revisions/af43a0360c78/schema)
