---
title: "Create secret"
method: POST
path: "/api/v1/secrets"
tags: ["Secrets"]
---

# Create secret

`POST /api/v1/secrets`

## Request

- Base URL: `https://api.getcortexapp.com`
- URL: `https://api.getcortexapp.com/api/v1/secrets`
- Auth: HTTP bearer

API key must have the `Create secrets` permission.

## Request body

- CreateSecretRequest
  - `name` string, required: Human-readable name for the secret
  - `secret` string, required: Value of the secret
  - `tag` string, required: Unique identifier for the secret

## Response `200`

Successfully created secret

- SecretResponse
  - `id` string, required: Unique, immutable, 18-character auto-generated identifier for the secret
  - `name` string: Human-readable name for the secret
  - `tag` string, required: Unique identifier for the secret

## Other responses

- `400`: Bad Request
- `429`: The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.

## Changes

- **2026-11-03** `a7b058663c95`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cortex/apis/cortex-api/changes/api/v1/secrets/post.md)

---

[API](https://skmtc.dev/cortex/apis/cortex-api.md) - [All operations](https://skmtc.dev/cortex/apis/cortex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cortex/apis/cortex-api/revisions/a7b058663c95?raw)
