Skip to main content
PATCH
/
api-keys
/
{id}
Update API key
curl --request PATCH \
  --url https://api.sevalla.com/v3/api-keys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated Key Name",
  "role_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "capabilities": [
    {
      "permission": "APP:READ",
      "id_resource": "fb5e5168-4281-4bec-94c5-0d1584e9e657"
    }
  ]
}
'
{
  "message": "API key \"My Key\" updated"
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

API key identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Body

application/json
name
string

New name for the API key

Required string length: 1 - 255
Example:

"Updated Key Name"

role_ids
string<uuid>[]

New list of role IDs. Replaces all existing roles when provided

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
capabilities
object[]

New list of capabilities. Replaces all existing capabilities when provided

Response

Default Response

message
string
required

Confirmation message

Example:

"API key \"My Key\" updated"