> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmembrane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace every secret of an organization workspace with a new one

> Tokens signed with any other secret of the workspace fail from now on. The new secret is returned only by this response. To replace a secret without downtime, add a secret, deploy it, then delete the old one.



## OpenAPI

````yaml /api-reference/membrane-api.json post /org-workspaces/{id}/rotate-secret
openapi: 3.0.0
info:
  title: Membrane API
  description: API documentation for Membrane Engine
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getmembrane.com
security:
  - bearer: []
tags: []
paths:
  /org-workspaces/{id}/rotate-secret:
    post:
      tags:
        - OrgWorkspaces
      summary: Replace every secret of an organization workspace with a new one
      description: >-
        Tokens signed with any other secret of the workspace fail from now on.
        The new secret is returned only by this response. To replace a secret
        without downtime, add a secret, deploy it, then delete the old one.
      operationId: rotateOrgWorkspaceSecret
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RotateOrgWorkspaceSecretResponseDto'
components:
  schemas:
    RotateOrgWorkspaceSecretResponseDto:
      type: object
      properties:
        secret:
          type: string
          description: The new workspace secret
      required:
        - secret
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.