People lookup

People lookup webhooks are emitted by the Accounts API when a person lookup is created (POST /people-lookups), updated (PUT /people-lookups/:personId), or deleted (DELETE /people-lookups/:personId).

Events

Action Event name
create person (POST /people-lookups) peopleLookups.created
update person (PUT /people-lookups/:personId) peopleLookups.updated
delete person (DELETE /people-lookups/:personId) peoplelookups.deleted

Payload example (peopleLookups.created / peopleLookups.updated)

The webhook payload includes the standard envelope (id, attemptId, created, event, livemode) and a data object. The API emits { providerId, apiKey, data: person }; the envelope may expose these as data.providerId, data.apiKey, and data.data (or data) containing the person document.

{
  "attemptId": "20ebdb3d-85e1-47a4-a81d-7b6c7dd1a481",
  "created": 1634755434,
  "data": {
    "providerId": "52a377ec430c7d4e220001fc",
    "apiKey": "the-x-api-key-header-value",
    "data": {
      "_id": "5f243d100617680712e78dd7",
      "accountId": "52a377ec430c7d4e220001fc",
      "documentTypeId": "5f243d100617680712e78dd7",
      "documentNumber": "AS35F",
      "firstName": "Anna",
      "lastName": "Jones",
      "fullName": "Anna Jones",
      "email": "name@mail.com",
      "phone": "+54911111111",
      "dynamicForms": {},
      "dynamicFormsFields": {},
      "createdBy": "5f243d100617680712e78dd7",
      "updatedBy": "5f243d100617680712e78dd7",
      "createdAt": { "value": "2021-01-15T10:00:00.000Z", "offset": 0 },
      "updatedAt": { "value": "2021-01-15T10:00:00.000Z", "offset": 0 }
    }
  },
  "event": "peopleLookups.created",
  "id": "2e32d603-a379-46f9-9393-ba4d1859e2fe",
  "livemode": true
}

Payload fields (peopleLookups.created / peopleLookups.updated)

Field Type Description
id string Webhook event id
attemptId string Delivery attempt id
created number Unix timestamp when the event was created
event string peopleLookups.created or peopleLookups.updated
livemode boolean Whether the account is in live mode
data object Custom payload from the API
data.providerId string Account id (ObjectId) that owns the person lookup
data.apiKey string Value of the X-API-KEY header used in the request
data.data object The person document (PeopleLookup): _id, accountId, documentTypeId, documentNumber, firstName, lastName, fullName, email, phone, dynamicForms, dynamicFormsFields, createdBy, updatedBy, createdAt, updatedAt

Payload example (peoplelookups.deleted)

{
  "attemptId": "fb29c7cd-6c24-4e14-ae40-cc3c413775b4",
  "created": 1665591574,
  "data": {
    "providerId": "52a377ec430c7d4e220001fc",
    "apiKey": "the-x-api-key-header-value",
    "data": {
      "personId": "5f243d100617680712e78dd7"
    }
  },
  "event": "peoplelookups.deleted",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "livemode": true
}

Payload fields (peoplelookups.deleted)

Field Type Description
id string Webhook event id
attemptId string Delivery attempt id
created number Unix timestamp when the event was created
event string peoplelookups.deleted
livemode boolean Whether the account is in live mode
data object Custom payload from the API
data.providerId string Account id (ObjectId) that owned the deleted person
data.apiKey string Value of the X-API-KEY header used in the request
data.data object Object containing the id of the deleted person
data.data.personId string The id (24 hex ObjectId) of the person that was deleted