---
title: "Create Workspace Public Key"
method: POST
path: "/v1/{workspace}/ws_public_key/"
---

# Create Workspace Public Key

`POST /v1/{workspace}/ws_public_key/`

Create a new public key for this workspace. Public keys can be safely distributed to client SDKs.

## Path parameters

- `workspace` string, required

## Request body

- WorkspacePublicKeyCreateRequest
  - `name` string, required — Label for the public key.
  - `description` string, nullable — Optional notes.

## Response `201`

Public key created.

- 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.net/suprsend/apis/suprsend-api.md) · [All operations](https://skmtc.net/suprsend/apis/suprsend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/suprsend/suprsend-api/versions/8bd2574bd2c3/schema)
