Skip to main content
POST
/
v1
/
api_keys
/
{id}
/
rotate
Rotate an API key
curl --request POST \
  --url https://api.rootly.com/v1/api_keys/{id}/rotate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '
{
  "data": {
    "type": "api_keys",
    "attributes": {
      "expires_at": "2023-11-07T05:31:56Z",
      "grace_period_minutes": 30
    }
  }
}
'
{
  "data": {
    "id": "<string>",
    "type": "api_keys",
    "attributes": {
      "name": "<string>",
      "kind": "personal",
      "created_at": "<string>",
      "updated_at": "<string>",
      "token": "<string>",
      "description": "<string>",
      "role_id": "<string>",
      "on_call_role_id": "<string>",
      "expires_at": "<string>",
      "last_used_at": "<string>",
      "grace_period_ends_at": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/vnd.api+json
data
object
required

Response

API key rotated

data
object
required