> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/webhooks/create-new-webhook-on-a-httptransport.md).

# Create new webhook on a httpTransport

Add webhook on a httpTransport

Required permissions: WEBHOOK

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Webhooks","description":"Webhooks"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"WebhookCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequestSchema"}}},"description":"Webhook Create Request"}},"schemas":{"WebhookCreateRequestSchema":{"allOf":[{"$ref":"#/components/schemas/WebhookUpdateRequestSchema"},{"properties":{"webhookUid":{"$ref":"#/components/schemas/UID"}}}],"type":"object","title":"WebhookCreateRequestSchema","description":"Webhook Create Request Schema"},"WebhookUpdateRequestSchema":{"description":"Webhook Update Request Schema","title":"WebhookUpdateRequestSchema","type":"object","properties":{"action":{"$ref":"#/components/schemas/WebhookActionENUM"}},"required":["action"]},"WebhookActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| PRODUCT_CREATE | Create new product |\n| PRODUCT_UPDATE | Update existing product |\n| PRODUCT_DELETE | Product deleted |\n| CUSTOMER_CREATE | Create new customer|\n| CUSTOMER_UPDATE | Update existing customer|\n| CUSTOMER_DELETE | Customer deleted|\n| ORDER_SETTLED | New order. Order status is SETTLED|\n| ORDER_STATE_CHANGE | Order changes state|\n| ORDER_RECEIPT_SETTLED | A receipt is SETTLED |\n| ORDER_DELIVERED | Existing order. Order status DELIVERED|\n| ORDER_LINE_DELIVERED | An order line has been delivered |\n| ORDER_HANDLING_STATE_CHANGED | An order handling state changed (notably when set to NOT_STARTED, IN_PROGRESS, ON_HOLD, or COMPLETE) |\n| TILL_CLOSED | Till has been counted and closed.|\n| TILL_OPEN | Till has been opened.|\n| PRICE_CREATE | Create new price.|\n| PRICE_UPDATE | Update Price.|\n| PRICE_DELETE | Price deleted |\n| STOCK_CHANGE | Stock for a warehouseUid and productUid has changed.|\n| PRODUCT_MEDIA_CHANGE | Product media has changed (create/update/delete).|\n| PURCHASE_RECEIVED | Purchase order fully received |\n| ORDER_LINE_RESERVATION_CHANGE | Order line reservation changed |\n| SERVICE_ORDER_STATE_CHANGED | Service order changed state. The payload carries references only — the tenant, the owning store, the service order and the user the change is attributed to by id and uid, the uid and eventType of the event behind the change, and the state the service order moved to. Never form values, secrets, prices or any personal data. |\n| SERVICE_EVENT_CREATED | An event was written on a service order timeline. The payload carries references only — the tenant, the owning store, the service order and the user the event is attributed to by id and uid, plus the event's uid and eventType. Never form values, secrets, prices or any personal data. |\n\nExtensible — new actions may be added, so clients must not fail on a value they do not know.","enum":["PRODUCT_CREATE","PRODUCT_UPDATE","PRODUCT_DELETE","CUSTOMER_CREATE","CUSTOMER_UPDATE","CUSTOMER_DELETE","ORDER_SETTLED","ORDER_DELIVERED","ORDER_STATE_CHANGE","ORDER_LINE_DELIVERED","TILL_CLOSED","TILL_OPEN","PRICE_CREATE","PRICE_UPDATE","PRICE_DELETE","STOCK_CHANGE","PRODUCT_MEDIA_CHANGE","PURCHASE_RECEIVED","ORDER_HANDLING_STATE_CHANGED","ORDER_RECEIPT_SETTLED","ORDER_LINE_RESERVATION_CHANGE","SERVICE_ORDER_STATE_CHANGED","SERVICE_EVENT_CREATED"],"title":"WebhookActionENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"WebhookResponseSchema":{"properties":{"action":{"$ref":"#/components/schemas/WebhookActionENUM"},"httpTransport":{"$ref":"#/components/schemas/HttpTransportResponseSchema"},"webhookUid":{"$ref":"#/components/schemas/UID"}},"required":["action","webhookUid","httpTransport"],"description":"Webhook Response","title":"WebhookResponseSchema","type":"object"},"HttpTransportResponseSchema":{"properties":{"headers":{"items":{"$ref":"#/components/schemas/TransportHeaderSchema"},"type":"array"},"name":{"type":"string"},"password":{"type":"string"},"securityType":{"enum":["NONE","BASIC_AUTH","BEARER_TOKEN"],"type":"string"},"token":{"type":"string"},"httpTransportUid":{"$ref":"#/components/schemas/UID"},"url":{"type":"string"},"username":{"type":"string"}},"required":["httpTransportUid","name","url","securityType","username","password","token","headers"],"description":"Transport Response Schema","title":"HttpTransportResponseSchema","type":"object"},"TransportHeaderSchema":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"description":"Transport Header Schema","title":"TransportHeaderSchema","type":"object"}},"responses":{"WebhookResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/httptransports/{httpTransportUid}/webhooks":{"post":{"description":"Add webhook on a httpTransport\n\nRequired permissions: WEBHOOK","operationId":"post-tenants-httptransports-webhooks","requestBody":{"$ref":"#/components/requestBodies/WebhookCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/WebhookResponse"}},"summary":"Create new webhook on a httpTransport","tags":["Webhooks"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/webhooks/create-new-webhook-on-a-httptransport.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
