---
title: "PATCH /api/v2/secret-rotations/cloudflare-api-token/{rotationId}"
method: PATCH
path: "/api/v2/secret-rotations/cloudflare-api-token/{rotationId}"
tags: ["Secret Rotations"]
---

# PATCH /api/v2/secret-rotations/cloudflare-api-token/{rotationId}

`PATCH /api/v2/secret-rotations/cloudflare-api-token/{rotationId}`

Update the specified Cloudflare API Token Rotation.

## Path parameters

- `rotationId` string, uuid, required

## Request body

- object
  - `name` string — The updated name of the Cloudflare API Token Rotation. Must be slug-friendly.
  - `description` string, nullable — The updated description of the Cloudflare API Token Rotation.
  - `isAutoRotationEnabled` boolean — Whether secrets should be automatically rotated when the specified rotation interval has elapsed.
  - `rotationInterval` number — The updated interval, in days, to automatically rotate secrets.
  - `rotateAtUtc` object — The updated hours and minutes rotation should occur at in UTC.
    - `hours` number, required
    - `minutes` number, required
  - `parameters` object
    - `name` string, required — The name for the generated Cloudflare API token.
    - `policies` object[], required — The access policies to attach to the generated Cloudflare API token. Each policy scopes a set of permission groups to the entire account, to all zones in the account, or to a specific set of zones.
      - `effect` 'allow' | 'deny', required
      - `scope` 'account' | 'all-zones' | 'zones', required
      - `zoneIds` string[]
      - `permissionGroupIds` string[], required
    - `allowedIps` string[] — The IP addresses or CIDR blocks the generated Cloudflare API token is restricted to.
    - `disallowedIps` string[] — The IP addresses or CIDR blocks the generated Cloudflare API token is denied from.
  - `secretsMapping` object
    - `tokenId` string, required — The name of the secret that the rotated Cloudflare API token ID will be mapped to.
    - `apiToken` string, required — The name of the secret that the rotated Cloudflare API token value will be mapped to.

## Response `200`

Default Response

- object
  - `secretRotation` object, required
    - `id` string, uuid, required
    - `name` string, required
    - `description` string, nullable
    - `isAutoRotationEnabled` boolean
    - `activeIndex` number
    - `folderId` string, uuid, required
    - `connectionId` string, uuid, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `rotationInterval` number, required
    - `rotationStatus` string, required
    - `lastRotationAttemptedAt` string, date-time, required
    - `lastRotatedAt` string, date-time, required
    - `lastRotationJobId` string, nullable
    - `nextRotationAt` string, date-time, nullable
    - `isLastRotationManual` boolean
    - `connection` object, required
      - `app` 'cloudflare', required
      - `name` string, required
      - `id` string, uuid, required
    - `environment` object, required
      - `slug` string, required
      - `name` string, required
      - `id` string, uuid, required
    - `projectId` string, required
    - `folder` object, required
      - `id` string, required
      - `path` string, required
    - `rotateAtUtc` object, required
      - `hours` number, required
      - `minutes` number, required
    - `lastRotationMessage` string, nullable
    - `type` 'cloudflare-api-token', required
    - `parameters` object, required
      - `name` string, required — The name for the generated Cloudflare API token.
      - `policies` object[], required — The access policies to attach to the generated Cloudflare API token. Each policy scopes a set of permission groups to the entire account, to all zones in the account, or to a specific set of zones.
        - `effect` 'allow' | 'deny', required
        - `scope` 'account' | 'all-zones' | 'zones', required
        - `zoneIds` string[]
        - `permissionGroupIds` string[], required
      - `allowedIps` string[] — The IP addresses or CIDR blocks the generated Cloudflare API token is restricted to.
      - `disallowedIps` string[] — The IP addresses or CIDR blocks the generated Cloudflare API token is denied from.
    - `secretsMapping` object, required
      - `tokenId` string, required — The name of the secret that the rotated Cloudflare API token ID will be mapped to.
      - `apiToken` string, required — The name of the secret that the rotated Cloudflare API token value will be mapped to.

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/885aef3e6c11/schema)
