POST Save AI Settings​
POST
/ai/settings
Persist the AI writing-assistant configuration.
Everything is nested under a single settings object. API-key handling has three cases: an empty api_key clears the stored key, a value starting with **** is treated as the masked value from GET /ai/settings and keeps the stored key, and any other value replaces it.
Credentials are stored in the WordPress option _fluent_ai_creds; the enable flag and custom prompt go to the FluentCRM option _ai_writing_settings.
Required capability: fcrm_manage_settings
Enforced by AiPolicy::saveSettings().
Authorizations​
ApplicationPasswords
WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password
Type
API Key (header: Authorization)
Request Body​
application/json
JSON
{
"settings": {
"is_enabled": "no",
"provider": "string",
"model": "auto",
"api_key": "string",
"custom_prompt": "string"
}
}
Responses​
Configuration saved.
application/json
JSON
{
"message": "string"
}