> ## 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.

# Setup Partner Webhook

> Create or replace a partner webhook endpoint.

On the first setup the server generates the signing secret and returns it exactly
once — store it now, it cannot be retrieved later. A repeat call only updates
url/enabled (``secret`` is null); rotate the key via ``POST /{category}/rotate``.



## OpenAPI

````yaml /api-reference/preview.json put /webhooks/{category}
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}:
    put:
      tags:
        - Core
        - Webhooks
      summary: Setup Partner Webhook
      description: >-
        Create or replace a partner webhook endpoint.


        On the first setup the server generates the signing secret and returns
        it exactly

        once — store it now, it cannot be retrieved later. A repeat call only
        updates

        url/enabled (``secret`` is null); rotate the key via ``POST
        /{category}/rotate``.
      operationId: setup_partner_webhook_webhooks__category__put
      parameters:
        - name: category
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/WebhookCategory'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConfigInput'
      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.
    WebhookConfigInput:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: true
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: HTTPS endpoint we POST events to
      type: object
      required:
        - url
      title: WebhookConfigInput
      description: >-
        Body accepted on the admin setup (PUT) request.


        The secret is NOT accepted from the caller — the server generates it
        (see

        ``PartnerWebhookService``) and returns it once.
    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

````