Gamma API
AccountAPI keys

Update an API key

PATCH
/api/account/api-keys/{id}

Its name, permissions or organizations; at least one. A list sent replaces the one stored. The secret and the expiry never change.

Who may call it: Any signed-in user, for their own account. API keys: no.

Authorization

session
cookiegamma.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.

Path Parameters

id*string

Request Body

application/json
  1. body
name?string
Length1 <= length <= 32
permissions?array<string>

Scopes, <area>:read or <area>:write, at most one per area; the areas are listed by GET /api/account/api-keys.

Itemsitems <= 50
organizations?array<>

The organizations it reaches, each once, and in each all its projects (later ones included) or the listed ones.

Items1 <= items <= 50

Response Body

OK.

application/json
  1. response
apiKey*

A personal API key. It acts as its owner, never beyond what they may do at the time of the request.

Example Request
curl -X PATCH 'http://localhost:3000/api/account/api-keys/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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"      }    ]  }}