Outvexa

API reference

AI subscriptions

36 endpoints. All paths are relative to your installation, for example https://app.example.com.

get/api/v1/ai-subscriptions/access

Whether the signed-in user may use personal AI subscriptions

Signed-in userSuccess: 200

No parameters.

Request
curl -X GET "https://app.example.com/api/v1/ai-subscriptions/access" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

get/api/v1/ai-subscriptions/connections

Subscription connection status (no credentials are returned)

Signed-in userSuccess: 200

No parameters.

Request
curl -X GET "https://app.example.com/api/v1/ai-subscriptions/connections" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-subscriptions/claude/connect

Connect Claude with a token from `claude setup-token`

Signed-in user10 requests / 1 h per userSuccess: 200

Request body (JSON)

tokenrequiredstringLength 20–500
Request
curl -X POST "https://app.example.com/api/v1/ai-subscriptions/claude/connect" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "string"
  }'

post/api/v1/ai-subscriptions/codex/login

Start Codex ChatGPT sign-in (device code)

Signed-in user10 requests / 1 h per userSuccess: 200

No parameters.

Request
curl -X POST "https://app.example.com/api/v1/ai-subscriptions/codex/login" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

get/api/v1/ai-subscriptions/codex/login

Codex sign-in progress

Signed-in userSuccess: 200

No parameters.

Request
curl -X GET "https://app.example.com/api/v1/ai-subscriptions/codex/login" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

delete/api/v1/ai-subscriptions/codex/login

Cancel a pending Codex sign-in

Signed-in userSuccess: 200

No parameters.

Request
curl -X DELETE "https://app.example.com/api/v1/ai-subscriptions/codex/login" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-subscriptions/{provider}/test

Test a subscription connection with a minimal real request

Signed-in user20 requests / 1 h per userSuccess: 200

Path parameters

providerrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/ai-subscriptions/$PROVIDER/test" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

put/api/v1/ai-subscriptions/{provider}/settings

Model, concurrency, delay and pause for a subscription

Signed-in userSuccess: 200

Path parameters

providerrequiredstring

Request body (JSON)

modelstring | null
concurrencyintegerRange 1–4
delayMsintegerRange 0–600000
pausedboolean
Request
curl -X PUT "https://app.example.com/api/v1/ai-subscriptions/$PROVIDER/settings" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "string",
    "concurrency": 1,
    "delayMs": 0,
    "paused": true
  }'

delete/api/v1/ai-subscriptions/{provider}

Disconnect a subscription (removes the stored credential / signs Codex out)

Signed-in userSuccess: 200

Path parameters

providerrequiredstring
Request
curl -X DELETE "https://app.example.com/api/v1/ai-subscriptions/$PROVIDER" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

get/api/v1/ai-workflows

List AI workflows (presets are created on first use)

Signed-in userSuccess: 200

No parameters.

Request
curl -X GET "https://app.example.com/api/v1/ai-workflows" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-workflows

Create a workflow

Signed-in userSuccess: 201

Request body (JSON)

namerequiredstringLength 1–100
descriptionstring | null
stagesrequiredobject[]
stages[].idrequiredstringPattern ^[a-z0-9-]{4,40}$
stages[].namerequiredstringLength 1–80
stages[].enabledbooleanDefault true
stages[].providerrequiredenumOne of: CLAUDE_SUBSCRIPTION, CODEX_SUBSCRIPTION, API:OPENAI, API:ANTHROPIC, API:GOOGLE, API:OPENROUTER, API:GROQ, API:TOGETHER, API:DEEPSEEK, API:MISTRAL, API:OLLAMA, API:CUSTOM_OPENAI
stages[].modelstring | nullDefault null
stages[].taskTyperequiredenumOne of: PROSPECT_RESEARCH, WEBSITE_ANALYSIS, SOCIAL_MEDIA_ANALYSIS, BUSINESS_ANALYSIS, PAIN_POINT_IDENTIFICATION, EMAIL_ANGLE_SELECTION, COLD_EMAIL_GENERATION, EMAIL_HUMANIZATION, GRAMMAR_REVIEW, PERSONALIZATION_REVIEW, FINAL_QUALITY_CHECK, CUSTOM
stages[].instructionsstringLength 0–8000 · Default ""
stages[].inputsstring[]Default ["prospect","research_evidence","playbook","previous"]
stages[].outputFormatrequiredenumOne of: RESEARCH_JSON, ANGLES_JSON, EMAIL_VARIANTS_JSON, QUALITY_REVIEW_JSON, TEXT
stages[].variantsintegerRange 1–5 · Default 3
stages[].temperaturenumber | nullDefault null
stages[].reasoningEffortenum | nullOne of: minimal, low, medium, high · Default null
stages[].allowWebResearchbooleanDefault false
stages[].retryobjectDefault {"maxAttempts":2,"backoffSec":30}
stages[].retry.maxAttemptsintegerRange 1–5 · Default 2
stages[].retry.backoffSecintegerRange 1–3600 · Default 30
stages[].timeoutSecintegerRange 30–1800 · Default 300
stages[].continueOnErrorbooleanDefault false
stages[].conditionenumOne of: always, if_previous_succeeded, skip_if_provider_unavailable · Default "always"
Request
curl -X POST "https://app.example.com/api/v1/ai-workflows" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "stages": [
      {
        "id": "string",
        "name": "string",
        "provider": "CLAUDE_SUBSCRIPTION",
        "taskType": "PROSPECT_RESEARCH",
        "outputFormat": "RESEARCH_JSON"
      }
    ]
  }'

get/api/v1/ai-workflows/{id}

Get a workflow

Signed-in userSuccess: 200

Path parameters

idrequiredstring
Request
curl -X GET "https://app.example.com/api/v1/ai-workflows/$ID" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

put/api/v1/ai-workflows/{id}

Update a workflow (stages, order, providers, instructions)

Signed-in userSuccess: 200

Path parameters

idrequiredstring

Request body (JSON)

namerequiredstringLength 1–100
descriptionstring | null
stagesrequiredobject[]
stages[].idrequiredstringPattern ^[a-z0-9-]{4,40}$
stages[].namerequiredstringLength 1–80
stages[].enabledbooleanDefault true
stages[].providerrequiredenumOne of: CLAUDE_SUBSCRIPTION, CODEX_SUBSCRIPTION, API:OPENAI, API:ANTHROPIC, API:GOOGLE, API:OPENROUTER, API:GROQ, API:TOGETHER, API:DEEPSEEK, API:MISTRAL, API:OLLAMA, API:CUSTOM_OPENAI
stages[].modelstring | nullDefault null
stages[].taskTyperequiredenumOne of: PROSPECT_RESEARCH, WEBSITE_ANALYSIS, SOCIAL_MEDIA_ANALYSIS, BUSINESS_ANALYSIS, PAIN_POINT_IDENTIFICATION, EMAIL_ANGLE_SELECTION, COLD_EMAIL_GENERATION, EMAIL_HUMANIZATION, GRAMMAR_REVIEW, PERSONALIZATION_REVIEW, FINAL_QUALITY_CHECK, CUSTOM
stages[].instructionsstringLength 0–8000 · Default ""
stages[].inputsstring[]Default ["prospect","research_evidence","playbook","previous"]
stages[].outputFormatrequiredenumOne of: RESEARCH_JSON, ANGLES_JSON, EMAIL_VARIANTS_JSON, QUALITY_REVIEW_JSON, TEXT
stages[].variantsintegerRange 1–5 · Default 3
stages[].temperaturenumber | nullDefault null
stages[].reasoningEffortenum | nullOne of: minimal, low, medium, high · Default null
stages[].allowWebResearchbooleanDefault false
stages[].retryobjectDefault {"maxAttempts":2,"backoffSec":30}
stages[].retry.maxAttemptsintegerRange 1–5 · Default 2
stages[].retry.backoffSecintegerRange 1–3600 · Default 30
stages[].timeoutSecintegerRange 30–1800 · Default 300
stages[].continueOnErrorbooleanDefault false
stages[].conditionenumOne of: always, if_previous_succeeded, skip_if_provider_unavailable · Default "always"
Request
curl -X PUT "https://app.example.com/api/v1/ai-workflows/$ID" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "stages": [
      {
        "id": "string",
        "name": "string",
        "provider": "CLAUDE_SUBSCRIPTION",
        "taskType": "PROSPECT_RESEARCH",
        "outputFormat": "RESEARCH_JSON"
      }
    ]
  }'

delete/api/v1/ai-workflows/{id}

Delete a workflow

Signed-in userSuccess: 200

Path parameters

idrequiredstring
Request
curl -X DELETE "https://app.example.com/api/v1/ai-workflows/$ID" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-workflows/{id}/duplicate

Duplicate a workflow

Signed-in userSuccess: 201

Path parameters

idrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/ai-workflows/$ID/duplicate" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-workflows/{id}/activate

Make this the workflow used by "Generate with selected workflow"

Signed-in userSuccess: 200

Path parameters

idrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/ai-workflows/$ID/activate" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

get/api/v1/ai-stage-templates

Saved stage templates

Signed-in userSuccess: 200

No parameters.

Request
curl -X GET "https://app.example.com/api/v1/ai-stage-templates" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-stage-templates

Save a stage as a reusable template

Signed-in userSuccess: 201

Request body (JSON)

namerequiredstringLength 1–80
stagerequiredobject
stage.idrequiredstringPattern ^[a-z0-9-]{4,40}$
stage.namerequiredstringLength 1–80
stage.enabledbooleanDefault true
stage.providerrequiredenumOne of: CLAUDE_SUBSCRIPTION, CODEX_SUBSCRIPTION, API:OPENAI, API:ANTHROPIC, API:GOOGLE, API:OPENROUTER, API:GROQ, API:TOGETHER, API:DEEPSEEK, API:MISTRAL, API:OLLAMA, API:CUSTOM_OPENAI
stage.modelstring | nullDefault null
stage.taskTyperequiredenumOne of: PROSPECT_RESEARCH, WEBSITE_ANALYSIS, SOCIAL_MEDIA_ANALYSIS, BUSINESS_ANALYSIS, PAIN_POINT_IDENTIFICATION, EMAIL_ANGLE_SELECTION, COLD_EMAIL_GENERATION, EMAIL_HUMANIZATION, GRAMMAR_REVIEW, PERSONALIZATION_REVIEW, FINAL_QUALITY_CHECK, CUSTOM
stage.instructionsstringLength 0–8000 · Default ""
stage.inputsstring[]Default ["prospect","research_evidence","playbook","previous"]
stage.outputFormatrequiredenumOne of: RESEARCH_JSON, ANGLES_JSON, EMAIL_VARIANTS_JSON, QUALITY_REVIEW_JSON, TEXT
stage.variantsintegerRange 1–5 · Default 3
stage.temperaturenumber | nullDefault null
stage.reasoningEffortenum | nullOne of: minimal, low, medium, high · Default null
stage.allowWebResearchbooleanDefault false
stage.retryobjectDefault {"maxAttempts":2,"backoffSec":30}
stage.retry.maxAttemptsintegerRange 1–5 · Default 2
stage.retry.backoffSecintegerRange 1–3600 · Default 30
stage.timeoutSecintegerRange 30–1800 · Default 300
stage.continueOnErrorbooleanDefault false
stage.conditionenumOne of: always, if_previous_succeeded, skip_if_provider_unavailable · Default "always"
Request
curl -X POST "https://app.example.com/api/v1/ai-stage-templates" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "stage": {
      "id": "string",
      "name": "string",
      "provider": "CLAUDE_SUBSCRIPTION",
      "taskType": "PROSPECT_RESEARCH",
      "outputFormat": "RESEARCH_JSON"
    }
  }'

delete/api/v1/ai-stage-templates/{id}

Delete a stage template

Signed-in userSuccess: 200

Path parameters

idrequiredstring
Request
curl -X DELETE "https://app.example.com/api/v1/ai-stage-templates/$ID" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

get/api/v1/ai-playbook

Current writing playbook and version history

Signed-in userSuccess: 200

No parameters.

Request
curl -X GET "https://app.example.com/api/v1/ai-playbook" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-playbook

Save the playbook as a new version

Signed-in userSuccess: 201

Request body (JSON)

contentrequiredstringLength 20–50000
notestring | null
Request
curl -X POST "https://app.example.com/api/v1/ai-playbook" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "string",
    "note": "string"
  }'

get/api/v1/ai-playbook/versions/{id}

One playbook version

Signed-in userSuccess: 200

Path parameters

idrequiredstring
Request
curl -X GET "https://app.example.com/api/v1/ai-playbook/versions/$ID" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-playbook/versions/{id}/restore

Restore a previous playbook version (creates a new version)

Signed-in userSuccess: 201

Path parameters

idrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/ai-playbook/versions/$ID/restore" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-queue/pause

Pause all AI workflow queues

Signed-in userSuccess: 200

No parameters.

Request
curl -X POST "https://app.example.com/api/v1/ai-queue/pause" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/ai-queue/resume

Resume all AI workflow queues

Signed-in userSuccess: 200

No parameters.

Request
curl -X POST "https://app.example.com/api/v1/ai-queue/resume" \
  -b cookies.txt -H "X-CSRF-Token: $CSRF"

post/api/v1/w/{workspaceId}/ai-runs

Generate emails for a prospect with a workflow, Claude or Codex (queued; never sends)

Workspace member or API keyRole member or higher120 requests / 1 h per userSuccess: 201

Path parameters

workspaceIdrequiredstring

Request body (JSON)

leadIdrequiredstring (uuid)
campaignIdstring (uuid) | null
modeenumOne of: workflow, claude, codex · Default "workflow"
workflowIdstring (uuid) | null
instructionsstringLength 0–2000
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs" \
  -H "Authorization: Bearer $EMN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "leadId": "00000000-0000-4000-8000-000000000000",
    "campaignId": "00000000-0000-4000-8000-000000000000",
    "mode": "workflow",
    "workflowId": "00000000-0000-4000-8000-000000000000",
    "instructions": "string"
  }'

get/api/v1/w/{workspaceId}/ai-runs

Generation history

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring

Query parameters

pageintegerRange 1–9007199254740991 · Default 1
pageSizeintegerRange 1–200 · Default 50
leadIdstring (uuid)
statusenumOne of: QUEUED, RUNNING, SUCCEEDED, FAILED, PAUSED, PAUSED_LIMIT, CANCELLED
Request
curl -X GET "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs" \
  -H "Authorization: Bearer $EMN_API_KEY"

get/api/v1/w/{workspaceId}/ai-runs/{id}

Run detail: research, variants, stages and execution log

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring
Request
curl -X GET "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID" \
  -H "Authorization: Bearer $EMN_API_KEY"

post/api/v1/w/{workspaceId}/ai-runs/{id}/pause

Pause a run

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/pause" \
  -H "Authorization: Bearer $EMN_API_KEY"

post/api/v1/w/{workspaceId}/ai-runs/{id}/resume

Resume / retry a run, optionally choosing another provider for the paused stage

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring

Request body (JSON)

stageProviderenumOne of: CLAUDE_SUBSCRIPTION, CODEX_SUBSCRIPTION, API:OPENAI, API:ANTHROPIC, API:GOOGLE, API:OPENROUTER, API:GROQ, API:TOGETHER, API:DEEPSEEK, API:MISTRAL, API:OLLAMA, API:CUSTOM_OPENAI
autoResumeboolean
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/resume" \
  -H "Authorization: Bearer $EMN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stageProvider": "CLAUDE_SUBSCRIPTION",
    "autoResume": true
  }'

post/api/v1/w/{workspaceId}/ai-runs/{id}/cancel

Cancel a run

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/cancel" \
  -H "Authorization: Bearer $EMN_API_KEY"

put/api/v1/w/{workspaceId}/ai-runs/{id}/variants/{index}

Edit a variant subject/body

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring
indexrequiredstring

Request body (JSON)

subjectrequiredstringLength 0–300
bodyrequiredstringLength 1–10000
Request
curl -X PUT "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/variants/$INDEX" \
  -H "Authorization: Bearer $EMN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "string",
    "body": "string"
  }'

post/api/v1/w/{workspaceId}/ai-runs/{id}/variants/{index}/select

Select the preferred variant

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring
indexrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/variants/$INDEX/select" \
  -H "Authorization: Bearer $EMN_API_KEY"

post/api/v1/w/{workspaceId}/ai-runs/{id}/variants/{index}/regenerate

Regenerate one variant (queued)

Workspace member or API keySuccess: 202

Path parameters

workspaceIdrequiredstring
idrequiredstring
indexrequiredstring
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/variants/$INDEX/regenerate" \
  -H "Authorization: Bearer $EMN_API_KEY"

post/api/v1/w/{workspaceId}/ai-runs/{id}/draft

Save the selected variant as a draft (nothing is sent)

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
idrequiredstring

Request body (JSON)

indexintegerRange 0–9
Request
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-runs/$ID/draft" \
  -H "Authorization: Bearer $EMN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "index": 0
  }'

get/api/v1/w/{workspaceId}/ai-queue

AI generation queue dashboard

Workspace member or API keySuccess: 200

Path parameters

workspaceIdrequiredstring
Request
curl -X GET "https://app.example.com/api/v1/w/$WORKSPACE_ID/ai-queue" \
  -H "Authorization: Bearer $EMN_API_KEY"