Connection events: when each Vault webhook fires
Vault sends webhooks when your customers' connections change, so you can react without polling: for example, start the first sync when a connection becomes usable, or ask a customer to reconnect when it stops working.
Subscribing
Connection events use the same webhooks as the rest of Apideck. In the dashboard, add a webhook for the Vault API and pick the events you want. They're sent to the same delivery URL, signed the same way, and retried on the same schedule. See the webhooks guide.
The events
Event | When it fires |
|---|---|
| A connection is created for a consumer, usually when the customer starts connecting. It's not usable yet at this point. |
| The connection becomes usable: authorization and any required settings are complete and Apideck checked the connection. This is the event to start syncing on. |
| The connection changed: it was authorized or re-authorized, its settings were saved, or it was revoked. |
| The connection was disabled ( |
| The connection was deleted. |
| Access was revoked, from Vault or by the customer at the provider (where the provider tells us). |
| The connection moved to another connector, for example from QuickBooks to Intuit Enterprise Suite. |
| Refreshing the access token failed. The connection still works for now, and Apideck tries again the next time a request needs a token. |
| A later refresh succeeded. Nothing to do. |
| Refreshing failed for good. The customer has to re-authorize. |
| The provider's API is failing or timing out for this connection. |
| The provider's API is responding again. |
Typical sequences
A customer connects an OAuth app:
created→updated→callable.A customer re-authorizes a broken connection:
updated, thencallableif it had stopped being callable.A refresh token stops working:
token_refresh.pending, then eithertoken_refresh.recovered, ortoken_refresh.failedon the first refresh attempt that still fails at least 48 hours after the first failure. There's no timer: if the connection isn't used,failedonly arrives with the next attempt.
Things to know
The connection is in the payload.
payload.entityholds the connection, includingservice_id,unified_api,consumer_id,stateandhealth. The top-levelservice_idandunified_apiare alwaysapideck-vaultandvaultfor these events, so read the connector fromentity.service_id.Order isn't guaranteed.
createdandcallablecan arrive in either order, and each event retries on its own schedule. Useentity.staterather than the order of arrival.Deduplicate by header. Use the
x-apideck-idempotency-keyheader, notevent_id, which changes with every delivery attempt.A rejected call doesn't send an event by itself. If a provider rejects a connection's credentials during an API call, the connection's state changes without a webhook. You'll see it in the next event or when you fetch the connection. Subscribe to
token_refresh.failedto catch expired authorizations.Timing: events are sent within moments of the change, not instantly.
callablewaits until Apideck has checked the connection, which can take a few seconds after the customer finishes.
Contact Apideck support through the Customer Portal (the Requests link at the top of this help center), your Slack channel with us, or support@apideck.com if an event doesn't arrive.
