Create a user API key
POST
Optional idempotency key. Reuse the same key only for an identical request; successful responses are replayable for 24 hours.
bearerAuthheader
AuthorizationBearer <relk_… | relu_… | OAuth JWT>Machine/operator tokens use the relk_ prefix; self-serve read-only user keys use relu_; Sign in with Releases supplies an OAuth access token. Required scope depends on the endpoint.
Idempotency-Key?stringOptional idempotency key. Reuse the same key only for an identical request; successful responses are replayable for 24 hours.
Match
^[\x21-\x7e]+$Length
16 <= length <= 255application/json- body
name*stringDisplay name, at most 200 bytes.
Length
1 <= lengthscope?stringDefaults to read, the self-serve ceiling.
Value in
"read""write""admin"expiresInDays?integerRange
1 <= value <= 365Created user API key, including the one-time secret.
application/json- response
id*stringname*string|nullstart*string|nullscope*|nullremaining*|nullcreatedAt*stringexpiresAt*string|nullkey*stringcurl -X POST 'https://api.releases.sh/v1/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'Example Response
{ "id": "string", "name": "string", "start": "string", "scope": "read", "remaining": -9007199254740991, "createdAt": "string", "expiresAt": "string", "key": "string"}