Toggle Access Key Status
Endpoint: POST /api/applications/{applicationId}/accessKeys/{keyId}/status
Toggles the status of an access key. The access key can be either ACTIVE or INACTIVE. This endpoint toggles the current status to the opposite state.
Use this endpoint to temporarily disable an access key without deleting it, or to re-enable a previously disabled key.
Path parameters
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| applicationId | The unique ID of the application for which the access key status will be changed. | string | Required. |
| keyId | The access key ID whose status is to be updated. | string | Required. |
Response
Returns 200 OK when the access key status is successfully toggled.
| Parameter | Description |
|---|---|
| id | The access key ID. |
| createdAt | Creation timestamp in Unix time (milliseconds). |
| status | The updated status. Can be ACTIVE or INACTIVE. |
Returns 404 if an invalid path parameter is provided.
Examples
Toggle an access key status
Request
curl -X 'POST' \
'https://<YOUR-SERVER-URL>/api/applications/243a8a88-9f77-48b2-9429-76793a123344/accessKeys/dea0f780-0739-11f1-9b1b-c6f35360b671/status' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>' \
-d ''
Response
{
"id": "dea0f780-0739-11f1-9b1b-c6f35360b671",
"createdAt": 1770808055564,
"status": "INACTIVE"
}