AI Chat Plugin
Complete a provider Connect flow and store the tenant's credential.
POST
http://localhost:3000/api/ai-chat/credentials/connect
Body
application/json
tenantobjecttenantIdstringorganizationobjectrequiredorganizationIdstringrequiredsentTostringproviderIdstringrequiredAI provider identifier (must support a connect flow)
codestringrequiredOne-time authorization code returned by the provider
codeVerifierstringrequiredPKCE code verifier generated by the client before authorizing
Response
201Created
Connected: the exchanged API key was stored (returned masked).
400Bad Request
Provider unknown or does not support Connect.
502Bad Gateway
The provider rejected or failed the exchange.