---
title: "Create a new context entry"
method: POST
path: "/v1/context"
tags: ["Context"]
---

# Create a new context entry

`POST /v1/context`

Creates a new context entry for the authenticated organization. All required fields must be provided.

## Request body

- CreateContextDto
  - `question` string, required — The question or topic this context entry addresses
  - `answer` string, required — The answer or detailed explanation for the question
  - `tags` string[] — Tags to categorize and help search this context entry

## Response `201`

Context entry created successfully

- object
  - `id` string
  - `organizationId` string
  - `question` string
  - `answer` string
  - `tags` string[]
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `authType` 'api-key' | 'session'

## Other responses

- `400` — Bad request - Invalid input data
- `401` — Unauthorized - Invalid or missing authentication
- `404` — Organization not found
- `500` — Internal server error

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/726b9523fb22/schema)
