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

# Create a webhook subscription

> Requires the `webhook_subscription:write` ability.



## OpenAPI

````yaml /api-reference/api.json post /webhook-subscriptions
openapi: 3.1.0
info:
  title: ezyshield
  version: 0.0.1
servers:
  - url: https://app.ezyshield.com.au/api
    description: Production
  - url: https://sandbox.ezyshield.com.au/api
    description: Sandbox
security:
  - http: []
tags:
  - name: Organizations
  - name: API Keys
  - name: Verifications
  - name: Checks
  - name: ABA checks
  - name: Webhook Subscriptions
  - name: Webhook Events
paths:
  /webhook-subscriptions:
    post:
      tags:
        - Webhook Subscriptions
      summary: Create a webhook subscription
      description: Requires the `webhook_subscription:write` ability.
      operationId: webhook-subscriptions.store
      parameters:
        - name: fields[webhook-subscriptions]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - url
                - events
                - secret
                - enabled
                - consecutive_failures
                - created_at
                - updated_at
                - disabled_at
          explode: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreWebhookSubscriptionRequest'
      responses:
        '201':
          description: '`WebhookSubscriptionResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookSubscriptionResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreWebhookSubscriptionRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The webhook endpoint URL.
          maxLength: 2048
        events:
          type: array
          description: The event types to subscribe to.
          items:
            $ref: '#/components/schemas/WebhookEventType'
            description: Each event type must be a valid WebhookEventType.
          minItems: 1
      required:
        - url
        - events
      title: StoreWebhookSubscriptionRequest
    WebhookSubscriptionResource:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          const: webhook-subscriptions
        attributes:
          type: object
          properties:
            url:
              type: string
              description: The webhook endpoint URL.
            events:
              type: array
              description: The event types this subscription listens to.
              items:
                type: object
            secret:
              description: >-
                The signing secret. Only returned when the subscription is first
                created.
              anyOf:
                - type: string
                - type: object
            enabled:
              type: boolean
              description: Whether the subscription is enabled.
            consecutive_failures:
              type: string
              description: The number of consecutive delivery failures.
            created_at:
              type: string
              description: ISO 8601 formatted date-time.
            updated_at:
              type: string
              description: ISO 8601 formatted date-time.
            disabled_at:
              type: string
              description: >-
                ISO 8601 formatted date-time when the subscription was disabled,
                or null if enabled.
      required:
        - id
        - type
      title: WebhookSubscriptionResource
    WebhookEventType:
      type: string
      enum:
        - verification.pending
        - verification.successful
        - verification.rejected
        - verification.failed
        - verification.cancelled
        - verification.expired
        - verification.error
        - verification.confirmation_ready
        - verification.confirmation_notification_sent
      title: WebhookEventType
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````