---
title: "Enable/Disable Secure Mode on Public Key"
method: PATCH
path: "/v1/{workspace}/ws_public_key/{public_key_id}/"
---

# Enable/Disable Secure Mode on Public Key

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

Enable or disable secure mode on an existing public key (e.g. `ws_pubk_...`).

## Path parameters

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

## Request body

- WorkspacePublicKeyPatchRequest
  - `is_secure_mode_enabled` boolean, required — Enable or disable secure mode for this public key.

## Response `202`

Secure mode update accepted.

- ManagementWorkspacePublicKey — Workspace public key used by client SDKs.
  - `id` string — Unique identifier of the public key.
  - `api_key` string — Public key value exposed to clients.
  - `name` string — Label for the public key.
  - `allowed_domains` string[], nullable — Domains allowed to use this public key.
  - `is_secure_mode_enabled` boolean — Indicates whether secure mode is enabled for this key.
  - `is_deleted` boolean — Indicates whether the public key has been deleted.
  - `is_default` boolean — Indicates whether this is the default public key for the workspace.
  - `created_at` string, date-time — Timestamp when the public key was created.
  - `created_by` ManagementActor, nullable — Identity that performed an action (created, updated, rolled, deleted, rotated).
    - `name` string — Display name of the actor.
    - `email` string — Email address of the actor.
  - `rotated_at` string, date-time, nullable — Timestamp when the public key was last rotated.
  - `rotated_by` ManagementActor, nullable — Identity that performed an action (created, updated, rolled, deleted, rotated).
    - `name` string — Display name of the actor.
    - `email` string — Email address of the actor.
  - `updated_at` string, date-time — Timestamp when the public key was last updated.
  - `updated_by` ManagementActor, nullable — Identity that performed an action (created, updated, rolled, deleted, rotated).
    - `name` string — Display name of the actor.
    - `email` string — Email address of the actor.

## Other responses

- `400` — Validation error - data validation failed
- `401` — Authentication failed
- `404` — Resource not found

---

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