---
title: "Change a publishable key's name, websites or daily cap"
method: PATCH
path: "/auth/publishable-keys/{id}"
tags: ["Auth"]
---

# Change a publishable key's name, websites or daily cap

`PATCH /auth/publishable-keys/{id}`

## Request

- Base URL: `https://api.companystack.co.uk`
- URL: `https://api.companystack.co.uk/auth/publishable-keys/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

Change a publishable key's `name`, the websites it may be used from (`allowed_origins`) or its `daily_cap`. Send only the fields to change.

## Path parameters

- `id` integer, required

## Request body

- object
  - `name` string
  - `allowed_origins` string[]
  - `daily_cap` integer, nullable

## Response `200`

Changed

## Other responses

- `401`: API key missing, malformed or revoked
- `403`: The key's plan does not include this endpoint (`code: plan_upgrade_required`, with `upgrade_url`), the key may not call it, or the key is beyond the plan's key limit after a downgrade (`code: key_limit_exceeded`: the newest keys are paused until keys are deleted or the plan upgraded)
- `404`: Not found

---

[API](https://skmtc.dev/companystack/apis/companystack-api.md) · [All operations](https://skmtc.dev/companystack/apis/companystack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/companystack/apis/companystack-api/revisions/8f3234237d2d?raw)
