User

Rotate current user's API key

Generates a new active API key for the JWT-authenticated user and places the previous key into a 24 hour grace period.

post/user/me/api-keys/rotate

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/user/me/api-keys/rotate
  • Auth: none declared. Required headers: Authorization

Headers

Authorizationstring required

JWT token in the form Token <jwt>

Response

Rotated API key

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": {
    "active_key": {
      "created_at": "2026-04-22T12:00:00Z",
      "expires_at": "2026-04-23T12:00:00Z",
      "id": "2f8c3c7c4d8f4a4bb4bcb2d2f9e7f8f1",
      "key_prefix": "abcd1234",
      "key_suffix": "ef90",
      "last_used_at": "2026-04-22T11:58:00Z",
      "last_used_ip": "203.0.113.10",
      "masked_key": "abcd1234...ef90",
      "rotated_at": "2026-04-22T12:00:00Z",
      "source": "manual_rotate",
      "status": "active",
      "updated_at": "2026-04-22T12:00:00Z"
    },
    "grace_period_seconds": 86400,
    "new_api_key": "7d0f3f6a5f6c4b91a6e3f5d91ef7dc7e5c7b0c8b4f2b4e57a7d8f1e2c3b4a5d6",
    "previous_key": {
      "created_at": "2026-04-22T12:00:00Z",
      "expires_at": "2026-04-23T12:00:00Z",
      "id": "2f8c3c7c4d8f4a4bb4bcb2d2f9e7f8f1",
      "key_prefix": "abcd1234",
      "key_suffix": "ef90",
      "last_used_at": "2026-04-22T11:58:00Z",
      "last_used_ip": "203.0.113.10",
      "masked_key": "abcd1234...ef90",
      "rotated_at": "2026-04-22T12:00:00Z",
      "source": "manual_rotate",
      "status": "active",
      "updated_at": "2026-04-22T12:00:00Z"
    }
  },
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 3 revisions of this API.