Added

Implement the activities.added webhook to know when a new activity object is added.

A new activity object is added when a new account object is created and scanned.

After the initial scan is finished, activities are continuously added with periodic scanning if new ones are found in the account.

Event

activities.added

Payload

AttributesTypeDescription
accountstring uuidID of the account the activities were added to.
userstring uuidID of the user associated with the account.
added_fromstring timestampRepresents the start of the time period the activities were added for. The added_from timestamp will precede the added_to timestamp.

To get the added activities, you can query the activities endpoint by specifying the added_from, added_to range in the request parameters.
added_tostring timestampRepresents the end of the time period the activities are added for.
added_countintegerThe number of activities added to the account.
available_fromstring timestampRepresents the start of the time period the activities are available for. The available_from timestamp will precede the available_to timestamp.
available_tostring timestampRepresents the end of the time period the activities are available for.
available_countintegerThe total number of activities associated with the account at the moment the webhook call is made.

Examples

curl -X POST https://api.argyle.com/v1/webhooks \
  -u api_key_id:api_key_secret \
  -H "Content-Type: application/json" \
  -d '{"events": ["activities.added"],
       "secret": "<secret for signature verification>",
         "name": "activities.added",
          "url": "https://webhook.site/url"}'
{
    "event": "activities.added",
    "name": "Activities added",
    "data": {
        "account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
        "user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
        "added_from": "2019-08-07T20:12:09Z",
        "added_to": "2019-09-23T23:57:31Z",
        "added_count": 10,
        "available_from": "2019-03-07T20:12:09Z",
        "available_to": "2019-09-23T23:57:31Z",
        "available_count": 456
    }
}