> For the complete documentation index, see [llms.txt](https://verisync.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://verisync.gitbook.io/docs/integration-options/webhooks.md).

# Webhooks

Webhooks allow you to set up a notification system that can be used to receive updates on certain requests made to the Verisync API.

Generally, when you make a request to an API endpoint, you expect to get a near-immediate response. However, some requests may take a long time to process, which can lead to timeout errors. In order to prevent a timeout error, a pending response is returned. Since your records need to be updated with the final state of the request, you need to either:

* Make a request for an update (popularly known as polling) or,
* Listen to events by using a webhook URL.

### Verify event origin

Since your webhook URL is publicly available, you need to verify that events originate from Verisync and not a bad actor. There are two ways to ensure events to your webhook URL are from Verisync:

* Signature validation
* IP whitelisting

#### Signature validation

Events sent from Verisync carry the `verisync-signature header`. The value of this header is a `HMAC SHA256` signature of the event payload signed using your secret key. Verifying the header signature should be done before processing the event:

{% tabs %}
{% tab title="Node" %}

```javascript
const crypto = require('crypto');
const secret = process.env.CLIENT_SECRET;

// Using Express
app.post("/my/webhook/url", function(req, res) {
    //validate event
    const hash = crypto.createHmac('sha256', secret).update(JSON.stringify(req.body)).digest('hex');
    if (hash == req.headers['verisync-signature']) {
    // Retrieve the request's body
    const event = req.body;
    // Do something with event  
    }
    res.send(200);
});
```

{% endtab %}

{% tab title="PHP" %}

```javascript
const crypto = require('crypto');
const secret = process.env.CLIENT_SECRET;

// Using Express
app.post("/my/webhook/url", function(req, res) {
    //validate event
    const hash = crypto.createHmac('sha256', secret).update(JSON.stringify(req.body)).digest('hex');
    if (hash == req.headers['verisync-signature']) {
    // Retrieve the request's body
    const event = req.body;
    // Do something with event  
    }
    res.send(200);
});
```

{% endtab %}

{% tab title="Python" %}

```python
import os
from flask import Flask, request, jsonify
from hashlib import hmac, SHA256

# Initialize Flask app
app = Flask(__name__)
APP_SECRET = os.getenv("CLIENT_SECRET")

@app.route('/my/webhook/url', methods=["POST"])
def my_webhook():
    # Validate event
    data_to_sign = json.dumps(request.json).encode()
    computed_hash = hmac(SHA256(), APP_SECRET.encode()).hexdigest(data_to_sign)
    
    if computed_hash == request.headers.get('verisync-signature'):
        event = request.json
        # Perform actions on 'event' here...
        
        return jsonify({"status": "success"}), 200
    else:
        return jsonify({"error": "Invalid signature."}), 401
```

{% endtab %}
{% endtabs %}

#### IP whitelisting <a href="#ip-whitelisting" id="ip-whitelisting"></a>

With this method, you only allow certain IP addresses to access your webhook URL while blocking out others. Verisync will only send webhooks from the following IP addresses:

1. **13.42.70.11**

You should whitelist these IP addresses and consider requests from other IP addresses a counterfeit.

{% hint style="info" %}
**Whitelisting is domain independent**

The IP addresses listed above are applicable to both test and live environments. You can whitelist them in your staging and production environments.
{% endhint %}

### Supported events <a href="#supported-events" id="supported-events"></a>

These are the possible webhook events you can recieve from verisync&#x20;

{% tabs %}
{% tab title="Sync Successful" %}

```json
{
  "event": "sync.success",
  "data": {
    "reason": null,
    "deviceFingerprint": {
      "device": {
        "os": {
          "name": "Mac OS",
          "version": "10.15.7"
        },
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "cpu": {},
        "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "device": {
          "model": "Macintosh",
          "vendor": "Apple"
        },
        "engine": {
          "name": "Blink",
          "version": "120.0.0.0"
        },
        "browser": {
          "name": "Chrome",
          "major": "120",
          "version": "120.0.0.0"
        }
      },
      "location": {
        "eu": "0",
        "ip": "41.184.8.12",
        "ll": [
          10,
          8
        ],
        "area": 500,
        "city": "",
        "metro": 0,
        "range": [
          699924480,
          699932671
        ],
        "region": "",
        "country": "NG",
        "timezone": "Africa/Lagos"
      }
    },
    "flow": {
      "id": "0fa34faf-41f1-41b6-baca-1bdd1db32721",
      "reference": "flw_PGnev9Vkxo",
      "name": "Biometric and Document verification 6"
    },
    "metadata": null,
    "verifications": [
      {
        "id": "43600668-7900-406c-811f-de4fd57afee4",
        "reference": "vrf_s7FXLFNBU7",
        "idNumber": "B50383639",
        "firstName": "LUTHFULAHI",
        "lastName": "OSENI",
        "middleName": "OLAITAN",
        "phone": null,
        "email": null,
        "dateOfBirth": "1999-03-31",
        "age": null,
        "sex": "M",
        "country": "NG",
        "nationality": "NGA",
        "issuedDate": null,
        "expiryDate": "2032-11-28",
        "aml": {
          "step": {
            "id": "watchlists",
            "data": [
              {
                "country": "NG",
                "watchlist": {
                  "id": 468,
                  "name": "Banco Interamericano de Desarrollo",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.814Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 455,
                  "name": "US Denied Persons",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.844Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 1221,
                  "name": "HM Treasury Sanctions List",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.856Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 481,
                  "name": "Personas de Interes",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.921Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 463,
                  "name": "Swiss SECO Sanctions",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.922Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 470,
                  "name": "UN Consolidated Sanctions",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.928Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 480,
                  "name": "DEA Most Wanted",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.946Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 439,
                  "name": "INTERPOL Red Notices",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.955Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 1026,
                  "name": "SAT 69B",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.978Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 333,
                  "name": "UK Most Wanted",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:08.992Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 466,
                  "name": "CoE Parliamentary Assembly",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.011Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 471,
                  "name": "US Marshalls Service",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.012Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 437,
                  "name": "US Bureau of Industry and Security",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.013Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 430,
                  "name": "GB Consolidated List of Targets",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.016Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 472,
                  "name": "FBI Most Wanted",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.076Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 469,
                  "name": "EU Members of Parliament",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.094Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 467,
                  "name": "CIA World Leaders",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.095Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 328,
                  "name": "UK Bank of England Sanctions list",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.113Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 1369,
                  "name": "CO SIGEP Informe",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.157Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 1220,
                  "name": "EU Designated Terrorists",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.165Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 458,
                  "name": "US OFAC",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.180Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 1370,
                  "name": "CO SIGEP Declaraciones",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.182Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              },
              {
                "country": "NG",
                "watchlist": {
                  "id": 843,
                  "name": "EU financial sanctions",
                  "watchlistType": "basic"
                },
                "dataSource": "document-data",
                "searchedAt": "2024-01-28T16:35:09.193Z",
                "documentType": "passport",
                "searchParams": {
                  "fullName": "LUTHFULAHI OLAITAN OSENI",
                  "dateOfBirth": "31-03-1999",
                  "documentNumber": "B50383639"
                },
                "searchResult": null
              }
            ],
            "error": null,
            "status": 200
          },
          "flowId": "64db87f07e10b6001ba9ca7d",
          "metadata": {
            "idType": "passport",
            "userId": "9234494b-ad85-4284-8f1f-758faba30828",
            "selfieType": "selfie-photo",
            "selfieVerificationId": "ddfd7737-d722-4aa3-89a5-722bc5b944d8",
            "documentVerificationId": "43600668-7900-406c-811f-de4fd57afee4"
          },
          "resource": "https://api.prod.metamap.com/v2/verifications/65b681aab19f32001d7ba02e",
          "eventName": "step_completed",
          "timestamp": "2024-01-28T16:35:11.940Z"
        },
        "amlRisk": "",
        "address": null,
        "assets": [
          {
            "iso": "NG",
            "url": "https://verisync.s3.us-east-2.amazonaws.com/c94905f7-8e0b-4c2a-ac67-b93411189a53-PassportO.jpg",
            "type": "passport",
            "filename": "PassportO.jpg",
            "stateCode": ""
          }
        ],
        "channel": "web",
        "active": true,
        "message": null,
        "reverifyReason": null,
        "reverifiedAt": null,
        "verifiedAt": "2024-01-29T09:42:21.099Z",
        "deviceFingerprint": {
          "ip": "3.9.13.82",
          "ua": "axios/1.4.0",
          "origin": "",
          "vpnDetectionEnabled": false
        },
        "status": "approved",
        "createdAt": "2024-01-28T16:32:39.760Z",
        "updatedAt": "2024-01-29T09:42:19.845Z",
        "identity": {
          "id": "ae24f21b-2e2d-4d73-ba1a-2eb1fa18b878",
          "reference": "id_jSFK0agbV",
          "name": "International Passport",
          "slug": "passport",
          "description": "Verify your international passport",
          "recomended": true,
          "type": "foundational",
          "category": "document-verification",
          "active": true,
          "status": "approved",
          "createdAt": "2024-01-27T18:04:54.184Z",
          "updatedAt": "2024-01-27T18:04:54.184Z"
        }
      },
      {
        "id": "ddfd7737-d722-4aa3-89a5-722bc5b944d8",
        "reference": "vrf_s5eSoZzvZu",
        "idNumber": null,
        "firstName": null,
        "lastName": null,
        "middleName": null,
        "phone": null,
        "email": null,
        "dateOfBirth": null,
        "age": null,
        "sex": null,
        "country": "",
        "nationality": null,
        "issuedDate": null,
        "expiryDate": null,
        "aml": null,
        "amlRisk": null,
        "address": null,
        "assets": [
          {
            "iso": "",
            "url": "https://verisync.s3.amazonaws.com/05c94f48-e32c-450f-af26-acc86e00372a-selfie_1706459515289.png",
            "type": "selfie-photo",
            "filename": "selfie_1706459515289.png",
            "stateCode": ""
          }
        ],
        "channel": "web",
        "active": true,
        "message": null,
        "reverifyReason": null,
        "reverifiedAt": null,
        "verifiedAt": "2024-01-29T09:42:21.099Z",
        "deviceFingerprint": {
          "ip": "3.9.13.82",
          "ua": "axios/1.4.0",
          "origin": "",
          "vpnDetectionEnabled": false
        },
        "status": "approved",
        "createdAt": "2024-01-28T16:31:58.579Z",
        "updatedAt": "2024-01-29T09:42:21.117Z",
        "identity": {
          "id": "1e94ed1f-be93-42b4-8728-24adbfc495fd",
          "reference": "id_kVRtMXMTvw",
          "name": "Selfie Photo",
          "slug": "selfie-photo",
          "description": "Verify your selfie photo",
          "recomended": false,
          "type": "functional",
          "category": "biometric-verification",
          "active": true,
          "status": "approved",
          "createdAt": "2024-01-27T18:04:54.184Z",
          "updatedAt": "2024-01-27T18:04:54.184Z"
        }
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Sync Updated" %}

```json
{
  "event": "sync.updated",
  "data": {
    "reason": "Verification Completed",
    "flow": {
      "id": "aaa862e7-0ad4-44a7-84de-134d5d5e5d4b",
      "reference": "flw_EOiAUYZjTt",
      "name": "Biometric and Document verification"
    },
    "metadata": null,
    "verification": {
      "id": "60a5f2c2-1ea7-410d-9654-d4e644862de4",
      "reference": "vrf_ijcdnrBc7",
      "idNumber": "B50383639",
      "firstName": "LUTHFULAHI",
      "lastName": "OSENI",
      "middleName": "OLAITAN",
      "phone": null,
      "email": null,
      "dateOfBirth": "1999-03-31",
      "age": null,
      "sex": "M",
      "country": "NG",
      "nationality": "NGA",
      "issuedDate": null,
      "expiryDate": "2032-11-28",
      "aml": {
        "id": "watchlists",
        "data": [
          {
            "country": "NG",
            "watchlist": {
              "id": 455,
              "name": "US Denied Persons",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:54.993Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 481,
              "name": "Personas de Interes",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.004Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 1221,
              "name": "HM Treasury Sanctions List",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.006Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 468,
              "name": "Banco Interamericano de Desarrollo",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.008Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 472,
              "name": "FBI Most Wanted",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.011Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 480,
              "name": "DEA Most Wanted",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.056Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 466,
              "name": "CoE Parliamentary Assembly",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.057Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 471,
              "name": "US Marshalls Service",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.077Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 463,
              "name": "Swiss SECO Sanctions",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.080Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 1220,
              "name": "EU Designated Terrorists",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.111Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 1370,
              "name": "CO SIGEP Declaraciones",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.112Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 333,
              "name": "UK Most Wanted",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.133Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 458,
              "name": "US OFAC",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.139Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 469,
              "name": "EU Members of Parliament",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.150Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 467,
              "name": "CIA World Leaders",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.165Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 1369,
              "name": "CO SIGEP Informe",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.172Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 843,
              "name": "EU financial sanctions",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.193Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 430,
              "name": "GB Consolidated List of Targets",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.197Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 437,
              "name": "US Bureau of Industry and Security",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.203Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 470,
              "name": "UN Consolidated Sanctions",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.204Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 328,
              "name": "UK Bank of England Sanctions list",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.237Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 439,
              "name": "INTERPOL Red Notices",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.237Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          },
          {
            "country": "NG",
            "watchlist": {
              "id": 1026,
              "name": "SAT 69B",
              "watchlistType": "basic"
            },
            "dataSource": "document-data",
            "searchedAt": "2024-01-29T10:14:55.253Z",
            "documentType": "passport",
            "searchParams": {
              "fullName": "LUTHFULAHI OLAITAN OSENI",
              "dateOfBirth": "31-03-1999",
              "documentNumber": "B50383639"
            },
            "searchResult": null
          }
        ],
        "error": null,
        "reused": false,
        "status": 200,
        "cacheHit": null,
        "dataSource": "document-data",
        "connectedDocumentType": "passport"
      },
      "amlRisk": "",
      "address": null,
      "assets": [
        {
          "iso": "NG",
          "url": "https://verisync.s3.us-east-2.amazonaws.com/63f4bbde-f5e4-4a27-87fd-61572247864f-PassportO.jpg",
          "type": "passport",
          "filename": "PassportO.jpg",
          "stateCode": ""
        }
      ],
      "channel": "web",
      "active": false,
      "message": null,
      "reverifyReason": null,
      "reverifiedAt": null,
      "verifiedAt": null,
      "deviceFingerprint": {
        "ip": "3.9.13.82",
        "ua": "axios/1.4.0",
        "origin": "",
        "vpnDetectionEnabled": false
      },
      "status": "reviewing",
      "createdAt": "2024-01-29T10:13:24.115Z",
      "updatedAt": "2024-01-29T10:18:27.100Z"
    }
  }
}
```

{% endtab %}

{% tab title="Sync Processing " %}

```json
{
  "event": "sync.processing",
  "data": {
    "reason": null,
    "deviceFingerprint": {
      "device": {
        "os": {
          "name": "Mac OS",
          "version": "10.15.7"
        },
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "cpu": {},
        "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "device": {
          "model": "Macintosh",
          "vendor": "Apple"
        },
        "engine": {
          "name": "Blink",
          "version": "120.0.0.0"
        },
        "browser": {
          "name": "Chrome",
          "major": "120",
          "version": "120.0.0.0"
        }
      },
      "location": {
        "eu": "0",
        "ip": "2001:8f8:1b27:2e3f:59e9:e867:2ae6:ffd7",
        "ll": [
          24,
          54
        ],
        "area": 100,
        "city": "",
        "metro": 0,
        "range": "",
        "region": "",
        "country": "AE",
        "timezone": "Asia/Dubai"
      }
    },
    "flow": {
      "id": "aaa862e7-0ad4-44a7-84de-134d5d5e5d4b",
      "reference": "flw_EOiAUYZjTt",
      "name": "Biometric and Document verification"
    },
    "metadata": null,
    "verifications": [
      {
        "id": "60a5f2c2-1ea7-410d-9654-d4e644862de4",
        "reference": "vrf_ijcdnrBc7",
        "idNumber": null,
        "firstName": null,
        "lastName": null,
        "middleName": null,
        "phone": null,
        "email": null,
        "dateOfBirth": null,
        "age": null,
        "sex": null,
        "country": "NG",
        "nationality": null,
        "issuedDate": null,
        "expiryDate": null,
        "aml": null,
        "amlRisk": null,
        "address": null,
        "assets": [
          {
            "iso": "NG",
            "url": "https://verisync.s3.us-east-2.amazonaws.com/63f4bbde-f5e4-4a27-87fd-61572247864f-PassportO.jpg",
            "type": "passport",
            "filename": "PassportO.jpg",
            "stateCode": ""
          }
        ],
        "channel": "web",
        "active": false,
        "message": null,
        "reverifyReason": null,
        "reverifiedAt": null,
        "verifiedAt": null,
        "deviceFingerprint": null,
        "status": "reviewing",
        "createdAt": "2024-01-29T10:13:24.115Z",
        "updatedAt": "2024-01-29T10:13:24.115Z",
        "identity": {
          "id": "ae24f21b-2e2d-4d73-ba1a-2eb1fa18b878",
          "reference": "id_jSFK0agbV",
          "name": "International Passport",
          "slug": "passport",
          "description": "Verify your international passport",
          "recomended": true,
          "type": "foundational",
          "category": "document-verification",
          "active": true,
          "status": "approved",
          "createdAt": "2024-01-27T18:04:54.184Z",
          "updatedAt": "2024-01-27T18:04:54.184Z"
        }
      },
      {
        "id": "e0417fa5-69b2-4547-a3e6-ef215f7cee73",
        "reference": "vrf_3T13UsvVtj",
        "idNumber": null,
        "firstName": null,
        "lastName": null,
        "middleName": null,
        "phone": null,
        "email": null,
        "dateOfBirth": null,
        "age": null,
        "sex": null,
        "country": "",
        "nationality": null,
        "issuedDate": null,
        "expiryDate": null,
        "aml": null,
        "amlRisk": null,
        "address": null,
        "assets": [
          {
            "iso": "",
            "url": "https://verisync.s3.us-east-2.amazonaws.com/98220053-ad5c-4956-b57f-943606b09141-selfie_1706522765666.png",
            "type": "selfie-photo",
            "filename": "selfie_1706522765666.png",
            "stateCode": ""
          }
        ],
        "channel": "web",
        "active": false,
        "message": null,
        "reverifyReason": null,
        "reverifiedAt": null,
        "verifiedAt": null,
        "deviceFingerprint": null,
        "status": "reviewing",
        "createdAt": "2024-01-29T10:06:07.440Z",
        "updatedAt": "2024-01-29T10:06:07.440Z",
        "identity": {
          "id": "1e94ed1f-be93-42b4-8728-24adbfc495fd",
          "reference": "id_kVRtMXMTvw",
          "name": "Selfie Photo",
          "slug": "selfie-photo",
          "description": "Verify your selfie photo",
          "recomended": false,
          "type": "functional",
          "category": "biometric-verification",
          "active": true,
          "status": "approved",
          "createdAt": "2024-01-27T18:04:54.184Z",
          "updatedAt": "2024-01-27T18:04:54.184Z"
        }
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

### Types of events <a href="#types-of-events" id="types-of-events"></a>

Here are the events we currently raise. We would add more to this list as we hook into more actions in the future.

| Event             | Description                                                             |
| ----------------- | ----------------------------------------------------------------------- |
| `sync.success`    | A successful synchronization was  made                                  |
| `sync.updated`    | A sync information was updated                                          |
| `sync.processing` | A sync initiated successfully and the verifications are still in review |
| `sync.failed`     | A sync initialization failed                                            |
| `sync.revoked`    | A sync revoked no more update concerning the sync will be sent          |
| `sync.restored`   | A sync restored  more update concerning the sync will be sent           |
