List campaigns
Returns all campaigns for the authenticated tenant. Supports pagination and filtering.
Authorization
ApiKeyAuth API key generated from your Vayaflow dashboard Settings page
In: header
Query Parameters
Page number
Items per page
Filter by active status
"true" | "false"Filter by client ID
Filter by offer ID
Include archived campaigns
"true" | "false"Search by name, campaignId, clientName, or offerName
Response Body
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.leadsail.app/api/v1/campaigns" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"data": {
"campaigns": [
{
"campaignId": "string",
"name": "string",
"active": true,
"clientId": "string",
"clientName": "string",
"clientAbbrev": "string",
"offerId": "string",
"offerName": "string",
"offerAbbrev": "string",
"managerId": "string",
"webhooks": {
"url": "string",
"events": {
"property1": true,
"property2": true
},
"headers": {
"property1": "string",
"property2": "string"
},
"retryAttempts": 0,
"timeoutSeconds": 0,
"enabled": true,
"inheritFromTenant": true
},
"documents": [
{
"documentId": "string",
"documentTemplateId": "string",
"type": "string",
"name": "string",
"provider": "docuseal",
"templateId": "string",
"conditions": {
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"valueSetId": "string"
}
]
}
],
"isActive": true,
"name": "string"
},
"fieldMappingOverrides": [
{
"id": "string",
"providerFieldName": "string",
"providerFieldId": "string",
"providerFieldLabel": "string",
"providerFieldRequired": true,
"providerFieldType": "string",
"autoFill": true,
"fallbackTemplate": "string",
"sourceType": "field_library",
"sourceValue": "string",
"sourceLabel": "string"
}
],
"metadataOverrides": {
"property1": "string",
"property2": "string"
},
"isActive": true,
"required": true,
"autoSend": true,
"expiresInDays": 0,
"order": 0
}
],
"firstSubmissionAction": {
"enabled": true,
"action": "voice_ai",
"webhook": {
"url": "http://example.com",
"method": "POST",
"headers": {
"property1": "string",
"property2": "string"
},
"retries": 3,
"timeoutSeconds": 30
},
"humanReview": {
"reason": "string",
"priority": "high"
},
"workflow": {
"workflowDefinitionId": "string"
}
},
"disqualificationConditionals": [
{
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"valueSetId": "string"
}
]
}
],
"isActive": true,
"name": "string"
}
],
"routingRules": [
{
"routeName": "string",
"active": true,
"priority": 0,
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"valueSetId": "string"
}
]
}
],
"routeTo": {
"campaignId": "string",
"clientName": "string",
"offerName": "string"
}
}
],
"fallbackCampaigns": [
"string"
],
"deliveryLimits": [
{
"active": true,
"cap": 0,
"type": "daily",
"action": "queue",
"startDate": "string",
"endDate": "string",
"routeToCampaignId": "string"
}
],
"deliverySchedule": {
"timezone": "string",
"action": "queue",
"specificDays": [
{
"active": true,
"day": "Monday",
"startTime": "string",
"endTime": "string"
}
],
"routeToCampaignId": "string"
},
"revenueMilestones": [
{
"leadStatus": "delivered",
"amount": 0,
"currency": "USD",
"validFrom": "string",
"validTo": "string",
"conditions": {
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"valueSetId": "string"
}
]
}
],
"isActive": true,
"name": "string"
},
"notes": "string",
"active": true
}
],
"campaignAiAgents": {
"voice": {
"agentId": "string",
"promptTemplateId": "string",
"agentVariablesConfigId": "string"
},
"voiceTest": {
"agentId": "string",
"promptTemplateId": "string",
"agentVariablesConfigId": "string"
},
"sms": {
"agentId": "string",
"promptTemplateId": "string",
"agentVariablesConfigId": "string"
},
"smsTest": {
"agentId": "string",
"promptTemplateId": "string",
"agentVariablesConfigId": "string"
}
},
"phoneNumberId": "string",
"questionnaireId": "string",
"deliveryEndpointId": "string",
"autoDialerConfigId": "string",
"postCallPipelineId": "string",
"pixelRules": [
{
"id": "string",
"name": "string",
"active": true,
"triggerPoint": "lead_qualified",
"pixelId": "string",
"platform": "facebook",
"eventName": "string",
"actionSource": "website",
"conditions": {
"logicalOperator": "AND",
"subRules": [
{
"logicalOperator": "AND",
"conditions": [
{
"field": "string",
"operator": "equals",
"value": [
null
],
"valueSetId": "string"
}
]
}
],
"isActive": true,
"name": "string"
},
"eventValueOverride": 0,
"currency": "string",
"fireOnce": true
}
],
"settings": {
"aiQualificationEnabled": true,
"autoRoutingEnabled": true,
"dedupeEnabled": true,
"dedupeWindow": 0,
"dedupeFields": [
"string"
],
"integrationOverrides": {
"voice": "elevenlabs",
"sms": "vonage",
"llm": "openai"
}
},
"notes": "string",
"tags": [
"string"
],
"externalId": "string",
"createdAt": "string",
"updatedAt": "string",
"archivedAt": "string",
"lastLeadReceivedAt": "string"
}
],
"pagination": {
"total": 0,
"page": 0,
"limit": 0
}
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}Send leads to auto dialer
Schedules one or more leads for the next available auto-dialer call slot. Each lead is matched to its campaign's auto-dialer configuration, and the service determines the optimal call time based on the lead's timezone, the sequencing rules, and attempt history. Leads that cannot be scheduled (e.g. inactive config, max attempts reached, excluded status) are reported in the failed array. Processes up to 200 leads per request with controlled concurrency.
Get a campaign
Returns a single campaign by its campaign ID.