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

# Rotate endpoint secret

> Rotate the signing secret for a webhook endpoint. The old secret stays valid
for 24 hours so you can update your verification code without dropping events.



## OpenAPI

````yaml /openapi.yml post /webhooks/endpoint/rotateSecret
openapi: 3.1.0
info:
  title: Cargado API
  version: 1.0.0
  description: Cargado's API
  termsOfService: https://cargado.com/terms/
  contact:
    email: dev-support@cargado.com
servers:
  - url: https://api.cargado.com
    description: The production Cargado API server
security: []
tags:
  - name: Border Crossings
  - name: Loads
  - name: Rates
  - name: CarrierRelationship
  - name: User
  - name: Team
  - name: Webhooks
  - name: Bids
paths:
  /webhooks/endpoint/rotateSecret:
    post:
      tags:
        - Webhooks
      summary: Rotate endpoint secret
      description: >-
        Rotate the signing secret for a webhook endpoint. The old secret stays
        valid

        for 24 hours so you can update your verification code without dropping
        events.
      operationId: RotateSecret
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RotateWebhookEndpointSecretBody'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  secret:
                    type: string
                required:
                  - secret
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                required:
                  - message
                type: object
      security:
        - apiKey: []
components:
  schemas:
    RotateWebhookEndpointSecretBody:
      properties:
        endpointId:
          type: string
          description: ID of the endpoint whose secret to rotate
          minLength: 1
          maxLength: 256
        key:
          type: string
          description: >-
            Provide a specific signing secret. Omit to have one generated
            automatically.
          minLength: 1
          maxLength: 256
      required:
        - endpointId
      type: object
      additionalProperties: true
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api-key

````