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

# Create a new context

`POST /context`

Creates a new context in the specified organization.

## Request body

- ContextCreated
  - `name` string, required — The user defined name of the context.
  - `owner` union, required
    - object
      - `id` string, uuid, required — The unique ID of the owner of the context. This is the organization ID. Specify either owner/organization ID or the owner/organization slug. Find the organization ID and slug in the CircleCI web app (Organization Settings > Overview). Owner/organization slug is not supported for CircleCI server.
      - `type` 'account' | 'organization' — The type of the owner. Defaults to "organization". Use "account" if you are using CircleCI server.
    - object
      - `slug` string, required — A string that represents an organization. This is the organization slug. Specify either this or organization/owner ID. Find the organization ID and slug in the CircleCI web app (Organization Settings > Overview). Owner/organization slug is not supported for CircleCI server.
      - `type` 'organization' — The type of owner. Defaults to "organization". Accounts are only used as context owners in server and must be specified by an id instead of a slug.

## Response `200`

The new context

- object
  - `id` string, uuid, required — The unique ID of the context.
  - `name` string, required — The user-defined name of the context.
  - `created_at` string, date-time, required — The date and time the context was created.

## Other responses

- `401` — Credentials provided are invalid.
- `404` — Entity not found.
- `429` — API rate limits exceeded.
- `500` — Internal server error.

---

[API](https://skmtc.net/circleci/apis/api-v2.md) · [All operations](https://skmtc.net/circleci/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/circleci/api-v2/versions/b9c0e0c24058/schema)
