Skip to main content
POST
/
webhooks
Create a new webhook (account-wide).
curl --request POST \
  --url https://api.komerza.com/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "eventTypes": [
    "<string>"
  ],
  "storeIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "success": true,
  "message": "<string>",
  "code": "<string>",
  "data": {
    "webhook": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dateCreated": "2023-11-07T05:31:56Z",
      "url": "<string>",
      "events": [
        "<string>"
      ],
      "storeIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "executionLogs": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "dateCreated": "2023-11-07T05:31:56Z",
          "url": "<string>",
          "signature": "<string>",
          "requestBody": "<string>",
          "retryCount": 123,
          "responseCode": 123,
          "responseBody": "<string>",
          "webhookId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "userId": "<string>",
          "userAgent": "<string>",
          "orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      ],
      "userId": "<string>"
    },
    "secret": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Your API key goes here

Body

application/json

The Komerza.Common.Forms.Users.WebhookForm containing URL, events, and store IDs

Represents a form for configuring webhooks. This form includes a URL for the webhook, a list of event types, and a list of store IDs the webhook should apply to.

url
string<uri>
required

The URL associated with this webhook. Required and must be a valid URL.

Minimum string length: 1
eventTypes
string[]
required

The event types this webhook should subscribe to. Must contain at least one entry.

Required array length: 1 - 9999 elements
storeIds
string<uuid>[]
required

The list of store IDs to which this webhook will be linked.

Required array length: 1 - 999 elements

Response

The object was successfully created.

Represents a default generic response for API endpoints.

success
boolean
required

Indicates whether the operation or response was successful.

message
string | null

A descriptive message providing additional context or information about the response.

code
string | null

The error code (if there was an error) to use when referencing the error

data
object