Connection events: when each Vault webhook fires

Edited

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

vault.connection.created

A connection is created for a consumer, usually when the customer starts connecting. It's not usable yet at this point.

vault.connection.callable

The connection becomes usable: authorization and any required settings are complete and Apideck checked the connection. This is the event to start syncing on.

vault.connection.updated

The connection changed: it was authorized or re-authorized, its settings were saved, or it was revoked.

vault.connection.disabled

The connection was disabled (enabled: false).

vault.connection.deleted

The connection was deleted.

vault.connection.revoked

Access was revoked, from Vault or by the customer at the provider (where the provider tells us).

vault.connection.migrated

The connection moved to another connector, for example from QuickBooks to Intuit Enterprise Suite.

vault.connection.token_refresh.pending

Refreshing the access token failed. The connection still works for now, and Apideck tries again the next time a request needs a token.

vault.connection.token_refresh.recovered

A later refresh succeeded. Nothing to do.

vault.connection.token_refresh.failed

Refreshing failed for good. The customer has to re-authorize.

vault.connection.downstream.degraded

The provider's API is failing or timing out for this connection.

vault.connection.downstream.recovered

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, then callable if it had stopped being callable.

  • A refresh token stops working: token_refresh.pending, then either token_refresh.recovered, or token_refresh.failed on 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, failed only arrives with the next attempt.

Things to know

  • The connection is in the payload. payload.entity holds the connection, including service_id, unified_api, consumer_id, state and health. The top-level service_id and unified_api are always apideck-vault and vault for these events, so read the connector from entity.service_id.

  • Order isn't guaranteed. created and callable can arrive in either order, and each event retries on its own schedule. Use entity.state rather than the order of arrival.

  • Deduplicate by header. Use the x-apideck-idempotency-key header, not event_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.failed to catch expired authorizations.

  • Timing: events are sent within moments of the change, not instantly. callable waits until Apideck has checked the connection, which can take a few seconds after the customer finishes.

Related

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.

Was this article helpful?

Sorry about that! Care to tell us more?

Thanks for the feedback!

There was an issue submitting your feedback
Please check your connection and try again.