---
title: "Create Context"
method: POST
path: "/api/v1/contexts"
tags: ["contexts"]
---

# Create Context

`POST /api/v1/contexts`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/contexts`
- Auth: none declared

Create a new context.

Issue #115 Phase B: Contexts are created under user's current workspace.

Args:
    request: Context creation request

Returns:
    Created context data

Raises:
    400: If context name is invalid or already exists
    400: If user has no workspace

## Headers

- `authorization` string, nullable

## Request body

- ContextCreate: Request model for creating a context. Issue #146: Now requires embedding model selection (immutable after creation).
  - `name` string, required: Context name (lowercase alphanumeric, hyphen, underscore)
  - `display_name` string, nullable: Human-readable display name (optional, defaults to name)
  - `description` string, nullable: Optional context description
  - `summary` string, nullable: LLM-oriented context summary
  - `usage_guide` string, nullable: LLM-oriented memory usage guidelines
  - `embedding_model` string, nullable: Embedding model for this context. Default: global EMBEDDING_MODEL setting. Immutable after creation.
  - `is_private` boolean: Privacy: TRUE=private (creator only), FALSE=shared (workspace members)

## Response `201`

Successful Response

- ContextResponse: Response model for context data.
  - `id` unknown, required
  - `name` unknown, required
  - `display_name` unknown
  - `description` unknown
  - `summary` unknown
  - `usage_guide` unknown
  - `is_default` unknown, required
  - `is_private` unknown
  - `is_public` unknown
  - `resource_id` unknown
  - `writes_paused` unknown
  - `is_locked` unknown
  - `sleep_mode` unknown
  - `created_by` unknown
  - `created_by_name` unknown
  - `created_at` unknown, required
  - `updated_at` unknown
  - `use_rerank` unknown
  - `reranker_provider` unknown
  - `embedding_model` unknown
  - `embedding_dimensions` unknown
  - `member_count` unknown
  - `memory_count` unknown
  - `last_activity_at` unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
