---
title: "Store or update a vault secret"
method: POST
path: "/api/v1/secrets"
tags: ["Secrets"]
---

# Store or update a vault secret

`POST /api/v1/secrets`

Stores a secret in the workflow-visible vault. Anything stored here may be used by workflows.

## Request body

- CreateSecretRequest — Request to store or update a secret.
  - `name` string, required — Secret name or destination path for file secrets.
  - `value` string, required — The secret value to store.
  - `type` 'token' | 'oauth' | 'file', required — Schema of a stored secret.
  - `description` string — Optional operator-facing description of the secret.

## Response `200`

Secret stored

- SecretMetadata — Metadata for a stored secret (value is never exposed).
  - `name` string, required — Secret key name or destination path.
  - `type` 'token' | 'oauth' | 'file', required — Schema of a stored secret.
  - `description` string — Optional operator-facing description of the secret.
  - `created_at` string, date-time, required — When the secret was first stored.
  - `updated_at` string, date-time, required — When the secret was last updated.

## Other responses

- `400` — Invalid secret name or request body

---

[API](https://skmtc.net/fabro-sh/apis/fabro-run-api.md) · [All operations](https://skmtc.net/fabro-sh/apis/fabro-run-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fabro-sh/fabro-run-api/revisions/bee030053823/schema)
