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

# Create Webhook

> Create a webhook subscription for a specific event type.



## OpenAPI

````yaml POST /customer/webhooks/subscriptions
openapi: 3.1.0
info:
  title: INDX-api
  description: |2-

        Welcome to the INDX API!
        
  version: 0.1.0
servers: []
security: []
paths:
  /customer/webhooks/subscriptions:
    post:
      tags:
        - Customer
      summary: Create Webhook Subscription
      description: Create a webhook subscription for a specific event type.
      operationId: create_webhook_subscription_customer_webhooks_subscriptions_post
      parameters:
        - name: source
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Source
        - name: X-API-SIGNATURE
          in: header
          required: true
          schema:
            type: string
            description: Signature header
            title: X-Api-Signature
          description: Signature header
        - name: X-API-TIMESTAMP
          in: header
          required: true
          schema:
            type: integer
            description: Timestamp header
            title: X-Api-Timestamp
          description: Timestamp header
        - name: X-API-NONCE
          in: header
          required: true
          schema:
            type: string
            description: Nonce header
            title: X-Api-Nonce
          description: Nonce header
        - name: X-API-SUBSCRIPTION-KEY
          in: header
          required: true
          schema:
            type: string
            description: Account ID header
            title: X-Api-Subscription-Key
          description: Account ID header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriptionRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseSchema_WebhookResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebhookSubscriptionRequest:
      properties:
        event_types:
          $ref: '#/components/schemas/EventTypeEnum'
          description: Event Type
          examples:
            - transaction
        callback_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Callback Url
          description: Call back URL
          examples:
            - https://example.com/webhook
        description:
          type: string
          minLength: 1
          title: Description
          description: Description
          examples:
            - Transaction events
      type: object
      required:
        - event_types
        - callback_url
        - description
      title: WebhookSubscriptionRequest
      description: Schema to deserialize the webhook subscription request.
    ResponseSchema_WebhookResponse_:
      properties:
        message:
          type: string
          title: Message
        data:
          anyOf:
            - $ref: '#/components/schemas/WebhookResponse'
            - type: 'null'
      type: object
      required:
        - message
      title: ResponseSchema[WebhookResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EventTypeEnum:
      type: string
      enum:
        - transaction
      title: EventTypeEnum
      description: Enum for Event Types.
    WebhookResponse:
      properties:
        subscription_id:
          type: string
          format: uuid
          title: Subscription Id
          description: Subscription ID
        event_type:
          items:
            type: string
          type: array
          title: Event Type
          description: Event Type
          examples:
            - '1234'
        callback_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Callback Url
          description: Call back URL
          examples:
            - https://example.com/webhook
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description
          examples:
            - Transaction events
        status:
          type: string
          title: Status
          description: Status
          default: ''
          examples:
            - '1234'
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Created At
          examples:
            - '1234'
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Updated At
          examples:
            - '1234'
      type: object
      required:
        - subscription_id
        - event_type
        - callback_url
        - created_at
      title: WebhookResponse
      description: Schema to serialize the webhook data.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````