Skip to content

Truto sends a webhook event at each step while a customer connects an account. Here is the order, and what each failure looks like.

Skip the reading — fast path for coding agents
CLI
truto accounts get <integrated_account_id> -o json
Skill
View truto skill on GitHub Cursor / Claude Code: /skill truto

end-user refers to the user who is connecting their account.

  1. Integrated account is created: When an integrated account is created, Truto will send an integrated_account:created webhook event. This event will contain the integrated account as the payload. When an existing account is reauthorized, Truto sends integrated_account:updated instead, and the remaining steps run in the same order.
  2. Post install steps run: Post install steps are requests, transformations and other steps that are defined on the integration to make the Unified and Proxy APIs work properly. These steps are run after the integrated account is created. If any of these steps fail, Truto will send an integrated_account:post_install_error webhook event. This event will contain the integrated account as the payload, the end-user will be notified on the Connect UI and the Link SDK will throw an error. Post install steps are not defined on all the integrations.
  3. Connection validation steps run: Connection validation steps are Unified and Proxy API requests that are defined on the integration to make sure that the connection is valid and has the necessary permissions required for making the API calls. They run only if the post install steps succeeded; when post install fails, validation is skipped. If any of these steps fail, Truto will send an integrated_account:validation_error webhook event. This event will contain the integrated account as the payload, the end-user will be notified on the Connect UI and the Link SDK will throw an error. Most integrations ship without validation steps, and a few include them. Add or change them on the installed integration's Configuration tab, under Connection validation: see Set up connection validation.
  4. Integrated account is activated: The integrated account is now ready to use -- Unified and Proxy API calls can be made against this integrated account, Truto will send an integrated_account:active webhook event. This event will contain the integrated account as the payload. This event is sent only after the post install and connection validation steps succeed. If either fails, the account keeps its post_install_error or validation_error status and no integrated_account:active event is sent.
  5. RapidForm submitted: If a RapidForm is defined on the installed integration, Truto will send an integrated_account:post_connect_form_submitted webhook event when the user submits the RapidForm on the Connect UI. This event will contain the integrated account as the payload. This event is sent after the integrated account is activated.
Warning

If the post install steps or connection validation steps fail, the integrated account is not deleted automatically. Once the cause is fixed, recover it without reconnecting: POST /integrated-account/run-post-install-actions with { "id": "<integrated-account-id>" } reruns post install and validation; on success the account returns to active and Truto sends integrated_account:active. POST /integrated-account/<integrated-account-id>/validate reruns validation alone. It moves an account out of validation_error only, back to active with integrated_account:active; an account in post_install_error keeps that status. It returns 404 when the integration has no validation step. You can also delete the integrated account.

A failed /validate run sets the account to validation_error, whatever its status was, and sends integrated_account:validation_error; the call itself answers 200 with success, the steps it ran and, when it fails, error. run-post-install-actions returns at once and runs in the background, so wait for integrated_account:active or one of the error events. In the dashboard, Run post install steps on the account's Connection card reruns post install and validation; it appears only when the integration has post install steps. From the CLI, truto accounts validate <id> reruns validation alone.

# Rerun post install and validation. Returns at once; the run continues in the background.
curl -X POST https://api.truto.one/integrated-account/run-post-install-actions \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id": "<integrated_account_id>"}'
 
# Rerun validation alone
curl -X POST https://api.truto.one/integrated-account/<integrated_account_id>/validate \
  -H "Authorization: Bearer $TRUTO_API_TOKEN"
# Rerun validation alone
truto accounts validate <integrated_account_id>

Account statuses

An integrated account's status is one of five values. The webhook column is the event Truto sends when an account reaches that status through the connection flow or Truto's own checks; setting status yourself with PATCH /integrated-account/{id} sends only integrated_account:updated.

Status When Webhook What to do
connecting Post install or validation steps are running, after a connect, a reconnect or run-post-install-actions. integrated_account:created for a new account, integrated_account:updated for a reconnect, none for a rerun Wait for integrated_account:active or one of the error events.
active The account is ready: its steps passed, or it recovered from needs_reauth. integrated_account:active, or integrated_account:reactivated after needs_reauth Call its APIs.
post_install_error A post install step failed. integrated_account:post_install_error Fix the cause, then rerun post install, or reconnect the account.
validation_error A validation step failed, while connecting or when validation was rerun. integrated_account:validation_error Fix the credentials or their permissions, then rerun validation, or reconnect the account.
needs_reauth Truto can no longer use the account's credentials: a token refresh failed, or the provider answered 401. integrated_account:authentication_error Reconnect the account. After 7 days unchanged it becomes stale.

Read an account's status, and last_error for the reason it failed:

curl https://api.truto.one/integrated-account/<integrated_account_id> \
  -H "Authorization: Bearer $TRUTO_API_TOKEN"
truto accounts get <integrated_account_id> -o json

When the connection fails before an account exists

Some attempts fail before Truto has an integrated account to attach events to: the end user cancels on the provider's consent screen or the provider refuses authorization, the OAuth token exchange fails, or Truto can't start or save the connection (for example, the integration has no OAuth app credentials configured in the environment). Truto then sends a link_token:connection_error webhook event instead of any integrated_account:* event. On a reauthorization it fires when the attempt fails before the existing account is updated.

The event's payload describes the attempt, not an account:

  • environment_id — the environment the link token belongs to.
  • tenant_id — the tenant the link token was created for, or null.
  • environment_integration_id — the installed integration being connected, or null when the failure came before one was resolved.
  • integration — the integration's name, or null.
  • error — a human-readable message, for example the provider's refusal reason.
  • redirect_uri — the redirect_uri from the link token, or null.
  • context — the context you set when creating the link token, or null. Values the end user typed into the Connect UI are not included.
  • integrated_account_id, environment_unified_model_id, scopes, persist_previous_context, truto_static_gate_id, region — the fields you sent to POST /link-token, each null when you didn't send it. integrated_account_id is set when the failed attempt was a reauthorization.
{
  "id": "<event-id>",
  "event": "link_token:connection_error",
  "payload": {
    "environment_id": "<environment-id>",
    "tenant_id": "acme-1",
    "environment_integration_id": "<environment-integration-id>",
    "integration": "hubspot",
    "error": "invalid_grant",
    "redirect_uri": "https://example.com/truto/callback",
    "context": null,
    "integrated_account_id": null,
    "environment_unified_model_id": null,
    "scopes": null,
    "persist_previous_context": null,
    "truto_static_gate_id": null,
    "region": null
  },
  "environment_id": "<environment-id>",
  "created_at": "2026-11-02T10:15:00.000Z",
  "webhook_id": "<webhook-id>"
}

An expired or invalid link token sends no event, because Truto cannot tell which environment it belongs to. Once an account exists, failures are reported with integrated_account:post_install_error and integrated_account:validation_error as described above.

Next

Set up connection validation adds validation steps to an integration, and Processing webhook events shows how to receive these events on your backend.