Skip to content

Settings API ​

Configure optimization and general settings for your account.

Get Settings ​

Retrieve your current settings.

http
GET /api/v1/settings

Response ​

json
{
  "general": {
    "name": "My Company",
    "industry": "SaaS",
    "preferredLLM": "gpt-4o",
    "objectives": "Improve customer support efficiency",
    "kpis": "Reduce response time, increase satisfaction",
    "insightRequirements": "Focus on user engagement metrics",
    "excludedDataAndTopics": "Sensitive PII, competitor mentions"
  },
  "optimization": {
    "optimizationStrategy": "exploratory",
    "variantsPerGeneration": 3,
    "deploymentMode": "manual",
    "maxIterations": 10,
    "simulation": {
      "personaCount": 5,
      "scenariosPerSimulation": 3,
      "maxTurns": 10,
      "confidenceMode": "moderate"
    }
  }
}

Update Settings ​

Update specific settings. Only provided fields are updated.

http
PATCH /api/v1/settings

Request Body ​

json
{
  "general": {
    "preferredLLM": "claude-3.5-sonnet"
  },
  "optimization": {
    "variantsPerGeneration": 5,
    "simulation": {
      "personaCount": 10
    }
  }
}

Response ​

json
{
  "success": true,
  "settings": {
    "general": { ... },
    "optimization": { ... }
  }
}

Settings Reference ​

General Settings ​

FieldTypeDescription
namestringOrganization name
industrystringYour industry/vertical (e.g., "SaaS", "E-commerce")
preferredLLMstringDefault LLM model for new prompts
objectivesstringBusiness objectives for optimization
kpisstringKey performance indicators to optimize for
insightRequirementsstringWhat insights matter most
excludedDataAndTopicsstringData/topics to exclude from analysis

Optimization Settings ​

FieldTypeDefaultDescription
optimizationStrategystringexploratoryDefault mode: exploratory or validation
variantsPerGenerationnumber3Variants per optimization (1-5)
deploymentModestringmanualmanual or semi-automatic
autoDeploy.enabledbooleanfalseAuto-deploy winners that pass regression
autoDeploy.requireRegressionPassbooleantrueRequire regression tests to pass before auto-deploy
maxIterationsnumber10Maximum optimization iterations

Simulation Settings ​

FieldTypeDefaultDescription
personaCountnumber5Personas per simulation
scenariosPerSimulationnumber3Scenarios per simulation
maxTurnsnumber10Max conversation turns
confidenceModestringmoderatelow, moderate, or high

Optimization Strategies ​

Exploratory Mode ​

Best for quick iteration and testing ideas:

  • Faster execution (fewer simulations)
  • Lower statistical rigor
  • Good for initial optimization
json
{
  "optimization": {
    "optimizationStrategy": "exploratory",
    "variantsPerGeneration": 3
  }
}

Validation Mode ​

Best for production-critical prompts:

  • More thorough testing
  • Higher statistical confidence
  • Slower but more reliable results
json
{
  "optimization": {
    "optimizationStrategy": "validation",
    "variantsPerGeneration": 3,
    "simulation": {
      "confidenceMode": "high"
    }
  }
}

Deployment Modes ​

Manual ​

Review and approve all changes before deployment:

json
{
  "optimization": {
    "deploymentMode": "manual"
  }
}

Workflow:

  1. Optimization completes
  2. Review results in dashboard
  3. Click "Apply" to deploy winner

Semi-Automatic ​

Automatically stage winning variants for review:

json
{
  "optimization": {
    "deploymentMode": "semi-automatic"
  }
}

Workflow:

  1. Optimization completes
  2. Winner is staged (not live)
  3. Approve to make live

Auto-Deploy ​

Automatically deploy winners that pass regression testing:

json
{
  "optimization": {
    "autoDeploy": {
      "enabled": true,
      "requireRegressionPass": true
    }
  }
}

Workflow:

  1. Optimization completes with a winner
  2. Regression tests run automatically
  3. If tests pass, winner is deployed
  4. If any production metric regresses after deployment, it rolls back automatically

SDK Usage ​

typescript
// Get settings
const settings = await converra.settings.get();
console.log('Strategy:', settings.optimization.optimizationStrategy);

// Update settings
await converra.settings.update({
  optimization: {
    variantsPerGeneration: 5,
    simulation: {
      personaCount: 10
    }
  }
});

Sync from Website ​

Automatically extract business context from your website:

http
POST /api/v1/settings/sync-context

Request Body ​

json
{
  "url": "https://example.com",
  "overwrite": false
}

Parameters ​

FieldTypeDefaultDescription
urlstringrequiredYour company website URL
overwritebooleanfalseOverwrite existing values

Response ​

json
{
  "success": true,
  "extracted": {
    "industry": "SaaS",
    "objectives": "Help developers ship faster"
  }
}

This uses AI to analyze your website and populate:

  • Industry
  • Business objectives
  • KPIs

Error Responses ​

Invalid Settings ​

json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid settings",
    "details": {
      "optimization.variantsPerGeneration": "Must be between 1 and 5"
    }
  }
}

Unknown Field ​

json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Unknown field: optimization.unknownField"
  }
}