Releases Index
Create a user API key
View .md

Create a user API key

POST
/api-keys

Optional idempotency key. Reuse the same key only for an identical request; successful responses are replayable for 24 hours.

Authorization

bearerAuth
headerAuthorizationBearer <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.

Header Parameters

Idempotency-Key?string

Optional idempotency key. Reuse the same key only for an identical request; successful responses are replayable for 24 hours.

Match^[\x21-\x7e]+$
Length16 <= length <= 255

Request Body

application/json
  1. body
name*string

Display name, at most 200 bytes.

Length1 <= length
scope?string

Defaults to read, the self-serve ceiling.

Value in"read""write""admin"
expiresInDays?integer
Range1 <= value <= 365

Response Body

Created user API key, including the one-time secret.

application/json
  1. response
id*string
name*string|null
start*string|null
scope*|null
remaining*|null
createdAt*string
expiresAt*string|null
key*string
Example Request
curl -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"}