Create a vault connection (managed credential)

Store a credential once and reference it by connection_id on a target, instead of passing raw headers. Secrets are KMS-sealed; OAuth tokens are refreshed automatically at execution time.

post/v1/connections

Request

  • Base URL: https://api.klanexai.com
  • URL: https://api.klanexai.com/v1/connections
  • Auth: API key in header X-API-Key

Request body

providerstring required

Label; known values (github, google, slack, hubspot, salesforce, stripe) auto-fill OAuth endpoints.

grant_type'static_bearer' | 'oauth2_client_credentials' | 'oauth2_authorization_code' required
tokenstring

static_bearer only.

client_idstring

oauth2 grants.

client_secretstring

oauth2 grants.

authorize_urlstring uri
token_urlstring uri
scopesstring[]
inject_headerstring
token_prefixstring

Response

Created. For oauth2_authorization_code the response includes an authorize_url to open in a browser for consent.

connection_idstring
providerstring
grant_type'static_bearer' | 'oauth2_client_credentials' | 'oauth2_authorization_code'
status'pending' | 'connected' | 'error'
inject_headerstring
scopesstring[]
expires_atstring date-time
authorize_urlstring

Present on create for authorization-code connections.

last_errorstring
created_atstring date-time
updated_atstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.