---
title: "Put Secret"
method: POST
path: "/api/v1/config/secrets"
tags: ["secrets"]
---

# Put Secret

`POST /api/v1/config/secrets`

## 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/config/secrets`
- Auth: none declared

Store a new ciphertext version + reconcile grants. Server never sees plaintext.

## Headers

- `authorization` string, nullable

## Request body

- SecretPut: Store a new ciphertext version of a secret. Server never sees plaintext.
  - `name` string, required
  - `ciphertext` string, required: Armored age ciphertext
  - `recipients_snapshot` string[], required: Fingerprints the ciphertext was encrypted to
  - `grant_pubkey_ids` string[], required: Recipient pubkey ids to grant (must be active)

## Response `201`

Successful Response

- SecretPutResponse: Result of a put.
  - `name` unknown, required
  - `version_number` unknown, required
  - `status` unknown, required
  - `rotation_needed` unknown, required

## 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)
