Hanzo AI
OpenapiProvider

Refresh connection

Forces a token rotation for a connected connector, ahead of the automatic rotation a token read would do inside the expiry window.

POST /v1/connection/{id}/refresh

Addresshttps://api.hanzo.ai/v1/connection/{id}/refresh
MethodPOST
Operationpost_connection_by_id_refresh
AuthAuthorization: Bearer $HANZO_API_KEY

Forces a token rotation for a connected connector, ahead of the automatic rotation a token read would do inside the expiry window. Only providers that declare a Refresh support it.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the connector id, provider + ":" + label ("openai:default") — the auth-profile-id shape.

Response

StatusBodyMeaning
200provider.refreshOutok
defaultproblem-detailsrefused

200 body — 10 fields.

FieldInTypeAlwaysDescription
connectorbodyprovider.connectionView
connector.accountbodystringAccount is the human label of the connected third-party account (the Slack team name, the GitHub org login).
connector.connectedAtbodystringConnectedAt is when the connection was last (re)established, RFC 3339 UTC.
connector.expiresAtbodystringExpiresAt is when the access token expires, RFC 3339 UTC; empty for a credential that does not expire.
connector.externalIdbodystringExternalID is the provider's own id for the account (Slack team.id, GitHub installation_id) — the value inbound webhooks are mapped back to this org by.
connector.idbodystringID is provider + ":" + label, the address every connection route takes.
connector.labelbodystringLabel is the caller's own name for this connection ("default", "work").
connector.providerbodystringProvider is the connected provider's registry id.
connector.scopesbodystring[]Scopes are the permissions the provider granted.
refreshedbodybooleanRefreshed is always true — a failed rotation is an HTTP error.

Failure carries the platform error shape — see Errors.

Examples

hanzo connection refresh <id>

Provider API · All Hanzo APIs · Interactive reference

How is this guide?

On this page