Update a webhook

PUT

PUT https://external-api.lia.com.br/external_api/v1/webhooks/:id

Body params

Only the fields sent are changed. After the update, events must still be valid for the webhook’s entity.

NameDescriptionRequiredType
nameDescriptive name for this webhookfalseString
urlWebhook’s url. Must be a public https:// URL; a trailing / is removedfalseString
entityThe webhook entity, can be order, billing or billfalseString
eventsEvents from that webhookfalseArray
verbHttp verb used in request: post, put or get (case-insensitive). With get the payload is sent as query parametersfalseString
paramsStored and returned as-is; not used by standard webhooksfalseObject

Example request

curl --location --request PUT 'https://external-api-sandbox.lia.com.br/external_api/v1/webhooks/50068cee-eddc-5920-b70d-2c0da6bfa208' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \
--data '{
    "url": "https://your-domain.com/webhooks/lia",
    "entity": "bill",
    "events": ["paid"],
    "name": "Black Friday 2023",
    "verb": "post"
}'

Example response

{
    "id": "50068cee-eddc-5920-b70d-2c0da6bfa208",
    "url": "https://your-domain.com/webhooks/lia",
    "entity": "bill",
    "events": [
        "paid"
    ],
    "target": "standard",
    "params": null,
    "name": "Black Friday 2023",
    "created_at": "2023-11-16T15:26:16.516-03:00",
    "updated_at": "2023-11-16T16:02:54.702-03:00",
    "verb": "post"
}