Integration.refreshed
Emitted each time an Integration is refreshed.
Integration.refresh emits Integration.refreshed when it completes on an Integration.
| Property | Value |
|---|---|
| Emitted by | Integration.refresh |
| Noun | Integration |
| Moves | Integration connected to needsReauth |
| Wakes | None. |
Payload
Each delivery is an Event record. data holds what Integration.refresh returns, and previous holds the state it left.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Integration.refreshed. |
at | datetime | required | When it happened. |
seq | integer | Its position in the namespace, one more than the Event before; any seq is a cursor into the history. | |
data | json | required | The Thing as the Action left it. |
data.integration | Integration | required | The Integration with a new refreshedAt, or in needsReauth. |
data.integration.acquired | string | required | One of owned, wrapped, or recruited. |
data.integration.terms | text | The terms the Startup holds the right to use and resell it under. | |
data.integration.scope | string | required | One of studio, startup, or customer. |
data.integration.sync | string | Which side leads a sync connector: platform or provider. | |
data.integration.mode | string | required | How records move: mirror writes db.sb out to the outside tool; import turns edits there into Changes. db.sb is the record in both. |
data.integration.state | string | required | Where the connected account stands; read fresh before every call. |
data.integration.venue | string | The id of the ad, social or app-store venue the account is on, when it is on one. | |
data.integration.account | string | The outside account’s own id, such as an ad account, a workspace or a repository. | |
data.integration.grants | string[] | The outside permissions the account holder approved: the narrowest set its Verbs need. | |
data.integration.connectedBy | Party | Who approved the connection; a Human’s own account is used only under that Human’s Mandate. | |
data.integration.environment | string | A test Integration reaches only the upstream’s test account, as a Stripe test account does. | |
data.integration.expiresAt | datetime | When access lapses unless refreshed. | |
data.integration.refreshedAt | datetime | When the platform last renewed the outside token. | |
data.integration.lastError | string | The error slug of the last failed call or refresh, cleared by the next success. | |
data.integration.cursor | string | Where the last sync run stopped, so the next run reads only what changed. | |
data.previous.state | string | required | The state before this Event: connected. |
Example
{
"$id": "https: //api.sb/ petpantry.shop/ events/ event_1",
"$type": "Event",
"name": "Integration.refreshed",
"at": "2026-10-22T12: 00: 00Z",
"data": {
"integration": {
"$id": "https: //api.sb/ petpantry.shop/ integrations/ integration_1",
"$type": "Integration",
"acquired": "owned",
"terms": "Resale allowed under the provider’s published API terms; 10, 000 calls a month included.",
"scope": "studio",
"sync": "Example sync",
"mode": "mirror",
"state": "needsReauth",
"venue": "Example venue",
"account": "Example account",
"grants": [
"Example grants"
],
"connectedBy": "party_1",
"environment": "test",
"expiresAt": "2026-10-22T12: 00: 00Z",
"refreshedAt": "2026-10-22T12: 00: 00Z",
"lastError": "Example last error",
"cursor": "Example cursor"
},
"previous": {
"state": "connected"
}
},
"seq": 1
}