Skip to main content
PATCH
/
api
/
ai-models
/
organization
/
{organizationId}
/
api-key
/
{provider}
/
toggle
Toggle provider enabled/disabled status
curl --request PATCH \
  --url https://your-instance.example.com/api/ai-models/organization/{organizationId}/api-key/{provider}/toggle \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "isEnabled": false
}
'
{
  "success": true,
  "message": "API key for anthropic removed successfully"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required
provider
string
required

Body

application/json
isEnabled
boolean
required

New enabled state for the provider; false disables it without removing the stored API key.

Response

Provider status toggled

Generic success envelope used for delete / update endpoints that do not return a resource.

success
enum<boolean>
required
Available options:
true
message
string