Use the /webhooks to trigger automatic workflows when Meilisearch finishes processing tasks.

The webhook object

{
  "uuid": "V4_UUID_GENERATED_BY_MEILISEARCH",
  "url": "WEBHOOK_NOTIFICATION_TARGET_URL",
  "headers": {
    "HEADER": "VALUE",
  },
  "isEditable": false
}
  • uuid: a v4 uuid Meilisearch automatically generates when you create a new webhook
  • url: a string indication the URL Meilisearch should notify whenever it completes a task, required
  • headers: an object with HTTP headers and their values, optional, often used for authentication
  • isEditable: read-only Boolean field indicating whether you can edit the webhook. Meilisearch automatically sets this to false for its internal webhooks

The webhook payload

When Meilisearch finishes processing a task, it sends the relevant task object to all configured webhooks.

Get all webhooks

GET
/webhooks
Get a list of all webhooks configured in the current Meilisearch instance.

Example

Response: 200 OK

{
  "results": [
    {
      "uuid": "UUID_V4",
      "url": "WEBHOOK_TARGET_URL",
      "headers": {
        "HEADER": "VALUE",
      },
      "isEditable": false
    },
    {
      "uuid": "UUID_V4",
      "url": "WEBHOOK_TARGET_URL",
      "headers": null,
      "isEditable": true
    }
  ]
}

Get a single webhook

GET
/webhooks/{uuid}
Get a single webhook configured in the current Meilisearch instance.

Example

Response: 200 OK

{
  "uuid": "UUID_V4",
  "url": "WEBHOOK_TARGET_URL",
  "headers": {
    "HEADER": "VALUE",
  },
  "isEditable": false
}

Create a webhook

POST
/webhooks
Create a new webhook. When Meilisearch finishes processing a task, it sends the relevant task object to all configured webhooks.

Example

Response: 200 OK

{
  "uuid": "627ea538-733d-4545-8d2d-03526eb381ce",
  "url": "WEBHOOK_TARGET_URL",
  "headers": {
    "authorization": "SECURITY_KEY",
    "referer": "https://example.com",
  },
  "isEditable": true
}

Update a webhook

PATCH
/webhooks/{uuid}
Update the configuration for the specified webhook. To remove a field, set its value to null.
It is not possible to edit webhooks whose isEditable field is set to false.Meilisearch Cloud may create internal webhooks to support features such as Analytics and monitoring. These webhooks are always isEditable: false.

Example

Response: 200 OK

{
  "uuid": "627ea538-733d-4545-8d2d-03526eb381ce",
  "url": "WEBHOOK_TARGET_URL",
  "headers": {
    "authorization": "SECURITY_KEY"
  },
  "isEditable": true
}

Delete a webhook

DELETE
/webhooks/{uuid}
Delete a webhook and stop sending task completion data to the target URL.
It is not possible to delete webhooks whose isEditable field is set to false.

Example

Response: 204 No Content