---
title: "Read a context file into slot suggestions"
method: POST
path: "/dashboards/v3/contexts/extract"
tags: ["Dashboard v3 Surfaces"]
---

# Read a context file into slot suggestions

`POST /dashboards/v3/contexts/extract`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/v3/contexts/extract`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

One dropped knowledge-base file -> the context editor's slot suggestions (background / goals / definitions / emphasis / guardrails), or a rejection the editor renders as a reason. Declared BEFORE /v3/contexts/{context_id} so `extract` is not matched as a context id.

## Request body

- ContextExtractSpec: A context file to read into slot suggestions
  - `params` ContextExtractParams, required
    - `name` string, required
    - `size` integer
    - `type` string, nullable
    - `text` string, nullable
    - `content` string, nullable

## Response `200`

Slot suggestions read from a context file

- ContextExtractResponse
  - `file` object
  - `rejected` object, nullable
  - `shape` object, nullable
  - `figureHeavy` string[]
  - `suggestions` object
  - `condensed` object
  - `skipped` object, nullable

## Other responses

- `201`: Document created, URL follows
- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/5dfd1c296ded?raw)
