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

# Create Webhook

## Creating a Webhook with JiffyLabs API

### Sample Curl Request

```bash theme={null}

curl --request GET \
  --url 'https://api.jiffyscan.xyz/v0/createWebhook?webhookUrl=<URL to which the webhook should send the data> \
  &filter=ADDRESS \
  &identifier=0x5CCeC8AA262cB4729a2d4FF7B15b03BdeeA44DC2 \
  &chainId=8453 \
  &apiName=TestWebHook' \
  --header 'x-api-key: <Your JiffyLabs API Key>'

```

### Sample Response when success

```json theme={null}
200 - response

{
    "webhook":{
        "apiName":"TestWebHook",
        // A custom name or identifier for the API by using which API is created (in this case, it's set to "TestWebHook")

        "webhookUrl":"https://381b-2402-a00-1b0-fc1-950c-f59e-1e40-ad90.ngrok-free.app",
        // The URL of the API endpoint that will receive webhook notifications. We are using a sample Ngrok url here to expose our local ports

        "filter":"ADDRESS",
        // The type of filter applied to the webhook (in this case, it's filtering by address)

        "chainId":"8453",
        // The Chain ID of the blockchain network the webhook is monitoring (8453 corresponds to Base Network )

        "identifier":"0x5CCeC8AA262cB4729a2d4FF7B15b03BdeeA44DC2",
        // The specific address being monitored by this webhook

        "id":"1725944496899",
        // A unique identifier for this webhook instance

        "createdAt":"2024-09-10T05:01:36.900Z"
        // The timestamp when this webhook was created (in UTC)

        },
    "success":true
    // Indicates that the webhook was successfully created

    }

```


## OpenAPI

````yaml get /createWebhook
openapi: 3.0.3
info:
  title: jiffyscan APIs
  version: '1.0'
  description: Gives a breif overview of all the jiffyscan APIs
  contact:
    email: aditya@jiffyscan.xyz
    name: Aditya
    url: https://jiffyscan.xyz
servers:
  - url: https://api.jiffyscan.xyz/v0
security: []
tags:
  - name: Supported Networks
    description: APIs for fetching supported network information
  - name: User Operations
    description: API's which can be used to fetch user operations done by entities
  - name: Bundler
    description: API's which can be used to fetch bundler related information
  - name: Account
    description: API's which can be used to fetch account related information
  - name: Factory
    description: API's which can be used to fetch factory related information
  - name: Metrics
    description: API's which can be used to fetch over all metrics of the ecosystem
paths:
  /createWebhook:
    get:
      parameters:
        - name: webhookUrl
          in: query
          required: true
          schema:
            type: string
          example: >-
            https://k29vom2r9g.execute-api.ap-south-1.amazonaws.com/default/testHook
          description: The URL to which the webhook should send the data
        - name: filter
          in: query
          required: true
          schema:
            type: string
          example: ADDRESS
          description: >-
            The filter to apply to the webhook. Must be one of: `ADDRESS`,
            `FACTORY`, `BUNDLER`, `PAYMASTER`
        - name: identifier
          in: query
          required: true
          schema:
            type: string
          example: '0x2C7F4f563239ed04CC162fAC86e6FADCe561dca1'
          description: The identifier to filter on, i.e. ADDRESS
        - name: chainId
          in: query
          required: true
          schema:
            type: string
          example: '8453'
          description: The chainId to filter on, i.e. 1 for Ethereum, 8453 for Base ...
        - name: apiName
          in: query
          required: true
          schema:
            type: string
          example: major_toad_purple
          description: The name of the API to create the webhook for
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
            Access-Control-Allow-Methods:
              schema:
                type: string
            Access-Control-Allow-Headers:
              schema:
                type: string
          content: {}
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Invalid API Key
        '502':
          description: Bad Gateway
        default:
          description: Success
      security:
        - BasicAuth: []
components:
  securitySchemes:
    BasicAuth:
      type: apiKey
      name: x-api-key
      in: header
      x-amazon-apigateway-authtype: custom
      x-amazon-apigateway-authorizer:
        type: request
        authorizerUri: >-
          arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:283541367427:function:test-jiffyscan-BasicAuthFunction-mMOdBhL8g93M/invocations
        authorizerResultTtlInSeconds: 300
        identitySource: method.request.header.x-api-key

````