Requirements
- a command-line console
- a self-hosted Meilisearch instance
- a server configured to receive
POSTrequests with an ndjson payload
Configure the webhook URL
Restart your Meilisearch instance and provide the webhook URL to--task-webhook-URL:
MEILI_TASK_WEBHOOK_URL.
Limits and constraints
You can create up to 20 webhooks per instance via the
/webhooks API route. Having many webhooks active at the same time may negatively impact performance, so only register the webhooks you actively need.Meilisearch Cloud may create internal webhooks to support features such as Analytics and monitoring. These Cloud-reserved webhooks are always returned with
isEditable: false and cannot be updated or deleted through the API.Optional: configure an authorization header and allow requests on private networks
Depending on your setup, you may need to provide an authorization header and allow requests on private networks. Provide these usingtask-webhook-authorization-header and experimental-allowed-ip-networks:
Test the webhook
A common asynchronous operation is adding or updating documents to an index. The following example adds a test document to ourmovies index:
POST request the URL you configured with --task-webhook-url. The request body will be one or more task objects in ndjson format: