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

# Create a webhook registration

> Register the endpoint which receives global webhook events. Calling this endpoint again replaces the stored registration.




## OpenAPI

````yaml /openapi.yaml post /webhook/register
openapi: 3.0.1
info:
  title: Push API
  version: 0.0.1
servers:
  - url: https://api.pushcash.com
    description: Production API
  - url: https://sandbox.pushcash.com
    description: Sandbox API used for developing an integration with Push
security:
  - bearer: []
tags:
  - name: user
  - name: tokenization
  - name: authorization
  - name: intent
  - name: dispute
  - name: refund
  - name: ledger
    description: >-
      Accounts, transactions, and transfers — the records that make up the Push
      ledger.
  - name: simulation
  - name: webhook
paths:
  /webhook/register:
    post:
      tags:
        - webhook
      summary: Create a webhook registration
      description: >
        Register the endpoint which receives global webhook events. Calling this
        endpoint again replaces the stored registration.
      operationId: createWebhookRegistration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: >-
                    The HTTPS URL for your webhook callback. For more
                    information, see [Enabling Webhooks](/enabling-webhooks).
                  example: https://api.yourdomain.com/webhooks/push
                secret:
                  type: string
                  minLength: 32
                  maxLength: 4096
                  description: >-
                    A cryptographically random string of at least 32 characters.
                    If omitted, events are delivered unsigned. For more
                    information, see [Enabling Webhooks](/enabling-webhooks).
                  example: whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
      responses:
        '200':
          description: Webhook registration updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookRegistration'
        '201':
          description: Webhook registration created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookRegistration'
        '400':
          description: |
            The registration request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    WebhookRegistration:
      type: object
      description: A webhook registration for global events
      example:
        url: https://api.yourdomain.com/webhooks/push
      properties:
        url:
          type: string
          description: The registered URL. The secret is not returned.
      required:
        - url
    error:
      description: Description of the error encountered from the API request
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````