---
title: "POST /api/v2/secret-rotations/open-router-api-key/{rotationId}/rotate-secrets"
method: POST
path: "/api/v2/secret-rotations/open-router-api-key/{rotationId}/rotate-secrets"
tags: ["Secret Rotations"]
---

# POST /api/v2/secret-rotations/open-router-api-key/{rotationId}/rotate-secrets

`POST /api/v2/secret-rotations/open-router-api-key/{rotationId}/rotate-secrets`

## Request

- Base URL: `https://us.infisical.com`
- URL: `https://us.infisical.com/api/v2/secret-rotations/open-router-api-key/{rotationId}/rotate-secrets`
- Auth: none declared

Rotate the generated credentials for the specified OpenRouter API Key Rotation.

## Path parameters

- `rotationId` string, uuid, required

## 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` 'open-router', 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` 'open-router-api-key', required
    - `parameters` object, required
      - `name` string, required: The name for the generated OpenRouter API key.
      - `workspaceId` string: The optional ID of the OpenRouter workspace to create API keys in. If omitted, OpenRouter creates keys in the account's Default workspace.
      - `limit` number, nullable: The optional spending limit in USD for the generated API key.
      - `limitReset` 'daily' | 'weekly' | 'monthly', nullable: The type of limit reset for the API key (daily, weekly, monthly, or null for no reset).
      - `includeByokInLimit` boolean, nullable: Whether to include BYOK (Bring Your Own Key) usage in the spending limit. When enabled, usage from your own provider keys counts toward this key's limit. See OpenRouter BYOK docs for details.
    - `secretsMapping` object, required
      - `apiKey` string, required: The name of the secret that the rotated OpenRouter API key will be mapped to.

## Other responses

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

## Changes

- **2026-10-13** `0e8b7eae9f94`: 1 info
  - added the optional property `secretRotation/parameters/workspaceId` to the response with the `200` status

[Operation history](https://skmtc.dev/infisical/apis/infisical-api/changes/api/v2/secret-rotations/open-router-api-key/:rotationId/rotate-secrets/post.md)

---

[API](https://skmtc.dev/infisical/apis/infisical-api.md) - [All operations](https://skmtc.dev/infisical/apis/infisical-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infisical/apis/infisical-api/revisions/7f940199c899?raw)
