Webhooks in Meilisearch allow you to subscribe to task completions — like document indexing or settings updates — by specifying a target URL to be notified once the task is finished. This is part of an event-driven model where your backend or service only reacts when something important happens.
This means you can:
Because the webhook notification is sent as a POST request, Meilisearch can include a payload—typically in JSON format—containing rich, structured information about the completed task:
uuid to uniquely identify the task (version 4)status (e.g. succeeded or failed).type (like documentAddition, indexCreation, etc.).indexUid and timestamps.This lets the receiver immediately take contextual action without an additional API call.
GET /webhooks
// Response
{
"results": [
{
"uuid": "0ed42a70-0a51-4757-9405-dfaa26be6170", //generated by the engine
"url": "<https://example.com/hook>", //required
"headers": { //optional
"authorization": "TOKEN",
},
"isEditable": false //set by the engine for the webhook set via the env var, read-only in all case
},
{
"uuid": "473486c1-1579-45f8-a636-2c4dc20ccd5c",
"url": "<https://example.com/hook>",
"headers": null,
"isEditable": true //created via the API
},
]
}
POST /webhooks
This will create a new editable webhook. It will generate a new uuid for it. The whole webhook is returned
// Request
{
"url": "<https://example.com/hook>", //required
"headers": { //optional
"authorization": "TOKEN",
}
}