---
title: "Upsert secret"
method: POST
path: "/v1/admin/secrets/{secret_key}"
tags: ["Admin"]
---

# Upsert secret

`POST /v1/admin/secrets/{secret_key}`

Create or update a secret

## Path parameters

- `secret_key` string, required

## Request body

- SchemasUpsertStoredSecretRequest
  - `description` string
  - `value` string, required

## Response `200`

OK

- SchemasStoredSecretResponse
  - `binding` SchemasBindingResponse
    - `id` string
    - `type` 'static' | 'tenant' | 'project' | 'account'
  - `created_at` string
  - `description` string
  - `id` string
  - `key` string
  - `last_accessed_at` string
  - `updated_at` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

## Changes

- **2026-02-18** `2a6c58164e9f` — 1 warning
  - removed the optional property `hint` from the response with the `200` status
- **2026-02-11** `52e6cce28fab` — 1 info
  - the `value` request property's maxLength was increased from `1000` to `5000`
- **2025-10-30** `f59a2fe653b8` — 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `Bearer` was added to the API

[Change history](https://skmtc.dev/arcadeai/apis/arcade-api/changes/v1/admin/secrets/:secret_key/post.md)

---

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