---
title: "Create or update Secret"
method: POST
path: "/apps/{app_name}/secrets/{secret_name}"
tags: ["Secrets"]
---

# Create or update Secret

`POST /apps/{app_name}/secrets/{secret_name}`

## Path parameters

- `app_name` string, required
- `secret_name` string, required

## Request body

- SetAppSecretRequest
  - `value` string

## Response `201`

Created

- SetAppSecretResponse
  - `Version` integer — DEPRECATED
  - `created_at` string
  - `digest` string
  - `name` string
  - `updated_at` string
  - `value` string
  - `version` integer

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/machines/apis/machines-api.md) · [All operations](https://skmtc.net/machines/apis/machines-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/machines/machines-api/versions/633ddedda749/schema)
