Skip to main content
POST
/
campaign
/
outbound
/
create_with_workflow
Python
from superu import SuperU

client = SuperU("YOUR_SUPERU_API_KEY")

payload = {
    "workflow_name": "My Outbound Campaign",
    "assistantId": "b64244f5-019c-47b6-bedd-cb359c0731a5",
    "batchSize": 5,
    "audienceId": "f750d6e9-448d-4198-be9a-ed142460c329",
    "from_phone_number": "+918031138532",
    "dateTime": "2024-04-24T08:28:00"
}

response = client.campaigns.create_with_workflow(**payload)
print(response)
{
  "id": "12345",
  "name": "My Outbound Campaign",
  "active": true,
  "webhookId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "webhookUrl": "https://n8n.example.com/webhook/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "campaign": {
    "campaign_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
    "message": "Campaign created successfully",
    "status": "scheduled"
  },
  "scheduled_job": {
    "job_id": "663f1a2b3c4d5e6f7a8b9c0d",
    "redis_job_id": "rq:job:abc123",
    "execute_at": "2026-04-10T14:00:00+00:00"
  }
}

Authorizations

superU-Api-Key
string
header
required

Your SuperU API key.

Body

application/json

Request body for creating an outbound campaign with workflow.

assistantId
string
required

The agent/assistant ID to use for calls

from_phone_number
string
required

The phone number to make outbound calls from (with country code)

Example:

"+14155550100"

workflow_name
string
default:Custom Scheduled Workflow
required

Name for the workflow and campaign

batchSize
integer
default:10
required

Number of calls to process per batch (max 10)

Required range: 1 <= x <= 10
dateTime
string<date-time>
required

ISO 8601 datetime for scheduling the campaign. Must be in the future. If omitted, the campaign starts immediately.

Example:

"2026-04-10T14:00:00Z"

name
string

Alternative field for workflow name (used if workflow_name is not provided)

audienceId
string

ID of an existing audience. Provide either audienceId or csvData, not both.

csvData
object[]

Inline contact list. Provide either csvData or audienceId, not both. A new audience is created automatically from this data.

Response

Campaign and workflow created successfully

id
string

The n8n workflow ID

name
string

Name of the workflow

active
boolean

Whether the workflow is active

webhookId
string

UUID of the webhook trigger

webhookUrl
string

Full URL of the webhook endpoint

campaign
object
scheduled_job
object

Present only when the campaign is scheduled for a future time