Hanzo
OpenapiIntegrations

Is the direct intake path: a customer-held token/setup-token (Verify) or an…

Is the direct intake path: a customer-held token/setup-token (Verify) or an externally obtained OAuth bundle from the CLI's local PKCE (Adopt).

POST /v1/integrations/connectors/{provider}/credential

Addresshttps://api.hanzo.ai/v1/integrations/connectors/{provider}/credential
MethodPOST
Operationpost_integrations_connectors_by_provider_credential
AuthAuthorization: Bearer $HANZO_API_KEY

Is the direct intake path: a customer-held token/setup-token (Verify) or an externally obtained OAuth bundle from the CLI's local PKCE (Adopt). ALWAYS verify-before-store: a bad credential is refused and NOTHING is persisted (connectByCredential's fail-closed order).

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
providerpathstringyesProvider is the user-scoped provider's registry id, from the path.
accountIdbodystringAccountID scopes the credential where the provider's Verify needs one.
labelbodystringLabel names this connection; empty means "default".
oauthbodyoauthBundleIn
oauth.accessbodystringAccess is the access token.
oauth.accountbodystringAccount is the account label the flow reported; sanitized on ingest.
oauth.refreshbodystringRefresh is the refresh token.
providerbodystringProvider is the user-scoped provider's registry id, from the path.
tokenbodystringToken is the customer-held credential for the Verify path.

Response

StatusBodyMeaning
200credentialOutok

200 body — 10 fields.

FieldInTypeAlwaysDescription
connectedbodybooleanConnected is always true — a failed verification is a 400 and stores nothing.
connectorbodyconnView
connector.accountbodystringAccount is the provider's label for the connected account.
connector.connectedAtbodystringConnectedAt is when the connector was last (re)established, RFC 3339 UTC.
connector.expiresAtbodystringExpiresAt is when the access token expires, RFC 3339 UTC; empty for a non-expiring credential.
connector.externalIdbodystringExternalID is the provider's own id for that account.
connector.idbodystringID is provider + ":" + label — what every other connector route addresses.
connector.labelbodystringLabel is the caller's name for this connection ("default", "work").
connector.providerbodystringProvider is the user-scoped provider's registry id.
connector.scopesbodystring[]Scopes are the permissions the credential carries.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Integrations API · All Hanzo APIs · Interactive reference

How is this guide?

On this page