Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

WorkOS api_keys API

Manage API keys for environments.

WorkOS api_keys API is one of 41 APIs that WorkOS publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include api_keys. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, a GitHub repository, a changelog, and pricing.

This API exposes 4 operations across 3 paths, and defines 8 schemas. It is described by OpenAPI 3.1.1, at version 1.0.

Requests are made against 2 base URLs: https://api.workos.com, https://api.workos-test.com.

4 operations 3 paths 8 schemas 1 DELETE1 GET2 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.1
API Version
1.0
Base URL
https://api.workos.com
Authentication
HTTP Bearer, HTTP Bearer
Contact
License
Resource Areas
1

Authentication & Security 2

WorkOS api_keys API declares 2 security schemes for authenticating requests. It accepts HTTP bearer tokens (JWT) (bearer). It accepts HTTP bearer tokens (JWT) (access_token). By default, every request must be authenticated.

  • bearer — Your WorkOS API key prefixed with sk. Pass it as a Bearer token: Authorization: Bearer skexample123456789.
  • access_token — An SSO access token returned from the Get a Profile and Token endpoint.

Paths & Operations 4

Across 3 paths, the API surfaces 4 operations — 1 DELETE, 1 GET, 2 POST. Each is listed below with its method, path, parameters, and response codes.

api_keys 4

Manage API keys for environments.

POST
/api_keys/validations
Validate API Key
ApiKeysController_validateApiKey body → 200401422
DELETE
/api_keys/{id}
Delete an API Key
ApiKeysController_delete 1 param → 204404
GET
/user_management/users/{userId}/api_keys
List API Keys for a User
UserApiKeysController_list 6 params → 200404
POST
/user_management/users/{userId}/api_keys
Create an API Key for a User
UserApiKeysController_create 1 param body → 201400404422

Schemas 8

The contract defines 8 schemas that model the data the API accepts and returns. The most detailed are UserApiKeyWithValue (10 properties), ApiKey (9 properties), UserApiKey (9 properties), UserApiKeyList (3 properties). Each schema is shown below with its type and property counts.

UserApiKey
object
9 properties 9 required
PaginationOrder
string
UserApiKeyList
object
3 properties 3 required
ApiKeyValidationResponse
object
1 property 1 required
ApiKey
object
9 properties 9 required
CreateUserApiKeyDto
object
3 properties 2 required
ValidateApiKeyDto
object
1 property 1 required
UserApiKeyWithValue
object
10 properties 10 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

workos-api-keys-api-openapi.yml Raw ↑

Other APIs WorkOS publishes across the network.

WorkOS admin-portal API
WorkOS application.client-secrets API
WorkOS applications API
WorkOS audit-logs API
WorkOS authorization API
WorkOS connections API
WorkOS directories API
WorkOS directory-groups API
WorkOS directory-users API
WorkOS events API
WorkOS feature-flags API
WorkOS feature-flags.targets API