Create a webhook

To create a webhook, use the POST method. The POST body must contain at least the webhook and tableName parameters in JSON format.

Component Description

HTTP method

POST

URL

https://host/fmi/odata/version/database-name/Webhook.Add

host – FileMaker Cloud or FileMaker Server host name

version – the OData version, always v4

database-name – the name of the hosted database

Example: /fmi/odata/v4/ContactMgmt/Webhook.Add

Parameters

JSON example:

Copy
{
  "webhook": "https://my.exmple.com:8080/webhook",
  "endpointHeaders": {
    "Content-Type": "application/json"
  },
  "queryHeaders": {
     "Prefer": "fmodata.entity-ids",
     "Accept": "application/json;IEEE754Compatible=true"
  },
  "tableName": "myTable",
  "notifySchemaChanges": true,
  "select": "PrimaryKey,CreatedBy",
  "filter": "CreatedBy eq 'Admin'",
  "maxFailedAttempts": 10
}

Notes 

  • queryHeaders control how the webhook payload is generated, while endpointHeaders (or the legacy headers) are always sent to the endpoint without affecting processing. In the example above, queryHeaders with:

    • "Prefer": "fmodata.entity-ids" will cause the webhook payload to use entity IDs instead of table and field names.

    • "Accept": "application/json;IEEE754Compatible=true" will enclose decimal values in quotes.

  • maxFailedAttempts applies to the created webhook. Setting maxFailedAttempts to 0 indicates no maximum and that the webhook will retry sending the payload indefinitely until either the payload is received successfully or the webhook is deleted. Retry attempts are logged in the fmodata.log file.

  • If only webhook and tableName are included in the request, the following parameters will use their default values:

    Copy
    {
      ...
      "headers": {},
      "notifySchemaChanges": false,
      "maxFailedAttempts": 0,
      "select": "",
      "filter": ""
     }