---
title: "Create or update a secret key"
method: POST
path: "/apps/{app_name}/secretkeys/{secret_name}"
tags: ["Secrets"]
---

# Create or update a secret key

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

## Path parameters

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

## Request body

- SetSecretkeyRequest
  - `type` string
  - `value` integer[]

## Response `201`

Created

- SetSecretkeyResponse
  - `Version` integer — DEPRECATED
  - `created_at` string
  - `name` string
  - `public_key` integer[]
  - `type` string
  - `updated_at` 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)
