BizKitHub
DocsAPI ReferenceOrganisation/bff/organisation-ai/set-api-key
postOrganisationAdmin BFF

/bff/organisation-ai/set-api-key

Validates the supplied API key with a minimal probe call against the provider and, on success, persists it into cas__organisation_configuration under the matching key (ai_gemini_api_key / ai_openai_api_key / ai_anthropic_api_key). Invalidates the in-memory provider cache for this organisation.

OrganisationpostBffOrganisation-aiSet-api-key

Parameters

JSON body

Request body

application/json
provider"google" | "openai" | "anthropic"Required
apiKeystringRequired

The provider API key to store. Validated by a probe call before persistence.

Response schema

1 status code documented

200Success
successbooleanRequired
Default: true
warningstring | nullRequired

Non-fatal probe warning. Present when the key was saved but the probe round-trip failed for a non-auth reason (model access, transient error). Null when the probe cleanly authenticated.

One of 2:
Variant 1
string
Variant 2
null

Response example

application/json
{
  "success": true
}

Request example

POST /bff/organisation-ai/set-api-key

post
curl -X POST "https://api.bizkithub.com/bff/organisation-ai/set-api-key" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "apiKey": "example_apiKey"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key