How the data reaches you once an account is connected: the webhooks Smile emits, the two ways to get the datapoints, and how long Smile keeps them.
Event Notifications
Wink events reach you in two ways:
- The Wink Widget fires JavaScript events that you may capture via implementation of callback functions (see Widget Reference).
- Once the user has connected, the Smile servers fire Webhook events that you may receive via implementation of a webhook endpoint.
1. Widget Notifications
As the user moves through the widget, any activities performed by the user are captured and are either used to update the messages and presentation of the modal window, or are sent to Smile so that any source-related data can be retrieved.
See Event Notifications for more information, and the callback table in Widget Reference for the events you can listen to. Invitation and Wink Site users run inside a Smile-hosted page, so their widget-level events are only available to you through the account webhooks below.
2. Account Status Notifications
Smile uses webhooks to notify your application in real time when an event happens in our servers that is related to your environment, such as an end user successfully connecting an account, or the data sync process completing so the data is ready for ingestion.
See Webhooks for more information, and Subscribe to Webhook to create and verify your endpoint.
Once the user authenticates with a provider, the Link status changes to "CONNECTED". You can query the account status at any time via the /accounts endpoint. Examples of the events captured include:
| Event | Description |
|---|---|
| PENDING | The account was created but is pending successful authentication |
| AWAITING_MFA | The user was able to successfully authenticate however the data provider is waiting for the user to enter their verification code in a 2-factor authentication scenario. |
| ERROR | The data provider returned an error. The user may have entered the wrong credentials, or there was a problem on the provider's side. |
| CONNECTED | The user was able to successfully authenticate with an employment data provider. |
| DISCONNECTED | The user disconnected the link with the employment data provider. |
You can also let the user revoke access to their account data using the /accounts endpoint. All data related to the revoked account will be removed from the system.
Retrieve the user data
Once an account is connected, there are two ways to get its datapoints. Both return the same data — pick the one that matches how your integration consumes it.
Option 1 — take the payload from the webhook
Register the webhook with includePayload: true and subscribe to TASK_FINISHED. Smile then delivers the datapoints inline when the sync finishes, so no follow-up API call is needed.
curl --request POST \
--url https://sandbox.smileapi.io/v1/webhooks \
--header 'Authorization: Basic <base64(api-key:api-secret)>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Wink data sync",
"url": "https://example.com/smile/webhook",
"eventTypes": ["TASK_FINISHED"],
"active": true,
"secret": "<webhook-secret>",
"includePayload": true
}'includePayloadapplies toTASK_FINISHED.- List datapoints are capped at 300 items per group; page through the matching endpoint for the rest.
- Delivery is at-least-once: de-duplicate on the event
idand answer2xxquickly.
See Webhooks for the event list and Subscribe to Webhook for the setup.
Option 2 — pull the payload
GET /accounts/{id}/payload returns every datapoint for the account in a single call:
curl --request GET \
--url "https://sandbox.smileapi.io/v1/accounts/<account-id>/payload" \
--header 'Authorization: Basic <base64(api-key:api-secret)>'Use it when you need the data on demand rather than pushed:
- the webhook was created with
includePayload: false; - you are re-reading or backfilling data that was stored earlier;
- you did not receive
TASK_FINISHEDand want to confirm whether the sync has finished — an emptydatameans it is still running, so retry with backoff (for example 1, 5 and 15 minutes) before treating it as a failure.
The call is not billable, so polling for a bounded window is safe — but cap the attempts so a stuck sync never becomes an unbounded loop.
Which one to use
| Situation | Use |
|---|---|
| You want the data pushed as soon as the sync finishes | Option 1 — webhook with includePayload: true |
| You need to re-read, backfill, or verify a sync | Option 2 — GET /accounts/{id}/payload |
Maintaining User Data
User data is stored by Smile API only until one of the following occur:
- The user revokes access to their data
- The access is revoked via the Revoke API (i.e. if initiated by the developer)
- 60 days have passed from account connection
To keep access past the 60-day limit, retrieve and store the data on your own servers — Retrieve the user data covers the two ways to do it. You can then revoke the data at Smile as soon as you have it. You will also receive an event notification when the user manually revokes sharing.
Refreshing a User's Token
You can refresh a user's token by calling the /tokens endpoint; pass the userId as a query parameter to issue a new token for that user. More information is in the Tokens endpoint documentation.

