---
title: "Changes to Create a new secret. The value is encrypted before storage and will be\nmounted as a file at `/run/secrets/<KEY>` on the next deployment.\nThe plaintext value is NOT returned — the response carries only metadata."
method: POST
path: "/projects/{project_id}/secrets"
---

# Changes to Create a new secret. The value is encrypted before storage and will be
mounted as a file at `/run/secrets/<KEY>` on the next deployment.
The plaintext value is NOT returned — the response carries only metadata.

`POST /projects/{project_id}/secrets`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 9 of 383 revisions.

- **2026-11-26** `e1864d950604`: 2 breaking
- **2026-11-25** `480a86944327`: 1 info
- **2026-09-07** `cdc1afae1752`: 3 info
- **2026-09-07** `f7404eb7ac98`: 1 breaking, 1 warning, 1 info
- **2026-08-17** `bd326cf0ea13`: 2 info
- **2026-08-16** `f1f92adbf662`: 1 info
- **2026-08-16** `94610ce6c9b8`: 1 info
- **2026-08-16** `276373b7abcb`: 1 info
- **2026-05-30** `b72341d12f63`: 1 info

## Changes

- **2026-11-26** `e1864d950604`: 2 breaking
  - the `created_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
  - the `updated_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
- **2026-11-25** `480a86944327`: 1 info
  - the endpoint scheme security `bearer_auth` was added to the API
- **2026-09-07** `cdc1afae1752`: 3 info
  - added the new optional request property `compose_services`
  - the `include_in_preview` request property default value `false` was added
  - added the required property `compose_services` to the response with the `201` status
- **2026-09-07** `f7404eb7ac98`: 1 breaking, 1 warning, 1 info
  - removed the required property `compose_services` from the response with the `201` status
  - removed the request property `compose_services`
  - the `include_in_preview` request property default value `false` was removed
- **2026-08-17** `bd326cf0ea13`: 2 info
  - added the new optional request property `compose_services`
  - added the required property `compose_services` to the response with the `201` status
- **2026-08-16** `f1f92adbf662`: 1 info
  - the `include_in_preview` request property default value `false` was added
- **2026-08-16** `94610ce6c9b8`: 1 info
  - the `include_in_preview` request property default value `false` was removed
- **2026-08-16** `276373b7abcb`: 1 info
  - the `include_in_preview` request property default value `false` was added
- **2026-05-30** `b72341d12f63`: 1 info
  - endpoint added

---

[Operation](https://skmtc.dev/gotempsh/apis/temps/docs/projects/:project_id/secrets/post.md) - [API](https://skmtc.dev/gotempsh/apis/temps.md) - [Page](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/secrets/post)
