---
title: "Delete Workspace Public Key"
method: DELETE
path: "/v1/{workspace}/ws_public_key/{public_key_id}/"
---

# Delete Workspace Public Key

`DELETE /v1/{workspace}/ws_public_key/{public_key_id}/`

## Request

- Base URL: `https://management-api.suprsend.com`
- URL: `https://management-api.suprsend.com/v1/{workspace}/ws_public_key/{public_key_id}/`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/suprsend/apis/suprsend-api/docs/v1/:workspace/ws_public_key/:public_key_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete a public key by its `id`. The default public key (`is_default` true) cannot be deleted; rotate it instead.

## Path parameters

- `workspace` string, required
- `public_key_id` string, required

## Response `204`

Public key deleted - no response body.

## Other responses

- `400`: The default public key cannot be deleted.
- `401`: Authentication failed
- `404`: Resource not found

## Changes

- **2026-10-16** `5f0169085547`: 2 breaking, 1 info
  - response property `detail` list-of-types was widened by adding types `array and object` to media type `application/json` of response `401`
  - response property `detail` list-of-types was widened by adding types `array and object` to media type `application/json` of response `404`
  - added the non-success response with the status `400`

[Operation history](https://skmtc.dev/suprsend/apis/suprsend-api/changes/v1/:workspace/ws_public_key/:public_key_id/delete.md)

---

[API](https://skmtc.dev/suprsend/apis/suprsend-api.md) - [All operations](https://skmtc.dev/suprsend/apis/suprsend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/suprsend/apis/suprsend-api/revisions/9e64cbe802a5?raw)
