Skip to main content

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

ParameterDescriptionTypeRequired/ Optional
applicationIdThe unique ID of the application for which the access key status will be changed.stringRequired.
keyIdThe access key ID whose status is to be updated.stringRequired.

Response

Returns 200 OK when the access key status is successfully toggled.

ParameterDescription
idThe access key ID.
createdAtCreation timestamp in Unix time (milliseconds).
statusThe 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"
}