Update an API Key by ID

Enable or disable an API key for a given user, in a given organization. See Using Global API Keys for more information on permission and scope requirements.

SecuritybearerAuth
Request
path Parameters
userId
required
integer <int64>

User ID of the user to update keys for

id
required
integer <int64>

The ID of the API key to update

query Parameters
o
required
integer <int64>

The target organization.

Request Body schema: application/json
required
is_enabled
required
boolean
Responses
200

Successful Operation

4XX

Invalid Request

default

Invalid Request

put/users/{userId}/api_keys/{id}
Request samples
application/json
{
  • "is_enabled": true
}
Response samples
application/json
{
  • "results": [
    • {
      • "id": 98765,
      • "name": "Jane",
      • "is_enabled": true,
      • "expires_at": null,
      • "created_at": "2023-04-20T15:46:56+0000",
      • "user": {
        • "id": 65432,
        • "firstname": "Jane",
        • "lastname": "Doe",
        • "email": "jane.doe@example.com"
        }
      }
    ],
  • "size": 1
}