Create Webhook
Creating a webhook allows you to receive immediate updates and alerts regarding changes in the status of important entities or events.
POST/api/webhook
POST https://api.amlwatcher.com/api/webhook HTTP/1.1Host: api.amlwatcher.comAuthorization: Bearer TokenContent-Type: application/jsonContent-Length: 144{"name":"Nodejs server","endpoint":"your-webhook-url","type":"monitored_status_updated"}
Request
Parameters | Required | Type | Description |
---|---|---|---|
name | Yes | String | Represent your webhook name, making it easy to identify its purpose and function. |
endpoint | Yes | String | Specify the URL where you want to receive webhook notifications. This is where AML Watcher will send POST requests with event data. Example: https://webhook.site/26184bd6-6d7c-429a-9131-fe009ee74e |
type | Yes | String | Define the type of webhook, which may include event-specific types. Default type: monitored_status_updated Accepted Values: monitored_status_updated, status_change |
Response
Parameters | Description |
---|---|
error | Whenever there is an error in your request, this param will have details of that error; otherwise it’ll remain empty. |
status | The status field is set to either “SUCCESS” or “FAIL”, indicating that the API request resulted in a successful or failure/error condition respectively. |
data | An array/object containing the actual response elements. |
Sample Response
{
"data": {
"_id": {
"$oid": "653f715f2cd970a571dcd"
},
"created_at": {
"$date": 16986602294
},
"endpoint": "https://webhook.site/26184bd6-6d7c-429a-9131-fe009ee74e",
"name": "Test Webhook",
"organization_id": {
"$oid": "6512d7134bb9cd92fe394"
},
"type": "monitored_status_updated",
"updated_at": {
"$date": 169866094
},
"user_id": {
"$oid": "6512d715dadd1b87911a6"
}
},
"error": false,
"status": "SUCCESS"
}