SuprSend Ws Api Key API
The Ws Api Key API from SuprSend — 2 operation(s) for ws api key.
The Ws Api Key API from SuprSend — 2 operation(s) for ws api key.
openapi: 3.1.1
info:
title: SuprSend Broadcast Ws Api Key API
description: APIs supported on suprsend platform
version: 1.2.2
servers:
- url: https://hub.suprsend.com
security:
- sec0: []
- BearerAuth: []
tags:
- name: Ws Api Key
paths:
/v1/{workspace}/ws_api_key/:
get:
summary: List Workspace API Keys
description: List API keys scoped to a workspace. Secret values are never returned on list; only a masked preview is shown.
operationId: list-workspace-api-keys
servers:
- url: https://management-api.suprsend.com
security:
- ServiceTokenAuth: []
x-codeSamples:
- lang: cURL
label: List Workspace API Keys
source: "curl -X GET \"https://management-api.suprsend.com/v1/{workspace}/ws_api_key/\" \\\n --header 'Authorization: ServiceToken <SERVICE_TOKEN>' \\\n --header 'Content-Type: application/json'\n"
parameters:
- in: path
name: workspace
required: true
schema:
type: string
description: Workspace slug (e.g. `staging`, `production`).
responses:
'200':
description: Successfully retrieved API keys.
content:
application/json:
schema:
$ref: '#/components/schemas/ManagementWorkspaceApiKeyListResponse'
example:
meta:
count: 1
limit: 10
offset: 0
results:
- id: ws_apik_exampleId01
masked_api_key: SS.XXXXXXX*****
is_deleted: false
name: backend-prod
allowed_domains: []
created_at: '2026-04-21T12:19:00.148846Z'
created_by:
name: System User
email: org_XXXXXXXXXXXXXXXXXXXXXX@systemuser.suprsend.com
deleted_at: null
deleted_by: null
'401':
$ref: '#/components/responses/AuthenticationError'
'404':
$ref: '#/components/responses/NotFoundError'
tags:
- Ws Api Key
post:
summary: Create Workspace API Key
description: 'Create a new API key scoped to this workspace.
The full `api_key` secret is returned **only once** in the create response. Store it securely - it cannot be retrieved later.
'
operationId: create-workspace-api-key
servers:
- url: https://management-api.suprsend.com
security:
- ServiceTokenAuth: []
x-codeSamples:
- lang: cURL
label: Create API Key
source: "curl -X POST \"https://management-api.suprsend.com/v1/{workspace}/ws_api_key/\" \\\n --header 'Authorization: ServiceToken <SERVICE_TOKEN>' \\\n --header 'Content-Type: application/json' \\\n --data '{\"name\":\"backend-prod\",\"description\":\"Primary backend key\"}'\n"
parameters:
- in: path
name: workspace
required: true
schema:
type: string
description: Workspace slug (e.g. `staging`, `production`).
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorkspaceApiKeyCreateRequest'
example:
name: backend-prod
description: Primary backend key
responses:
'201':
description: API key created. `api_key` is returned only once - store it securely.
content:
application/json:
schema:
$ref: '#/components/schemas/ManagementWorkspaceApiKeyCreateResponse'
example:
id: ws_apik_exampleId01
masked_api_key: SS.XXXXXXX*****
is_deleted: false
name: backend-prod
allowed_domains: []
created_at: '2026-04-21T12:19:00.148846Z'
created_by:
name: System User
email: org_XXXXXXXXXXXXXXXXXXXXXX@systemuser.suprsend.com
deleted_at: null
deleted_by: null
api_key: SS.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/AuthenticationError'
'404':
$ref: '#/components/responses/NotFoundError'
tags:
- Ws Api Key
/v1/{workspace}/ws_api_key/{api_key_id}/:
delete:
summary: Delete API Key
description: Delete an API key by its `id` (e.g. `ws_apik_...`). Once disabled, the key can no longer authenticate requests.
operationId: disable-workspace-api-key
servers:
- url: https://management-api.suprsend.com
security:
- ServiceTokenAuth: []
x-codeSamples:
- lang: cURL
label: Delete API Key
source: "curl -X DELETE \"https://management-api.suprsend.com/v1/{workspace}/ws_api_key/{api_key_id}/\" \\\n --header 'Authorization: ServiceToken <SERVICE_TOKEN>'\n"
parameters:
- in: path
name: workspace
required: true
schema:
type: string
description: Workspace slug (e.g. `staging`, `production`).
- in: path
name: api_key_id
required: true
schema:
type: string
description: API key identifier (e.g. `ws_apik_...`).
responses:
'204':
description: API key disabled - no response body.
'401':
$ref: '#/components/responses/AuthenticationError'
'404':
$ref: '#/components/responses/NotFoundError'
tags:
- Ws Api Key
components:
responses:
ValidationError:
description: Validation error - data validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFoundError:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: 404
error_code: not_found
type: NotFound
message: workspace 'demo' not found
detail: workspace 'demo' not found
AuthenticationError:
description: Authentication failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
code: 401
error_code: authentication_failed
type: AuthenticationFailed
message: Invalid service token.
detail: Invalid service token.
schemas:
ManagementWorkspaceApiKey:
type: object
description: Workspace-scoped REST API key (server-side secret).
properties:
id:
type: string
description: Unique identifier of the API key.
example: ws_apik_exampleId01
masked_api_key:
type: string
description: Masked preview of the API key used in list responses.
example: SS.XXXXXXX*****
is_deleted:
type: boolean
description: Indicates whether the API key has been deleted.
name:
type: string
description: Label for the API key.
example: backend-prod
allowed_domains:
type: array
items:
type: string
description: Domains allowed to use this key.
created_at:
type: string
format: date-time
description: Timestamp when the API key was created.
created_by:
$ref: '#/components/schemas/ManagementActor'
deleted_at:
type: string
format: date-time
nullable: true
description: Timestamp when the API key was deleted, if applicable.
deleted_by:
$ref: '#/components/schemas/ManagementActor'
ManagementActor:
type: object
description: Identity that performed an action (created, updated, rolled, deleted, rotated).
nullable: true
properties:
name:
type: string
description: Display name of the actor.
example: System User
email:
type: string
description: Email address of the actor.
example: user@example.com
ManagementWorkspaceApiKeyListResponse:
type: object
properties:
meta:
$ref: '#/components/schemas/ManagementListMeta'
results:
type: array
items:
$ref: '#/components/schemas/ManagementWorkspaceApiKey'
WorkspaceApiKeyCreateRequest:
type: object
required:
- name
properties:
name:
type: string
description: Label for the API key.
example: backend-prod
description:
type: string
nullable: true
description: Optional notes for operators.
ManagementWorkspaceApiKeyCreateResponse:
allOf:
- $ref: '#/components/schemas/ManagementWorkspaceApiKey'
- type: object
properties:
api_key:
type: string
description: Full secret API key. Returned only once at creation - store it securely and never commit to source control.
example: SS.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ErrorResponse:
type: object
properties:
code:
type: integer
description: HTTP status code
error_code:
type: string
description: Specific error code identifier
type:
type: string
description: Error type classification
message:
type: string
description: Human-readable error message
detail:
type: string
description: Additional error details
ManagementListMeta:
type: object
description: Pagination metadata (when applicable)
properties:
count:
type: integer
description: Total items matching the query
limit:
type: integer
nullable: true
description: Maximum number of results returned per page.
offset:
type: integer
nullable: true
description: Starting position of the returned results.
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: API_Key
description: Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard Developers -> API Keys section.
ServiceTokenAuth:
type: apiKey
in: header
name: ServiceToken <token>
description: You can get Service Token from [SuprSend dashboard -> Account Settings -> Service Tokens](https://app.suprsend.com/en/account-settings/service-tokens) section.
sec0:
type: apiKey
in: header
name: Authorization
x-bearer-format: bearer
description: Bearer authentication header of the form `Bearer <token>`, where <token> is your auth token.
x-readme:
headers: []
explorer-enabled: true
proxy-enabled: true
x-readme-fauxas: true