Verify and Reactivate Connection
POST/api/accounting/sync-settings/connection
Verifies the stored authorization with one live call to the accounting provider and reactivates the connection only if that call succeeds.
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token. Also requires the integrations.update permission.
No request body.
sync_status goes Inactive when the provider rejects the stored authorization, so switching it back on unconditionally would re-arm a dead credential — the next scheduled sync would fail and set it straight back to Inactive. The verification therefore happens first:
- Xero — reads the connected organisation
- QuickBooks Online — reads the connected company
Both are reads; neither writes anything to the provider.
On success (200) sync_status becomes Active and the response carries the refreshed connection state, plus probe_detail naming the organisation or company that answered. The standing "Integration Authorization Expired" alert raised when the connection was deactivated is resolved at the same time, and the documents stranded while the connection was inactive are queued for sending — reactivating on its own would only resume sync from that moment forward and leave the whole outage window behind.
A connection left Inactive is also re-verified automatically once an hour, and comes back on its own as soon as its stored authorization works again — so a connection dropped by a transient provider rejection recovers without anyone calling this endpoint.
On a failed verification (422) nothing changes, message carries the reason, and probe_detail carries the provider's own error where it gave one. Reauthorize the connection, then call this again.
Returns 404 when no accounting integration is configured.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.