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":"https://webhook.example.com","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.example.com |
| 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, compliance_ai_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": "Webhook ID"
},
"created_at": {
"$date": 16986602294
},
"endpoint": "https://webhook.example.com",
"name": "Test Webhook",
"organization_id": {
"$oid": "Organization ID"
},
"type": "monitored_status_updated",
"updated_at": {
"$date": 169866094
},
"user_id": {
"$oid": "User ID"
}
},
"error": false,
"status": "SUCCESS"
}