API Key CREATE
POST/api_keys
Creates an SDK API key.
Required permissions: ApiKey Create or ApiKey Admin.
The response contains the plaintext key exactly once. Store it securely when it is returned. Later API key responses expose hashed_key and key_ending, but never return the plaintext key again.
Permissions are supplied as a comma-separated string. The recognized values are:
request: Required alongside an endpoint-specific permission for authenticated Collector API requests.context: Allows access to the context authentication check. Context creation and publishing require bothrequestandcontext.experiment: Allows access to experiment data. Fetching experiment data requires bothrequestandexperiment.
Unrecognized values are stored but do not grant access to Collector endpoints.
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 500
The API key was created successfully. This is the only response that includes the plaintext key.
The request is invalid or a field exceeds its maximum length.
The User API key is missing or invalid.
The authenticated user does not have permission to create API keys.
An API key with the same name already exists.
An unexpected server error occurred.