Skip to main content

Webhooks

Webhooks let you receive notifications about certain events without polling the API. You have to configure a URL that will be called by our system with a GET HTTP request for each event type you want to listen to with the endpoint PUT /api/v6/webhooks/{eventType}

note

When the webhook fails, we have a retry system that resends it. A notification email will be sent to you in case of failure. After 10 failed attempts, the webhook is disabled. To receive it again, you must reactivate it.

These query parameters will be sent to the url you specify:

  • eventType : Type of event, see list below
  • resourceId : Id of the object that triggered the event
  • userId : Id of the user owning the object that triggered the event
  • date : Unix timestamp
  • nonce: Nonce

And header:

  • x-webhook-signature: sha256=<signature> (without surrounding carets)
info

signature = base64_frombytes(hmac_sha256(secret, requestUrl)) where requestUrl is the complete url of the webhook request (including query arguments), secret is your webhook secret. The resulting digest is base64-encoded.

UPDATE webhook secret

PUT /api/v6/profile/webhook-secret

Revokes/reset your webhook signature secret. The response is the new secret that will be used to sign future webhook requests.

Response

{
"secret": "QQF909SvZ6AKFntP2RNiDdlKIQPuY8CwVoCMsoJVDLqWywDeRjtj+tos1JcQGgoQDy2g8gGwOB/CjOQApX+Bng=="
}

Example:

https://www.your-app.com/hooks?eventType=DATA_CONNECTION_CONNECTED&resourceId=d0e497f1-6052-4f0d-b876-d4e6d7cf25bc&date=1609459200&nonce=ff3a4945c82d0594e75b4588ddd416f0f6652882364c1769666eb0930d767e61a01ace35dab562ac359bc65c38fe4161e7cc93648a5da1db2aa2d1a139c5b3cd

List of possible event types

Event TypeResource IdDescription
DATA_CONNECTION_AUTH_REQUIREDDataConnectionThe data connection is created and requires an authorization from the user
DATA_CONNECTION_CONNECTINGDataConnectionThe user has begun the authorization procedure
DATA_CONNECTION_CONNECTEDDataConnectionThe data connection is ready to be used for data synchronization
DATA_CONNECTION_AUTH_ERRORDataConnectionThe user needs to re-authorize the data connection
DATA_CONNECTION_DISCONNECTEDDataConnectionYou asked to disconnect the data connection
DATA_SYNC_QUEUEDDataSyncA data synchronization has been asked
DATA_SYNC_AUTH_ERRORDataSyncA data synchronization ended with an authorization error. The corresponding data connection status also change to AUTH_ERROR. The user needs to re-authorize the connection
DATA_SYNC_FETCH_ERRORDataSyncA data synchronization ended with an error. This might be due to a temporary error. You should retry the synchronization
DATA_SYNC_FETCHINGDataSyncA data synchronization has been started
DATA_SYNC_SUCCESSDataSyncA data synchronization ended successfully
REPORT_SUBMITTEDReportThe report request has been sent successfully
REPORT_PROCESSINGReportThe report is being generated
REPORT_DONEReportThe report generation has ended successfully
REPORT_DONE_NO_DATAReportThe report generation has ended successfully but there is no data in the report
REPORT_CANCELLEDReportThe report generation has been canceled or has failed