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

# Create Webhook Subscription

<Info>
  Learn more about [Webhook Event
  Types](/api-reference/prod/webhook-subscriptions#event-types) and [Webhook
  Delivery](/api-reference/prod/webhook-subscriptions#webhook-delivery).
</Info>


## OpenAPI

````yaml api-reference/openapi.json POST /v1/webhooks/subscriptions
openapi: 3.0.3
info:
  title: Payroll Integrations Public API
  version: 1.0.0
  description: Public API for Payroll Integrations platform
  license:
    name: MIT
servers:
  - url: https://api.payrollintegrationsapp.com
    description: Production
security: []
tags:
  - name: auth
  - name: employer-identifiers
  - name: meta
  - name: payroll-connections
  - name: payroll-platforms
  - name: roles
  - name: users
  - name: webhooks
paths:
  /v1/webhooks/subscriptions:
    post:
      tags:
        - webhooks
      operationId: post_v1_webhooks_subscriptions
      requestBody:
        description: Webhook subscription creation request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookSubscriptionRequest'
            example:
              event_types:
                - PAYROLL_PROCESSED
                - UPDATE_GROUP_PROCESSED
              path: https://example.com/webhooks
      responses:
        '201':
          description: Webhook subscription created successfully
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            WWW-Authenticate:
              schema:
                description: Authentication challenge (Bearer)
                type: string
              description: Authentication challenge (Bearer)
        '403':
          description: Insufficient permissions or access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Retry-After:
              schema:
                description: Number of seconds to wait before retrying
                type: string
              description: Number of seconds to wait before retrying
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateWebhookSubscriptionRequest:
      type: object
      properties:
        event_types:
          description: The webhook event types to subscribe to
          minItems: 1
          type: array
          items:
            type: string
            enum:
              - EMPLOYEE_CENSUS_HIRED
              - EMPLOYEE_CENSUS_TERMINATED
              - EMPLOYEE_CENSUS_UPDATED
              - PAYROLL_PROCESSED
              - UPDATE_GROUP_PROCESSED
        path:
          description: Destination URL to receive webhook notifications
          type: string
          format: uri
      required:
        - event_types
        - path
    ErrorResponse:
      type: object
      properties:
        message:
          description: Human-readable error message
          type: string
        errors:
          description: Array of specific error details
          type: array
          items:
            type: string
      required:
        - message
        - errors
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token obtained from the /v1/auth/token endpoint. Send as:
        Authorization: Bearer <token>.

````