Hanzo AI
OpenapiIntegrations

Create credential

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.
accountIdbodystring—AccountID scopes the credential where the provider's Verify needs one.
labelbodystring—Label names this connection; empty means "default".
oauthbodyoauthBundleIn—
oauth.accessbodystring—Access is the access token.
oauth.accountbodystring—Account is the account label the flow reported; sanitized on ingest.
oauth.refreshbodystring—Refresh is the refresh token.
providerbodystring—Provider is the user-scoped provider's registry id, from the path.
tokenbodystring—Token is the customer-held credential for the Verify path.

Response

StatusBodyMeaning
200credentialOutok

200 body — 10 fields.

FieldInTypeAlwaysDescription
connectedbodyboolean—Connected is always true — a failed verification is a 400 and stores nothing.
connectorbodyconnView—
connector.accountbodystring—Account is the provider's label for the connected account.
connector.connectedAtbodystring—ConnectedAt is when the connector was last (re)established, RFC 3339 UTC.
connector.expiresAtbodystring—ExpiresAt is when the access token expires, RFC 3339 UTC; empty for a non-expiring credential.
connector.externalIdbodystring—ExternalID is the provider's own id for that account.
connector.idbodystring—ID is provider + ":" + label — what every other connector route addresses.
connector.labelbodystring—Label is the caller's name for this connection ("default", "work").
connector.providerbodystring—Provider 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 integrations connectors credential <provider>

Integrations API · All Hanzo APIs · Interactive reference

How is this guide?

On this page