post https://api.split.io/internal/api/v2/apiKeys
Create and add an API key to your account.
Access requirements
The Authorization Bearer (Admin API Key authorizing the request) must have one of the following roles and scopes:
Admin API Key roles accepted
- API_ALL_GRANTED
- API_APIKEY
Admin API Key scopes accepted
- GLOBAL
- WORKSPACE*
To learn more about Admin API Key roles and scopes, see API keys overview.
JSON Payload
supported types
client_side
orserver_side
for SDK usageadmin
for Public API usage
scopes setup
workspace
and singleenvironment
are required forclient_side
andserver_side
keys- null
workspace
and emptyenvironments
to setup anadmin
key withGLOBAL
scope - valid
workspace
and emptyenvironments
to setup anadmin
key withWORKSPACE
scope - valid
workspace
and 1..Nenvironments
to setup anadmin
key withENVIRONMENT
scope
roles
- Supported only for
admin
keys. For the full list of allowed Admin API Key roles, see API keys overview.
{
"name": "<api_key_name>",
"apiKeyType": "<api_key_type>",
"environments": [
{
"type": "environment",
"id": "<environment_id>"
}
],
"workspace": {
"type": "workspace",
"id": "<workspace_id>"
},
"roles":[]
}