---
title: "Set ad slot secrets"
method: PUT
path: "/v1/ad-slots/{id}/secrets"
tags: ["ad-slots"]
---

# Set ad slot secrets

`PUT /v1/ad-slots/{id}/secrets`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/ad-slots/{id}/secrets`
- Auth: HTTP bearer

Store the exchange credential for an ad slot. Send a map of reference names to values; the values are encrypted at rest and merged into any existing credentials. Setting a value to `null` deletes that reference. Only the credential names are ever returned, never the values.

**Notes.**
- Values are encrypted and never returned. Validation errors answer 400, not 422.

## Path parameters

- `id` string, required

## Request body

- object
  - `secrets` object, required: Secret name → value (up to 20 names of up to 128 characters; values up to 8192). Null or empty removes that secret; names you do not send are kept.

## Response `200`

Success.

- object
  - `data` object, required
    - `ok` true, required
    - `refs` string[], required: Every secret name that now holds a value.

## Other responses

- `400`: `too_many_secrets`, `ref_too_long` or `value_too_long`.
- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `404`: No such ad slot in this workspace.
- `409`: The slot settings or secrets changed while this request ran. Nothing was saved; send it again.
- `429`: More than 30 calls a minute.
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
