Create a webhook

POST

POST https://platform-api.lia.com.br/external_api/v1/webhooks

Body params

NameDescriptionRequiredType
nameName of your producttrueString
urlWebhook’s urltrueInteger
entityThe webhook entity, can be order, billing or billtrueString
eventsEvents from that webhooktrueArray
verbHttp verb used in requesttrueString

Example request

curl --location 'https://platform-api-sandbox.lia.com.br/external_api/v1/webhooks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \
--data '{
    "url": "https://webhook.site/04e6e7b0-cc57-4d16-a437-fddffec179dd",
    "entity": "order",
    "events": ["canceled", "finished"],
    "name": "Black Friday",
    "verb": "post"
}'

Example response

{
    "id": "3618c7e0-13a2-46f2-ad62-3227e488509b",
    "url": "https://webhook.site/cd02b018-fe29-4687-9636-459e8b41a77f",
    "entity": "order",
    "events": [
        "canceled",
        "finished"
    ],
    "created_at": "2023-11-16T15:58:50.254-03:00",
    "updated_at": "2023-11-16T15:58:50.254-03:00",
    "name": "Black Friday",
    "verb": "post"
}