---
title: "Revoke a publishable key"
method: DELETE
path: "/auth/publishable-keys/{id}"
tags: ["Auth"]
---

# Revoke a publishable key

`DELETE /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`

Revoke a publishable key. Website components that use it stop loading data at once, and the badges issued under it are withdrawn.

## Path parameters

- `id` integer, required

## Response `200`

Revoked, with its badges

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