Body
Create a key
-
scopes array[string]
An authorization scope associated with a key. Any request that is signed by a JWT with this key will have access to the scopes associated with that key.
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
. -
use string
The intended use for this key. This is a shorthand way to set a reasonable set of scopes. You must either pass
scopes
oruse
.Values are
production
orci
.
POST
/keys
curl \
-X POST https://api.statebacked.dev/keys \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string","scopes":["events.write"],"use":"production"}'
Request example
{
"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"
}
Response examples (200)
{
"id": "sbk_nXzdtCxESemgtxS5JX-LrA",
"key": "string"
}