---
title: "Create a context"
method: POST
path: "/dashboards/v3/contexts"
tags: ["Dashboard v3 Surfaces"]
---

# Create a context

`POST /dashboards/v3/contexts`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/v3/contexts`
- 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`

## Request body

- ContextSpec: A context
  - `params` ContextParams
    - `name` string, nullable
    - `type` string, nullable
    - `files` object[], nullable
    - `background` string, nullable
    - `goals` string, nullable
    - `definitions` string, nullable
    - `emphasis` string, nullable
    - `guardrails` string, nullable

## Response `200`

A context

- ContextResponse
  - `context` object, required

## 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/9d8804f81a10?raw)
