post deprecatedhttps://api.split.io/internal/api/v2/apiKeys
Create and add an API key to your account.
Management of
admin
API keys will be movingAs a part of integrating with Harness,
admin
API keys will soon be created by general Harness systems. We recommend against creating any new integrations that manageadmin
API keys with this endpoint unless it is for a temporary purpose.The
server_side
andclient_side
SDK API keys will continue to be managed using this endpoint.For more information, please contact us at support@split.io and we will be happy to guide you to the best path forward.
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":[]
}