Hi @demoprod !
Yo have to expose your domain URL making a POST to /webhooks:
curl --location --request POST 'https://api.syncfy.com/v1/webhooks' \
--header 'Authorization: api_key api_key=<your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"api_key" : "<your_api_key",
"url" : "<your_exposed_url>",
"events" : ["credential_update"]
}'
And then you’ll get a response like this:
{
"rid": "c23aca2a-cacd-4ee4-8fcf-fcf142cf5181",
"code": 200,
"errors": null,
"status": true,
"message": null,
"response": {
"id_webhook": "5ed09dff3d43591a702f5783",
"id_user": null,
"events": [
"credential_update"
],
"url": "<your_exposed_url>",
"delay": 0,
"dt_created": 1590730239,
"dt_modified": 1594931843
}
}
The webhook notifications seems like this:
{
"endpoints": {
"credential": [
"/v1/credentials/5e793889ea4c5165d46f9811"
]
},
"event": "credential_create",
"id_credential": "5e793889ea4c5165d46f9811",
"id_external": "IXS7607092R5",
"id_job": "5e793889b783081dd61de29c",
"id_job_uuid": "5e793889b783081dd61de29b",
"id_site": "5da784f1f9de2a06483abec1",
"id_site_organization": "56cf4ff5784806152c8b4567",
"id_site_organization_type": "56cf4f5b784806cf028b4569",
"id_user": "5e751d54d0510472295413b3",
"is_executing": 1
}
You receive a notification each time a credential is created or updated.
You can see the diferent types of events here: https://syncfy.com/w/es/sync/public/app/(section:docs/mx/sync/webhooks/events)
Hope this info helps you 