Skip to main content

Create Webhook

Creating a webhook allows you to receive immediate updates and alerts regarding changes in the status of important entities or events.

Endpoint: https://api.amlwatcher.com/api/webhook

Method: POST

Sample Request
POST /api/webhook HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token
Content-Type: application/json
Content-Length: 144

{
"name":"Nodejs server",
"endpoint":"your-webhook-url",
"type":"monitored_status_updated"
}

Request

ParametersRequiredTypeDescription
nameYesStringRepresent your webhook name, making it easy to identify its purpose and function.
endpointYesStringSpecify 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
typeYesStringDefine the type of webhook, which may include event-specific types.
Default type: monitored_status_updated
Accepted Values: monitored_status_updated, status_change

Response

ParametersDescription
errorWhenever there is an error in your request, this param will have details of that error; otherwise it’ll remain empty.
statusThe status field is set to either “SUCCESS” or “FAIL”, indicating that the API request resulted in a successful or failure/error condition respectively.
dataAn 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"
}