---
title: "Asynchronously queue context data to add to the context processor"
method: POST
path: "/api/v1/context/async/add"
tags: ["context"]
---

# Asynchronously queue context data to add to the context processor

`POST /api/v1/context/async/add`

## Request

- Base URL: `https://platform-backend.getalchemystai.com`
- URL: `https://platform-backend.getalchemystai.com/api/v1/context/async/add`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/docs/api/v1/context/async/add/post.ts> (a function with typed inputs; its response is checked against the schema)

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
  - `webhook_ids` string[]: Optional IDs of webhooks to trigger after the context is processed

## 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-11-09** `2650e0435c8b`: 1 info
  - api operation id `addContextAsync` removed and replaced with `addContextAsyncV2`
- **2026-11-09** `f416d672a956`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/changes/api/v1/context/async/add/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.dev/alchemyst-ai/apis/alchemyst-ai-api-v1-documentation/revisions/2650e0435c8b?raw)
