Body
Create a key
-
The scopes that any request with a token signed by this key will have access to. You must either pass
scopesoruse.Values are
events.write,events.read,state.read,instances.read,instances.write,instances.admin,machines.read,machines.write,machines.admin,machine-versions.read,machine-versions.write,analytics.read,org.read,org.write,org.keys.write,org-members.write,logs.read, ortokens.admin. -
The intended use for this key. This is a shorthand way to set a reasonable set of scopes. You must either pass
scopesoruse.Values are
productionorci.
POST
/keys
curl \
--request POST 'https://api.statebacked.dev/keys' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"string","scopes":["events.write"],"use":"production"}'
Request examples
{
"name": "string",
"scopes": [
"events.write"
],
"use": "production"
}
Response examples (200)
{
"id": "sbk_nXzdtCxESemgtxS5JX-LrA",
"key": "string"
}