Update an API Key by ID

Enable or disable an API key for a given user, in a given organization.

SecuritybearerAuth
Request
path Parameters
userId
required
integer

User ID of the user to update keys for

id
required
integer

The ID of the API key to update

query Parameters
o
required
integer

The target organization.

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

Successful Operation

400

Invalid Request

401

Access token is missing or invalid

403

You do not have permission to perform this action.

404

Entity not found

429

Too many requests

503

Service Unavailable

default

Invalid Request

put/users/{userId}/api_keys/{id}
Request samples
application/json
{
  • "is_enabled": true
}
Response samples
application/json
{
  • "id": 0,
  • "name": "string",
  • "is_enabled": true,
  • "expires_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "user": {
    • "id": 0,
    • "firstname": "string",
    • "lastname": "string",
    • "email": "user@example.com"
    }
}