Accounts Webhooks
Sent when account connection events occur.
The accounts.added
webhook is sent when a user submits login credentials through Link. A new account object is created after the login credentials have undergone authentication, regardless of whether the connection was successful (accounts.connected
is sent) or unsuccessful (accounts.failed
is sent).
#Added
The accounts.added
webhook is sent when a user submits login credentials through Link.
- #eventsarray of stringsrequired
accounts.added
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
- #configobjectoptional
"include_resource": true
will return the account object in the response within aresource
object.
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["accounts.added"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret",
10 "config": { "include_resource": true }
11 }'
1{
2 "event": "accounts.added",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69"
7 }
8}
#Updated
The accounts.updated
webhook is sent when there is any change to a property value of the account object.
When an account is first connected, the accounts.updated
webhook is sent frequently — each time new data is added or used to refine a previous value.
Whenever the accounts.connected
and accounts.failed
webhooks are sent, the accounts.updated
webhook is sent as well.
- #eventsarray of stringsrequired
accounts.updated
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
- #configobjectoptional
"include_resource": true
will return the account object in the response within aresource
object.
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["accounts.updated"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret",
10 "config": { "include_resource": true }
11 }'
1{
2 "event": "accounts.updated",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69"
7 }
8}
#Removed
The accounts.removed
webhook is sent when a user revokes access to their account or an account is deleted.
When an account is removed all resources associated with the account, such as paystubs or uploaded documents, are deleted and this webhook is sent.
It is not recommend to use .removed
webhooks for particular data sets to monitor for account deletions or revoked access, as they are not sent when an account is removed.
- #eventsarray of stringsrequired
accounts.removed
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["accounts.removed"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "accounts.removed",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69"
7 }
8}
#Connected
The accounts.connected
webhook is sent when a user's login credentials are successfully authenticated and the account connection was successful.
The webhook is also sent when a user re-connects an existing account.
- #eventsarray of stringsrequired
accounts.connected
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
- #configobjectoptional
"include_resource": true
will return the account object in the response within aresource
object.
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["accounts.connected"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret",
10 "config": { "include_resource": true }
11 }'
1{
2 "event": "accounts.connected",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69"
7 }
8}
#Failed
The accounts.failed
webhook is sent when:
- The user submits login credentials that fail to authenticate.
- The user submits login credentials to re-authenticate an account and authentication fails.
- The user submits login credentials but there is a timeout during a required multi-factor authentication (MFA) process.
To stay notified of account disconnections, instead use the accounts.updated
webhook with a resource
object included, and check for changes the account object's connection.status
property.
- #eventsarray of stringsrequired
accounts.failed
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
- #configobjectoptional
"include_resource": true
will return the account object in the response within aresource
object.
- #eventstring
accounts.failed
- #namestring
Name used for the webhook subscription.
- #dataobject
- #accountstring (uuid)
ID of the account.
- #userstring (uuid)
ID of the user.
- #error_codestring (enum)
The account connection error that occurred.
- #error_messagestring
The account connection error message.
- #resourceobjectoptional
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["accounts.failed"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret",
10 "config": { "include_resource": true }
11 }'
1{
2 "event": "accounts.failed",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7 "error_code": "invalid_mfa",
8 "error_message": "This user did not provide the correct multi-factor authentication response."
9 }
10}