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

# Regenerate the secret for a webhook

> Generates a new secret. The old secret is immediately invalidated.



## OpenAPI

````yaml /openapi/marmar-cds.openapi.yaml post /v1/webhooks/{webhookId}/regenerate-secret
openapi: 3.1.0
info:
  title: Marmar Clinical Decision Support Reference
  version: 0.1.0
  description: >
    API for integrating Marmar's medication safety assessments into clinical
    workflows. Tenants can synchronize patient records, request assessments, and
    receive webhook notifications when assessments are completed.
servers:
  - url: https://cds.marmar.life
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Patients
  - name: Assessments
  - name: Tenants
  - name: Webhooks
  - name: FHIR
paths:
  /v1/webhooks/{webhookId}/regenerate-secret:
    parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Webhooks
      summary: Regenerate the secret for a webhook
      description: Generates a new secret. The old secret is immediately invalidated.
      operationId: regenerateWebhookSecret
      responses:
        '200':
          description: New secret generated
          content:
            application/json:
              schema:
                type: object
                properties:
                  secret:
                    type: string
                    description: New auto-generated secret. Store securely.
                required:
                  - secret
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key obtained from the Tenant Dashboard. Use as Authorization: Bearer
        YOUR_API_KEY

````