---
title: "webhook.create"
method: POST
path: "/webhook.create.json"
tags: ["webhook"]
---

# webhook.create

`POST /webhook.create.json`

## Request

- Base URL: `https://api.api2cart.com/v1.1`
- URL: `https://api.api2cart.com/v1.1/webhook.create.json`
- Auth: API key in header `x-api-key` and API key in header `x-store-key`

Create webhook on the store and subscribe to it.

## Request body

- WebhookCreate
  - `entity` string, required: Specify the entity that you want to enable webhooks for (e.g product, order, customer, category)
  - `action` string, required: Specify what action (event) will trigger the webhook (e.g add, delete, or update)
  - `callback` string, required: Callback where the webhook should send the POST request when the event occurs
  - `label` string: The name you give to the webhook
  - `fields` string: Fields the webhook should send
  - `response_fields` string: Set this parameter to choose which entity fields to retrieve. Use comma-separated field names in curly braces, nested to match the response structure, e.g. {result{product{id,name}}}. The wildcard * returns every field at a level: {*} gives the whole response, {result{product{*}}} all product fields.
  - `active` boolean: Webhook status
  - `lang_id` string: Language id
  - `store_id` string: Defines store id where the webhook should be assigned
  - `filtering_conditions` union
    - object
      - `and` object[]
      - `or` object[]
      - `not` object, nullable
    - object
      - `field` string
      - `operator` string
      - `value` union
        - string, nullable
        - number
        - boolean
        - string[]
      - `match_items` string, nullable
  - `idempotency_key` string: A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

## Response `200`

successful operation

- object
  - `return_code` integer
  - `return_message` string
  - `result` object
    - `id` integer

---

[API](https://skmtc.dev/api2cart/apis/api2cart-openapi.md) · [All operations](https://skmtc.dev/api2cart/apis/api2cart-openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/api2cart/apis/api2cart-openapi/revisions/c34440741693?raw)
