Flireo AI
WebsiteLinkedinDashboard
WebsiteLinkedinDashboard
  1. Api's
Flireo AI
  • Documentation
    • Get started
      • Quickstart
      • Introduction
      • Authentication
    • Core concepts
      • Agents
      • Phone numbers
      • Calls
      • Webhooks
    • Api's
      • Organization
      • Agents
      • Phone numbers
      • Sip trunks
      • Calls
      • Call control
      • Usage
      • Voices
      • BYOK
      • Domains
      • Analysis templates
      • Tool templates
      • Campaigns
    • Webhooks
      • Overview
      • Assistant request
      • Tool calls
      • Status update
      • End of call report
      • Security
    • Guides
      • BYOK Setup
      • Call analysis
      • Custom Tools
      • Call Transfers
      • xAI Realtime Integration
      • Analysis templates
      • Billing
      • Error codes
      • Rate limits
      • Sip Trunks
      • Tool templates
      • Troubleshooting
      • Campaigns
      • Voice selection psychology
  • API Reference
    • Agents
      • List all agents
      • Create a new agent
      • Get an agent
      • Update an agent
      • Delete an agent
    • Tool Templates
      • List all tool templates
      • Create a new tool template
      • Get a tool template
      • Update a tool template
      • Delete a tool template
    • Numbers
      • List all phone numbers
      • Register a phone number
      • Get a phone number
      • Update a phone number
      • Delete a phone number
    • Calls
      • List calls
      • Get call by ID
      • Initiate outbound call
    • Call Control
      • Send control command to active call
    • Usage
      • Get usage logs
    • SIP Trunks
      • List SIP trunks
      • Create a SIP trunk
      • Get a SIP trunk
      • Delete a SIP trunk
    • Voices
      • List available voices
    • BYOK
      • Get BYOK configurations
      • Add BYOK configuration
      • Delete BYOK configuration
      • Get BYOK provider configurations
    • Domains
      • Get your domain
      • Add a domain
      • Delete your domain
      • List available Resend domains
      • Select and sync a Resend domain
      • Verify domain DNS records
      • Refresh domain status
    • Webhooks
      • Dynamic assistant configuration webhook
      • Tool/Function Call
      • Call Status Update
      • End of Call Report
    • Analysis Templates
      • List analysis templates
      • Create analysis template
      • Get analysis template
      • Update analysis template
      • Delete analysis template
    • Organization
      • Get organization information
    • Campaigns
      • List all campaigns
      • Create a campaign
      • Get a campaign
      • Update a campaign
      • Delete a campaign
      • List campaign leads
      • Add a lead
      • Remove a lead
    • Schemas
      • Error
      • Pagination
      • UUID
      • Timestamp
      • SuccessResponse
      • STTConfig
      • LLMConfig
      • TTSConfig
      • XAIRealtimeConfig
      • Agent
      • AgentCreate
      • AgentUpdate
      • PhoneNumber
      • PhoneNumberCreate
      • PhoneNumberUpdate
      • Call
      • CallControlCommand
      • InjectContextCommand
      • SayCommand
      • EndCallCommand
      • TransferCommand
      • CallControlResponse
      • Account
      • OutboundCallRequest
      • OutboundCallResponse
      • UsageLog
      • UsageSummary
      • Organization
      • SipTrunk
      • SipTrunkCreate
      • Voice
      • AssistantRequestPayload
      • CallObject
      • AssistantRequestResponse
      • XAIRealtimeVoice
      • Customer
      • AssistantConfigOverride
      • AnalysisPlan
      • AssistantWebhookObject
      • ToolCallsPayload
      • ToolCall
      • ToolCallsResponse
      • StatusUpdatePayload
      • EndOfCallReportPayload
      • ToolDefinition
      • EndCallTool
      • TransferCallTool
      • WebhookHeaders
      • XAIRealtimeWebhookNotes
      • ToolFunctionConfig
      • ToolTransferConfig
      • ToolTemplate
      • ToolTemplateCreate
      • ToolTemplateUpdate
      • AnalysisTemplate
      • CreateAnalysisTemplate
      • UpdateAnalysisTemplate
      • AnalysisTemplateListResponse
      • CampaignLead
      • Campaign
      • CampaignCreate
      • CampaignUpdate
      • CampaignLeadCreate
WebsiteLinkedinDashboard
WebsiteLinkedinDashboard
  1. Api's

Campaigns

🧪
Outbound Campaigns is currently in Beta. The API and functionality may change.
Manage automated outbound calling campaigns with lead lists and scheduling.

Endpoints#

MethodEndpointDescription
GET/campaignsList all campaigns
POST/campaignsCreate a campaign
GET/campaigns/{id}Get a campaign
PATCH/campaigns/{id}Update a campaign
DELETE/campaigns/{id}Delete a campaign
GET/campaigns/{id}/leadsList campaign leads
POST/campaigns/{id}/leadsAdd a lead
DELETE/campaigns/{id}/leads/{leadId}Remove a lead

List All Campaigns#

Retrieve all outbound campaigns in your organization.
GET /campaigns

Request#

Response#

{
  "campaigns": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Q1 Sales Outreach",
      "status": "scheduled",
      "agent_id": "17a0cb75-fa09-4bdd-9a44-92a70d829c88",
      "system_message_template": "You are calling {{name}} from {{company}}. Their role is {{role}}.",
      "schedule_start_time": "09:00:00",
      "schedule_end_time": "17:00:00",
      "timezone": "Europe/Amsterdam",
      "total_leads": 150,
      "completed_leads": 45,
      "created_at": "2026-01-07T10:00:00.000Z",
      "updated_at": "2026-01-07T14:30:00.000Z"
    }
  ]
}

Create a Campaign#

Create a new outbound calling campaign.
POST /campaigns

Request Body#

FieldTypeRequiredDescription
namestringYesCampaign display name
agent_idUUIDYesAgent to use for calls
system_message_templatestringNoTemplate with {{variable}} placeholders
schedule_start_timestringNoDaily start time (HH:MM:SS), default: 09:00:00
schedule_end_timestringNoDaily end time (HH:MM:SS), default: 17:00:00
timezonestringNoIANA timezone, default: Europe/Amsterdam
statusstringNodraft, scheduled, paused, completed

Example Request#

Response (201 Created)#

{
  "campaign": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Q1 Sales Outreach",
    "status": "draft",
    ...
  }
}

Get a Campaign#

Retrieve a specific campaign by ID.
GET /campaigns/{id}

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request#

Response#

{
  "campaign": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Q1 Sales Outreach",
    "status": "scheduled",
    "agent_id": "17a0cb75-fa09-4bdd-9a44-92a70d829c88",
    "system_message_template": "You are calling {{name}} from {{company}}.",
    "schedule_start_time": "09:00:00",
    "schedule_end_time": "17:00:00",
    "timezone": "Europe/Amsterdam",
    "total_leads": 150,
    "completed_leads": 45,
    "current_call_id": null,
    "last_lead_processed_at": "2026-01-07T14:25:00.000Z",
    "created_at": "2026-01-07T10:00:00.000Z",
    "updated_at": "2026-01-07T14:30:00.000Z"
  }
}

Update a Campaign#

Update campaign settings or status.
PATCH /campaigns/{id}

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request Body#

All fields are optional. Only include fields you want to update.
Set status to scheduled to start calling leads. Set to paused to stop.

Example Request#

Response#

{
  "campaign": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "scheduled",
    ...
  }
}

Delete a Campaign#

Delete a campaign and all its leads.
DELETE /campaigns/{id}
This action is irreversible. All leads and call history associated with the campaign will be deleted.

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request#

Response#

{
  "success": true
}

List Campaign Leads#

Retrieve all leads in a campaign.
GET /campaigns/{id}/leads

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request#

Response#

{
  "leads": [
    {
      "id": "lead-uuid-1",
      "phone_number": "+31612345678",
      "status": "completed",
      "variables": {
        "name": "Jan de Vries",
        "company": "TechCorp",
        "role": "CTO"
      },
      "call_id": "call-uuid-123",
      "attempts": 1,
      "last_attempt_at": "2026-01-07T10:15:00.000Z",
      "created_at": "2026-01-07T10:00:00.000Z"
    },
    {
      "id": "lead-uuid-2",
      "phone_number": "+31687654321",
      "status": "pending",
      "variables": {
        "name": "Maria Jansen",
        "company": "DataFlow",
        "role": "CEO"
      },
      "call_id": null,
      "attempts": 0,
      "last_attempt_at": null,
      "created_at": "2026-01-07T10:00:00.000Z"
    }
  ]
}

Lead Status Values#

StatusDescription
pendingLead has not been called yet
callingCall is currently in progress
completedCall completed successfully
failedCall failed (will not be retried)
no_answerNo answer after maximum attempts

Add a Lead#

Add a new lead to a campaign.
POST /campaigns/{id}/leads

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request Body#

FieldTypeRequiredDescription
phone_numberstringYesPhone number in E.164 format
variablesobjectNoKey-value pairs for template interpolation

Example Request#

Response (201 Created)#

{
  "lead": {
    "id": "lead-uuid-new",
    "phone_number": "+31612345678",
    "status": "pending",
    "variables": {
      "name": "Jan de Vries",
      "company": "TechCorp",
      "role": "CTO",
      "notes": "Interested in enterprise plan"
    },
    "attempts": 0,
    "created_at": "2026-01-07T15:00:00.000Z"
  }
}

Remove a Lead#

Remove a lead from a campaign.
DELETE /campaigns/{id}/leads/{leadId}

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID
leadIdpathUUIDLead UUID

Request#

Response#

{
  "success": true
}

Variable Interpolation#

The system_message_template supports variable interpolation using {{variable}} syntax. Variables are matched against the variables object of each lead.

Example#

Campaign Template:
You are calling {{name}} from {{company}}. 
Their role is {{role}}. 
Additional context: {{notes}}
Lead Variables:
{
  "name": "Jan de Vries",
  "company": "TechCorp",
  "role": "CTO",
  "notes": "Interested in enterprise plan"
}
Result (added to agent's system messages):
You are calling Jan de Vries from TechCorp. 
Their role is CTO. 
Additional context: Interested in enterprise plan
Variables that are not found in the lead's variables object will remain as {{variable}} in the final message.

Related#

Agents API - Create agents for campaigns
Calls API - View call details and transcripts
Campaigns Guide - Step-by-step setup guide
Modified at 2026-01-12 13:02:50
Previous
Tool templates
Next
Overview
Built with