Forms Webhooks
Learn about forms webhooks.
Forms webhooks notify your system when:
- A user submits a form, which can be either:
- When a user uploads employment documents
- When a user submits the Can't find your payroll provider form after they cannot find their employer or payroll provider
- A user removes all previously uploaded documents.
- Third party OCR is completed for documents uploaded by a user.
- Third party OCR has failed for documents uploaded by a user.
#Submitted
Implement the forms.submitted
webhook to know when a form object is submitted.
- This webhook is triggered when a user submits a form — for example, when a user uploads employment documents and submits the form, or answers and submits an income source form.
- #eventsarray of stringsrequired
forms.submitted
- #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/v1/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["forms.submitted"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "forms.submitted",
3 "name": "Form object was submitted.",
4 "data": {
5 "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6 "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7 "form": "ada143be-3c90-4534-b7ea-9899674dc6e0"
8 }
9}
#Removed
Implement the forms.removed
webhook to know when a form object is removed.
- This webhook is triggered when a user removes all previously uploaded documents.
- #eventsarray of stringsrequired
forms.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/v1/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["forms.removed"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "forms.removed",
3 "name": "Form object was removed.",
4 "data": {
5 "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6 "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7 "form": "ada143be-3c90-4534-b7ea-9899674dc6e0"
8 }
9}
#OCR completed
Implement the forms.ocr_completed
webhook to know when third party OCR is completed for uploaded documents.
- The
forms.ocr_completed
webhook notifies your system when data retrieval through third party OCR is completed for documents manually uploaded by users through Link. - The payload provided by this webhook does not include the actual metadata contents of the document. You can request these through the
/forms
endpoint, by calling GET/forms/{id}
with the form ID received in theforms.ocr_completed
webhook.
This webhook triggers when OCR is successful for at least one out of all documents within an upload form. If OCR fails for one or more of the remaining documents, the metadata
field of each failed document returns an ocr_data
object with the specific type of error
. Consult processing errors - third party OCR for more information about possible error types.
- #eventsarray of stringsrequired
forms.ocr_completed
- #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/v1/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["forms.ocr_completed"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "forms.ocr_completed",
3 "name": "OCR is completed",
4 "data": {
5 "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6 "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7 "form": "ada143be-3c90-4534-b7ea-9899674dc6e0"
8 }
9}
#OCR failed
Implement the forms.ocr_failed
webhook to know when OCR fails for uploaded documents.
- The
forms.ocr_failed
webhook notifies your system when data retrieval through third party OCR has failed for uploaded documents. - This webhook triggers when third party OCR has failed for all documents manually uploaded by the user using document upload. The
metadata
field of each failed document returns anocr_data
object with the specific type oferror
.
- #eventsarray of stringsrequired
forms.ocr_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.
1curl --request POST \
2 --url https://api.argyle.com/v1/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["forms.ocr_failed"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "forms.ocr_failed",
3 "name": "OCR has failed",
4 "data": {
5 "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6 "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7 "form": "4334r6e-a964-45eef6-b201-64464"
8 }
9}