Skip to main content
There are two types of activity webhook events:
  • Events that trigger only during the initial scan when a new account is connected: activities.fully_synced and activities.partially_synced. They trigger once per invocation for each added account.
  • Events that trigger later on, when new activities are added or removed in the future: activities.added, activities.updated, and activities.removed. These only trigger on a periodic scan for accounts that are already connected and have been fully synced, and only after the activities.fully_synced event is triggered.
A typical account can contain thousands of activities and activities.fully_synced only fires after all of the activities are scanned, which in some cases might take hours. Use activities.partially_synced if you only need a partial range of the activities. For example, you need a history of the last 30 days instead of a complete history of activities. This reduces the sync time to minutes or, in some cases, seconds.

Fully synced

POST /v1/webhooks Implement the activities.fully_synced webhook to know when all activities have been scanned.
  • The activities.fully_synced webhook triggers when all activities are fully scanned. Scanning starts from the most recent activities and finishes with the oldest ones.
  • This webhook only triggers when the initial scan finishes. It is not invoked during periodic scanning.

Request body

Webhook message

  • name (string, optional): Name used for the webhook subscription.
  • data (object, optional)
  • account (string (uuid), optional): ID of the account.
  • user (string (uuid), optional): ID of the user.
  • available_to (string (timestamp), optional): The date of the most recent available activity.
  • available_count (integer, optional): The total number of activities associated with the account at the moment the webhook call is made.
curl --request POST \\
--url https://api.argyle.com/v1/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["activities.fully_synced"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret"
}'

{
"event": "activities.fully_synced",
"name": "All historical data synced",
"data": {
"account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
"user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
"available_from": "2019-03-07T20:12:09Z",
"available_to": "2019-09-23T23:57:31Z",
"available_count": 432
}
},
null,
2
  

Partially synced

POST /v1/webhooks Implement the activities.partially_synced webhook to know when 30 days of historical activities have been scanned.
  • By default, the activities.partially_synced webhook triggers when 30 days of historical activities have been successfully scanned (starting from the date when the account was added).
  • The number of days scanned is a configurable parameter. This webhook can be subscribed to multiple times with different day ranges.
  • Triggers only on the initial scan, and does not trigger during a periodic scan. If an account has zero or a small number of activities, the initial scan may return all historical data and only fire the activities.fully_synced webhook.

Request body

Webhook message

  • name (string, optional): Name used for the webhook subscription.
  • data (object, optional)
  • account (string (uuid), optional): ID of the account.
  • user (string (uuid), optional): ID of the user.
  • days_synced (integer, optional): Number of historical days synced.
  • available_count (integer, optional): The total number of activities associated with the account at the moment the webhook call is made.
curl --request POST \\
--url https://api.argyle.com/v1/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["activities.partially_synced"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret",
"config": { "days_synced": 7 }
}'

{
"event": "activities.partially_synced",
"name": "7 days synced",
"data": {
"account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
"user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
"days_synced": 7,
"available_from": "2019-06-07T20:12:09Z",
"available_to": "2019-06-14T20:12:09Z",
"available_count": 324
}
},
null,
2
  

Added

POST /v1/webhooks Implement the activities.added webhook to know when a new activity object is added. An activity object will be added:
  • When a new account is connected, and its scanned data includes activities data
  • On a continuous basis, if a new activity is retrieved during Argyle’s periodic scanning of connected accounts
Two time periods are recorded and delivered in the activities.added payload:
  • available_from and available_to specify the date range of all activities associated with the account
  • added_from and added_to specify the date range of the newly added activities
To retrieve recently added activities, list activities using the query parameters:
  • account = the ID returned in the account field of the activities.added webhook payload
  • from_start_date = the added_from timestamp in the activities.added webhook payload
  • to_start_date = the added_to timestamp in the activities.added webhook payload

Request body

Webhook message

  • name (string, optional): Name used for the webhook subscription.
  • data (object, optional)
  • account (string (uuid), optional): ID of the account.
  • user (string (uuid), optional): ID of the user.
  • added_to (string (timestamp), optional): The time of the latest activity that was recently added.
  • added_count (integer, optional): The number of activities added to the account.
  • available_to (string (timestamp), optional): The date of the most recent available activity.
  • available_count (integer, optional): The total number of activities associated with the account at the moment the webhook call is made.
curl --request POST \\
--url https://api.argyle.com/v1/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["activities.added"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret"
}'

{
"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
}
},
null,
2
  

Updated

POST /v1/webhooks Implement the activities.updated webhook to know when an activity object is updated.
  • Activity objects are updated through periodic scanning.

Request body

Webhook message

  • name (string, optional): Name used for the webhook subscription.
  • data (object, optional)
  • account (string (uuid), optional): ID of the account.
  • user (string (uuid), optional): ID of the user.
  • updated_to (string (timestamp), optional): Represents the end of the time period the activities were updated in.
  • updated_count (integer, optional): The number of activities that were updated.
  • updated_activities (array of (uuid) strings, optional): ID’s of the updated activities.
  • available_to (string (timestamp), optional): Represents the end of the time period the activities are available for.
  • available_count (integer, optional): The total number of activities associated with the account at the moment the webhook call is made.
curl --request POST \\
--url https://api.argyle.com/v1/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["activities.updated"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret"
}'

{
"event": "activities.updated",
"name": "Activities updated",
"data": {
"account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
"user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
"updated_from": "2019-09-10T10:00:00Z",
"updated_to": "2019-09-12T12:00:00Z",
"updated_count": 2,
"updated_activities": [
"d667a477-e252-4f8a-9518-92a51b235187",
"27f3cde1-1ca0-4b5a-940d-337fd33f97b5"
],
"available_from": "2019-03-07T20:12:09Z",
"available_to": "2019-09-23T23:57:31Z",
"available_count": 456
}
},
null,
2
  

Removed

POST /v1/webhooks
Implement the activities.removed webhook to know when an activity object is removed.
  • An activity object is removed when specific activities are deleted from an account by a data provider and are found to be missing during a periodic scan.

Request body

Webhook message

  • name (string, optional): Name used for the webhook subscription.
  • data (object, optional)
  • account (string (uuid), optional): ID of the account.
  • user (string (uuid), optional): ID of the user.
  • removed_to (string (timestamp), optional): Represents the end of the time period the activities were removed in.
  • removed_count (integer, optional): The total number of activities removed from the account at the moment the webhook call is made.
  • removed_activities (array of (uuid) strings, optional): ID’s of the removed activities.
  • available_to (string (timestamp), optional): Represents the end of the time period the activities are available for.
  • available_count (integer, optional): The total number of activities associated with the account at the moment the webhook call is made.
curl --request POST \\
--url https://api.argyle.com/v1/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["activities.removed"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret"
}'

{
"name": "Activities Removed",
"event": "activities.removed",
"data": {
"account": "017d9bdc-49cb-bcf6-9a99-f3ed32ddb2c2",
"user": "017d8fed-b702-7675-e9be-00d6b2d24614",
"removed_from": "2021-09-27T00:22:54Z",
"removed_to": "2021-09-27T00:22:54Z",
"removed_count": 1,
"removed_activities": [
"017d9f62-84e1-15ad-b269-624458d343c8"
],
"available_from": "2019-09-03T17:56:22Z",
"available_to": "2021-12-09T00:01:01Z",
"available_count": 1237
}
},
null,
2