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

# Rotate Partner Webhook

> Rotate the signing key of a partner webhook (overlap rotation).

Mints a fresh secret (returned exactly once) and keeps the previous key(s) valid for
``grace_seconds`` so the partner can switch over without dropping deliveries.



## OpenAPI

````yaml /api-reference/preview.json post /webhooks/{category}/rotate
openapi: 3.1.0
info:
  title: Intermezzo Global Payroll
  summary: Global Payroll Platform
  description: Intermezzo's global payroll apis, organized by country
  version: '2026-08-18'
  x-logo:
    url: /static/icon.svg
servers: []
security: []
paths:
  /webhooks/{category}/rotate:
    post:
      tags:
        - Core
        - Webhooks
      summary: Rotate Partner Webhook
      description: >-
        Rotate the signing key of a partner webhook (overlap rotation).


        Mints a fresh secret (returned exactly once) and keeps the previous
        key(s) valid for

        ``grace_seconds`` so the partner can switch over without dropping
        deliveries.
      operationId: rotate_partner_webhook_webhooks__category__rotate_post
      parameters:
        - name: category
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/WebhookCategory'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRotateInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCreatedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerToken:
            - write:webhooks
components:
  schemas:
    WebhookCategory:
      type: string
      enum:
        - payroll_status
      title: WebhookCategory
      description: Category of partner webhook.
    WebhookRotateInput:
      properties:
        grace_seconds:
          type: integer
          maximum: 604800
          minimum: 0
          title: Grace Seconds
          description: How long the previous key(s) stay valid after rotation
          default: 86400
      type: object
      title: WebhookRotateInput
      description: >-
        Body accepted on the rotate (POST) request.


        Only the grace window is accepted; the current secret is NOT required —
        the endpoint

        is gated by the ``write:partner_webhooks`` scope. The outgoing key(s)
        stay valid for

        ``grace_seconds`` so the partner can switch over without dropping
        deliveries.
    WebhookCreatedResponse:
      properties:
        partner_id:
          type: string
          title: Partner Id
          description: Auth0 client_id of the partner
        category:
          $ref: '#/components/schemas/WebhookCategory'
          description: Event category, e.g. payroll_status
        enabled:
          type: boolean
          title: Enabled
          description: Whether deliveries are sent for this webhook
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: HTTPS endpoint we POST events to
        secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret
          description: Signing secret — shown once, store it now
      type: object
      required:
        - partner_id
        - category
        - enabled
        - url
      title: WebhookCreatedResponse
      description: >-
        Response for setup (first PUT) and rotate: the generated secret is shown
        once.


        ``secret`` is null on a repeat PUT that only updates url/enabled without
        minting a

        new key.
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Get token from Auth0 and paste it here

````