GET List active API keys
/api/clist/v1/workspaces/{workspaceId}/api-keys
API key scope: workspace.manage_api_keys
Never the full key or its hash: only the display prefix and last four characters.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string (uuid) | yes |
Responses
- 200
application/jsonapi_keysarray of object requiredidstring (uuid) requirednamestring or null requireddisplay_prefixstring required E.g. "clk_ab12"; the full key is never shown again.display_suffixstring required The key’s last four characters.scopesarray of string, one of: "workspace.view", "workspace.update", "workspace.manage_members", "workspace.delete", "workspace.audit_log", "workspace.manage_api_keys", "workspace.manage_groups", "workspace.manage_checklists" requiredcreated_atstring (date-time) required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.rotated_atstring (date-time) or null required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.holder_user_idstring (uuid) or null required Who holds the key: the person who created it or last rotated it (or holds the key that did). The key stops working, and is revoked, when they leave the workspace or their account is suspended or deleted; rotating it hands it to whoever rotates.null: an older key whose issuer was not recorded.holder_display_namestring or null required The holder's name while they are a member.
Errors come in the error format.
POST Create an API key
/api/clist/v1/workspaces/{workspaceId}/api-keys
API key scope: workspace.manage_api_keys
The full key is returned only in this response; store it now. the caller (or, for an API key, its holder) holds the new key; a key whose holder was never recorded cannot create or rotate keys (forbidden, holder_not_recorded).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string (uuid) | yes |
Request
Request body application/json (required): object
namestring (up to 200 characters)scopesarray of string, one of: "workspace.view", "workspace.update", "workspace.manage_members", "workspace.delete", "workspace.audit_log", "workspace.manage_api_keys", "workspace.manage_groups", "workspace.manage_checklists" required Any of the same action names the authorization layer checks.
Responses
- 201
application/jsonidstring (uuid) requirednamestring or null requireddisplay_prefixstring required E.g. "clk_ab12"; the full key is never shown again.display_suffixstring required The key’s last four characters.scopesarray of string, one of: "workspace.view", "workspace.update", "workspace.manage_members", "workspace.delete", "workspace.audit_log", "workspace.manage_api_keys", "workspace.manage_groups", "workspace.manage_checklists" requiredcreated_atstring (date-time) required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.rotated_atstring (date-time) or null required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.holder_user_idstring (uuid) or null required Who holds the key: the person who created it or last rotated it (or holds the key that did). The key stops working, and is revoked, when they leave the workspace or their account is suspended or deleted; rotating it hands it to whoever rotates.null: an older key whose issuer was not recorded.holder_display_namestring or null required The holder's name while they are a member.tokenstring required The full key. Shown here once; there is no way to see it again.
Errors come in the error format.
DELETE Revoke an API key
/api/clist/v1/workspaces/{workspaceId}/api-keys/{keyId}
API key scope: workspace.manage_api_keys
not_found for an unknown or already-revoked key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string (uuid) | yes | |
keyId | path | string (uuid) | yes |
Responses
- 204 no body
Errors come in the error format.
POST Rotate an API key
/api/clist/v1/workspaces/{workspaceId}/api-keys/{keyId}/rotate
API key scope: workspace.manage_api_keys
Issues a new value for an existing key; the old value stops working immediately. The new value is returned only here. not_found for an unknown or revoked key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string (uuid) | yes | |
keyId | path | string (uuid) | yes |
Responses
- 200
application/jsonidstring (uuid) requirednamestring or null requireddisplay_prefixstring required E.g. "clk_ab12"; the full key is never shown again.display_suffixstring required The key’s last four characters.scopesarray of string, one of: "workspace.view", "workspace.update", "workspace.manage_members", "workspace.delete", "workspace.audit_log", "workspace.manage_api_keys", "workspace.manage_groups", "workspace.manage_checklists" requiredcreated_atstring (date-time) required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.rotated_atstring (date-time) or null required UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.holder_user_idstring (uuid) or null required Who holds the key: the person who created it or last rotated it (or holds the key that did). The key stops working, and is revoked, when they leave the workspace or their account is suspended or deleted; rotating it hands it to whoever rotates.null: an older key whose issuer was not recorded.holder_display_namestring or null required The holder's name while they are a member.tokenstring required The full key. Shown here once; there is no way to see it again.
Errors come in the error format.