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

# Rotate Webhook Secret

> Post org team webhook secret rotate via the Junction API. Requires authentication with your team API key.

<Info>
  [Junction Management API](/api-details/junction-management-api) is available for [the Scale plan](https://tryvital.io/pricing).
</Info>

<Tip>
  The base URL of this endpoint is `https://api.management.junction.com/`.

  The endpoint accepts only [Management Key](/api-details/junction-management-api#authentication) (`X-Management-Key`).
  Team API Key is not accepted.
</Tip>


## OpenAPI

````yaml post /v1/org/{org_id}/team/{team_id}/{environment}/webhook/{webhook_id}/secret/rotate
openapi: 3.1.0
info:
  title: Org Management
  version: 0.1.0
servers:
  - url: https://api.management.junction.com
    description: Production Management API server
security:
  - ManagementKey: []
paths:
  /v1/org/{org_id}/team/{team_id}/{environment}/webhook/{webhook_id}/secret/rotate:
    post:
      tags:
        - Team Webhook
      summary: Rotate Webhook Secret
      operationId: >-
        rotate_webhook_secret_v1_org__org_id__team__team_id___environment__webhook__webhook_id__secret_rotate_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Org Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
        - name: environment
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/Env'
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
            title: Webhook Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RotateWebhookSecretBody'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Env:
      type: string
      enum:
        - production
        - sandbox
      title: Env
    RotateWebhookSecretBody:
      properties:
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
      type: object
      title: RotateWebhookSecretBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ManagementKey:
      type: apiKey
      in: header
      name: X-Management-Key

````