Answers the secret once, beside the key. At most five live keys per person. Refused with 422 for an unknown or repeated scope, an organization or project the caller cannot see, or an organization that requires two-factor authentication the caller lacks.
Who may call it: Any signed-in user, for their own account. API keys: no.
sessiongamma.session_token<token>The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.
application/jsonname*string1 <= length <= 32permissions*array<string>Scopes, <area>:read or <area>:write, at most one per area; the areas are listed by GET /api/account/api-keys.
items <= 50organizations*array<>The organizations it reaches, each once, and in each all its projects (later ones included) or the listed ones.
1 <= items <= 50expiresInDays*|||Days until it expires: 30, 90 or 365; null for never.
Created.
application/jsonapiKey*A personal API key. It acts as its owner, never beyond what they may do at the time of the request.
key*stringThe secret, to send as x-api-key. Shown this once; it cannot be read again.
curl -X POST 'http://localhost:3000/api/account/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "permissions": [ "string" ], "organizations": [ { "id": "string", "projects": "all" } ], "expiresInDays": 30}'{ "apiKey": { "id": "string", "name": "string", "start": "string", "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastRequest": "2019-08-24T14:15:22Z", "permissions": [ "string" ], "organizations": [ { "id": "string", "name": "string", "slug": "string", "projects": "all" } ] }, "key": "string"}