Skip to main content
POST
/
v2
/
webhooks
Added
curl --request POST \
  --url https://api-sandbox.argyle.com/v2/webhooks \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    "accounts.added"
  ],
  "name": "name-for-the-webhook-subscription",
  "url": "https://your-webhook-backend.com",
  "secret": "optional-secret",
  "config": {
    "include_resource": true
  }
}
'
{
  "event": "accounts.added",
  "name": "name-for-the-webhook-subscription",
  "data": {
    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
    "resource": {
      "id": "0187c66e-e7e5-811c-b006-2232f00f426a",
      "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
      "employers": [
        "Whole Goods"
      ],
      "item": "item_123456789",
      "source": "thepayrollcompany",
      "created_at": "2023-01-30T12:53:22.561Z",
      "updated_at": "2023-01-30T12:53:23.123Z",
      "scanned_at": "1970-01-01T00:00:00Z",
      "connection": {
        "status": "connecting",
        "error_code": null,
        "error_message": null,
        "updated_at": "2023-01-30T12:53:23.123Z"
      },
      "direct_deposit_switch": {
        "status": "idle",
        "error_code": null,
        "error_message": null,
        "updated_at": "2023-01-30T12:53:23.123Z"
      },
      "availability": {
        "gigs": null,
        "paystubs": null,
        "payroll_documents": null,
        "identities": null,
        "ratings": null,
        "vehicles": null,
        "deposit_destinations": null,
        "user_forms": null
      },
      "ongoing_refresh": {
        "status": "idle"
      }
    }
  }
}
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).

Authorizations

Authorization
string
header
required

Username = api_key_id, Password = api_key_secret

Body

application/json
events
enum<string>[]
required

Array containing the accounts.added event. Value: accounts.added

Available options:
accounts.added
name
string
required

Your name for the webhook subscription.

url
string
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.

secret
string

Optional secret used to verify webhooks.

config
object

Response

200 - application/json
event
string

The event that triggered the webhook.

Example:

"accounts.added"

name
string

Name used for the webhook subscription.

Example:

"name-for-the-webhook-subscription"

data
object