---
title: "Add a new secret"
method: POST
path: "/fastedge/v1/secrets"
tags: ["FastEdge Secrets"]
---

# Add a new secret

`POST /fastedge/v1/secrets`

Create a new encrypted secret for use in edge applications.
Secrets are encrypted with AES-256-GCM and can have multiple time-based slots for rotation.

## Request body

- object
  - `name` string, required — The unique name of the secret.
  - `comment` string — A description or comment about the secret.
  - `app_count` integer — The number of applications that use this secret.
  - `secret_slots` SecretSlot[] — A list of secret slots associated with this secret.
    - `slot` integer, required — Unix timestamp (seconds since epoch) indicating when this secret version becomes active. Use for time-based secret rotation.
    - `value` string — The plaintext secret value. Will be encrypted with AES-256-GCM before storage.
    - `checksum` string — SHA-256 hash of the decrypted value for integrity verification (auto-generated)

## Response `200`

Secret created successfully, returns secret metadata with unique ID

- object
  - `name` string — The unique name of the secret.
  - `comment` string — A description or comment about the secret.
  - `app_count` integer — The number of applications that use this secret.
  - `secret_slots` SecretSlot[] — A list of secret slots associated with this secret.
    - `slot` integer, required — Unix timestamp (seconds since epoch) indicating when this secret version becomes active. Use for time-based secret rotation.
    - `value` string — The plaintext secret value. Will be encrypted with AES-256-GCM before storage.
    - `checksum` string — SHA-256 hash of the decrypted value for integrity verification (auto-generated)
  - `id` integer — The unique identifier of the secret.

## Other responses

- `400` — Bad request
- `503` — Service unavailable

---

[API](https://skmtc.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
