PATCH
/
projects
/
{projectIdOrName}
/
api-keys
/
{apiKey}
curl --request PATCH \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/api-keys/{apiKey} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "updateMask": [
    "label",
    "active",
    "scopes"
  ],
  "apiKey": {
    "label": "MailMonkey API Key",
    "active": true,
    "scopes": [
      [
        "full",
        "frontend"
      ]
    ]
  }
}'
{
  "key": "api-key-123",
  "label": "MailMonkey API Key",
  "scopes": [
    [
      "full",
      "frontend"
    ]
  ],
  "projectId": "my-project",
  "active": true
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required

The Ampersand project ID or project name.

apiKey
string
required

API key to access Ampersand APIs.

Body

application/json

Response

200
application/json
API key updated

The response is of type object.