>  Switch To Link 5 and API v2 Documentation

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

post/v1/webhooks

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.
Request body
  • #
    eventsarray of strings
    required

    forms.submitted

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    forms.submitted

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    formstring (uuid)

    ID of the form.

Example Subscription
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     }'
Example Webhook
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

post/v1/webhooks

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.
Request body
  • #
    eventsarray of strings
    required

    forms.removed

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    forms.removed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    formstring (uuid)

    ID of the form.

Example Subscription
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     }'
Example Webhook
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

post/v1/webhooks

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 the forms.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.

Request body
  • #
    eventsarray of strings
    required

    forms.ocr_completed

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    forms.ocr_completed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    formstring (uuid)

    ID of the form.

Example Subscription
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     }'
Example Webhook
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

post/v1/webhooks

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 an ocr_data object with the specific type of error.
Request body
  • #
    eventsarray of strings
    required

    forms.ocr_failed

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    forms.ocr_failed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    formstring (uuid)

    ID of the form.

Example Subscription
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     }'
Example Webhook
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}
Updating Argyle status...
© 2024 Argyle Systems Inc.argyle.com