---
title: "POST /v1/projects/{projectOrProductUID}/secrets"
method: POST
path: "/v1/projects/{projectOrProductUID}/secrets"
tags: ["project"]
---

# POST /v1/projects/{projectOrProductUID}/secrets

`POST /v1/projects/{projectOrProductUID}/secrets`

Create a new project secret

## Request body

- CreateProjectSecretRequest
  - `name` string, required — The secret name (alphanumeric and underscores only).
  - `value` string, required — The secret value (encrypted at rest, never returned after creation).

## Response `201`

Secret created successfully

- ProjectSecret — Metadata for a project secret. The value is never returned.
  - `created` string, date-time, required — When the secret was first created.
  - `created_by` string, required — The actor who created the secret.
  - `modified` string, date-time — When the secret was last updated.
  - `modified_by` string — The actor who last updated the secret.
  - `name` string, required — The secret name (alphanumeric and underscores only).

## Other responses

- `400` — The response body in case of an API error.
- `409` — The response body in case of an API error.
- `default` — The response body in case of an API error.

## Changes

- **2026-07-10** `1887e880199a` — 3 breaking, 18 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `400`
  - the response's body type/format changed from ``/`` to `object`/`` for status `409`
  - the response's body type/format changed from ``/`` to `object`/`` for status `default`
  - added the optional property `debug` to the response with the `400` status
  - …17 more
- **2026-05-18** `26e1bce6c807` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/notefile/apis/notehub-api/changes/v1/projects/:projectOrProductUID/secrets/post.md)

---

[API](https://skmtc.dev/notefile/apis/notehub-api.md) · [All operations](https://skmtc.dev/notefile/apis/notehub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/notefile/notehub-api/revisions/9c5b2b63a991/schema)
