---
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

## Headers

- `Authorization` 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
  - `hint` string
  - `id` string
  - `key` string
  - `last_accessed_at` string
  - `updated_at` string

## Other responses

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

---

[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/8446c4e394ac/schema)
