AI Models
Toggle provider enabled/disabled status
Flips the isEnabled flag on the stored provider entry. SUPERADMIN-only and tenant-scoped. If only the legacy anthropicApiKey exists for the org, it is migrated into the new providerApiKeys array as part of this call.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
organizationId*string
provider*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/ai-models/organization/string/api-key/string/toggle" \ -H "Content-Type: application/json" \ -d '{ "isEnabled": false }'{ "success": true, "message": "API key for anthropic removed successfully"}