Get Workspace Key

Changed on

Retrieve a single workspace key/secret pair by its id.

The response returns the full key and secret in plain text.

get/v1/{workspace}/ws_key/{workspace_key_id}/

Request

  • Base URL: https://management-api.suprsend.com
  • URL: https://management-api.suprsend.com/v1/{workspace}/ws_key/{workspace_key_id}/
  • Auth: API key in header ServiceToken <token>

Path parameters

workspacestring required

Workspace slug (e.g. staging, production).

workspace_key_idstring required

Workspace key identifier (e.g. ws_key_...).

Response

Successfully retrieved the workspace key. Full key and secret are included.

idstring

Unique identifier of the workspace key. Format is ws_key_ followed by a 26-character ULID.

namestring

Label for the workspace key. Unique across the workspace's ws_key records.

keystring

Full workspace key value. This is the workspace_key passed to backend SDKs when authenticating (Suprsend(workspace_key, workspace_secret)). Returned in plain text on every response.

Rotation does not change key - only secret is regenerated.

secretstring

Full workspace secret. This is the workspace_secret passed to backend SDKs when authenticating (Suprsend(workspace_key, workspace_secret)). Returned in plain text on every response, not masked and not "returned once".

Anyone with read access to this response can authenticate as this workspace. Handle every list, detail, create and rotate response as sensitive data.

is_defaultboolean

Whether this is the workspace's default key/secret pair. The default record cannot be deleted; it can be rotated.

is_activeboolean

Whether this workspace key can authenticate requests.

is_deletedboolean

Whether this workspace key has been deleted.

allowed_domainsstring[]

Array of domain strings associated with the workspace key.

created_atstring date-time

Timestamp when the workspace key was created.

rotated_atstring date-time nullable

Timestamp when the workspace secret was last rotated.

deleted_atstring date-time nullable

Timestamp when the workspace key was deleted, if applicable.

Example response

{
  "id": "ws_key_01ABCDEFGHJKMNPQRSTVWXYZ0",
  "name": "ops-cli",
  "key": "SS.WSK.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "secret": "SS.WSS.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "created_by": {
    "name": "System User",
    "email": "user@example.com"
  },
  "rotated_by": {
    "name": "System User",
    "email": "user@example.com"
  },
  "deleted_by": {
    "name": "System User",
    "email": "user@example.com"
  }
}

Changes