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

# Create Webhook

> Create webhook to receive message.



## OpenAPI

````yaml post /webhooks
openapi: 3.1.0
info:
  title: webhook API
  version: '1.0'
servers:
  - url: https://api.chainbase.online/v1/
security:
  - {}
paths:
  /webhooks:
    post:
      summary: Create Webhook
      description: Create webhook to receive message.
      operationId: create-webhook
      parameters:
        - name: x-api-key
          in: header
          description: YOUR-API-KEY
          required: true
          schema:
            type: string
            example: demo
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - webhook_name
                - webhook_url
                - data_source
              properties:
                webhook_name:
                  type: string
                  description: Name of the webhook
                webhook_url:
                  type: string
                  description: URL of the webhook
                data_source:
                  type: string
                  description: Data source the webhook subscribe to
                filters:
                  type: array
                  description: Filter Object
                  items:
                    properties:
                      field:
                        type: string
                        description: Name of the field matched in the filter.
                      values:
                        type: array
                        description: Values matched in the filter
                        default: []
                        items:
                          type: string
                    type: object
                additional_headers:
                  type: array
                  description: >-
                    Additional headers would be added into the webhook POST when
                    push message is matched.
                  items:
                    properties:
                      name:
                        type: string
                        description: Key of the header
                      value:
                        type: string
                        description: Value of the header
                    type: object
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {"code":0,"msg":"create job
                    success","data":{"webhook_id":"460009d1-f7ce-43a9-9747-681054ffb462","filters":[{"field":"contract_address","values":["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"]}],"webhook_name":"massive-erc20-transfer","webhook_url":"https://gtsfh5g3c4.hk.aircode.run/erc20transfer","data_source":"ethereum_erc20_transfer","additional_headers":[{"name":"Authorization","value":"Bearer
                    xyz"}],"created_at":"2023-08-23T03:27:28.281175Z","updated_at":"2023-08-23T03:27:28.281175Z","status":0}}
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                    default: 0
                  msg:
                    type: string
                    example: create job success
                  data:
                    type: object
                    properties:
                      webhook_id:
                        type: string
                        example: 460009d1-f7ce-43a9-9747-681054ffb462
                      filters:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              example: contract_address
                            values:
                              type: array
                              items:
                                type: string
                                example: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
                      webhook_name:
                        type: string
                        example: massive-erc20-transfer
                      webhook_url:
                        type: string
                        example: https://gtsfh5g3c4.hk.aircode.run/erc20transfer
                      data_source:
                        type: string
                        example: ethereum_erc20_transfer
                      additional_headers:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              example: Authorization
                            value:
                              type: string
                              example: Bearer xyz
                      created_at:
                        type: string
                        example: '2023-08-23T03:27:28.281175Z'
                      updated_at:
                        type: string
                        example: '2023-08-23T03:27:28.281175Z'
                      status:
                        type: integer
                        example: 0
                        default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{"code":-1,"msg":"auth verify-secret-key error","data":null}'
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: -1
                    default: 0
                  msg:
                    type: string
                    example: auth verify-secret-key error
                  data: {}
      deprecated: false

````