---
title: "Create or update a secret set"
method: PUT
path: "/secrets/{setName}"
---

# Create or update a secret set

`PUT /secrets/{setName}`

Create a new secret set or update an existing one. Supports both regular secrets (multiple key-value pairs) and image pull secrets.

Provisioning is **asynchronous**: the response is `202 Accepted` once the values have been stored, and the secret set is then provisioned into the target region in the background. Use `GET /secrets/{setName}` to observe the readiness status (`pending` → `ready`). Deploys that bind a secret set whose status is not `ready` are rejected with `409 Conflict`.

## Path parameters

- `setName` string, required

## Request body

- union
  - RegularSecretsRequest
    - `secrets` object[], required — Array of secret key-value pairs
      - `secretKey` string, required — Name of the secret key
      - `secretValue` string, required — Value of the secret
    - `region` string — The region where the secret set will be created. If not specified, defaults to the organization's default region. Secrets must be in the same region as the agents that use them. Cannot be changed after creation.
  - ImagePullSecretRequest
    - `isImagePullSecret` true, required — Must be true for image pull secrets
    - `host` string, uri, required — Host URL. A trailing slash will be added automatically if not present.
    - `secretValue` string, required — Authentication token or credentials
    - `region` string — The region where the secret set will be created. If not specified, defaults to the organization's default region. Secrets must be in the same region as the agents that use them.

## Response `202`

Secret set accepted. Values have been stored and the set is being provisioned into the target region in the background. Poll `GET /secrets/{setName}` until `status` is `ready` before binding it to a deploy.

- object
  - `status` 'OK', required
  - `region` string, required — The region where the secret set was created or exists

## Other responses

- `400` — Bad request - Invalid parameters or operation not allowed
- `401` — Unauthorized - Invalid or missing API key
- `409` — Conflict - Another request is modifying this secret set concurrently. Retry the request.
- `500` — Internal server error

---

[API](https://skmtc.dev/pipecat/apis/pipecat-cloud.md) · [All operations](https://skmtc.dev/pipecat/apis/pipecat-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pipecat/pipecat-cloud/revisions/acd0f7dfe734/schema)
