---
updatedAt: 2026-04-22T13:20:58.000Z
agentTools:
  projectIndex: https://docs.awtomic.com/llms.txt
---

# Create a webhook listener

Creates a webhook listener for the shop.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Awtomic API",
    "description": "Reference for Awtomic API",
    "version": "0.0.0",
    "contact": {
      "email": "eng@awtomic.com"
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "samples-enabled": true,
    "samples-languages": [
      "curl",
      "node-simple",
      "python",
      "php",
      "go",
      "ruby"
    ]
  },
  "servers": [
    {
      "url": "https://api.awtomic.com/"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "schemas": {
      "JoiValidationError": {
        "title": "Input validation error",
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "_original": {
                "description": "Original input",
                "type": "object"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "description": "Error message",
                      "type": "string"
                    },
                    "path": {
                      "description": "Path to the error",
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "type": {
                      "description": "Error type",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "paths": {
    "/webhooks": {
      "post": {
        "operationId": "createWebhook",
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook listener",
        "description": "Creates a webhook listener for the shop.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The URL where the webhook payload will be sent"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the webhook is enabled or not"
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "The actions that will trigger the webhook",
                      "enum": [
                        "scCreated",
                        "scUpdated",
                        "baSucess",
                        "baFailure",
                        "cpmUpdated"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook listener created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhookId": {
                      "type": "string",
                      "description": "The ID of the webhook listener"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JoiValidationError"
                }
              }
            }
          }
        }
      }
    }
  }
}
```