AI Models

Update model assignment for a system section

PUT
/api/ai-models/organization/{organizationId}/assignments

Assigns a (provider, model) pair to one of the supported system sections - dataExtraction, automations, or messageGeneration. SUPERADMIN-only and tenant-scoped. Validates that the provider and model both exist in the organization's AI model catalog before saving.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

organizationId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/ai-models/organization/string/assignments" \  -H "Content-Type: application/json" \  -d '{    "section": "messageGeneration",    "provider": "anthropic",    "model": "claude-sonnet-4-6"  }'
{  "success": true,  "message": "Model assignment for messageGeneration updated successfully",  "data": {    "section": "messageGeneration",    "assignment": {      "provider": "anthropic",      "model": "claude-sonnet-4-6"    }  }}