Skip to main content
POST
/
campaigns
cURL
curl --request POST \
  --url https://api.altur.io/api/v1.0/campaigns \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "agent_id": "<string>",
  "integration_id": "<string>",
  "description": "<string>",
  "timezone": "<string>",
  "retries": 1,
  "message_limit": 250,
  "first_message": "<string>",
  "template": "<string>",
  "template_alt": "<string>",
  "scheduling": {
    "mon": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    },
    "tue": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    },
    "wed": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    },
    "thu": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    },
    "fri": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    },
    "sat": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    },
    "sun": {
      "startTime": "<string>",
      "stopTime": "<string>",
      "active": true
    }
  },
  "cycles": {
    "enabled": true,
    "max_iterations": 7,
    "cooldown_minutes": 720,
    "filter_statuses": [
      "<string>"
    ],
    "filter_tags": [
      "<string>"
    ],
    "schedule": {
      "mon": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "tue": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "wed": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "thu": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "fri": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "sat": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "sun": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      }
    },
    "schedule_start_date": "2023-12-25",
    "schedule_end_date": "2023-12-25"
  }
}
'
{
  "success": true,
  "campaign": {
    "id": 123,
    "name": "<string>",
    "integration": {
      "id": "<string>"
    },
    "agent": {
      "id": "<string>",
      "name": "<string>"
    },
    "created_at": "2023-11-07T05:31:56Z",
    "scheduling": {
      "mon": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "tue": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "wed": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "thu": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "fri": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "sat": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      },
      "sun": {
        "startTime": "<string>",
        "stopTime": "<string>",
        "active": true
      }
    },
    "cycles": {
      "enabled": true,
      "max_iterations": 7,
      "cooldown_minutes": 720,
      "filter_statuses": [
        "<string>"
      ],
      "filter_tags": [
        "<string>"
      ],
      "schedule": {
        "mon": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        },
        "tue": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        },
        "wed": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        },
        "thu": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        },
        "fri": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        },
        "sat": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        },
        "sun": {
          "startTime": "<string>",
          "stopTime": "<string>",
          "active": true
        }
      },
      "schedule_start_date": "2023-12-25",
      "schedule_end_date": "2023-12-25"
    },
    "analytics": {}
  }
}
Rate Limit: 12 requests per second
Pass an Idempotency-Key header (UUID recommended) so retries don’t create duplicate campaigns.

Channel-specific Fields

FieldChannel
first_messagephone_call
templatewhatsapp
template_altwhatsapp
Sending a channel-only field for the wrong integration_type returns a 400 INVALID_REQUEST.

Cycles

cycles is optional. When cycles.enabled is false (or omitted), the rest of the cycles block is ignored. When cycles.mode is cooldown, schedule* fields are rejected. Cycles can be enabled only at creation time; cycles.enabled and cycles.mode are immutable thereafter.

Examples

Phone-call campaign with cooldown cycles

curl -X POST "https://api.altur.io/api/v1.0/campaigns" \
  -H "Authorization: api-key YOUR_API_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f0b2c8c-2a7e-4f5e-9b6a-3a2e8b9c4d10" \
  -d '{
    "name": "Q2 Reactivation",
    "agent_id": "6cy951e6-9877-4d7c-88d7-56b4948d3cce",
    "integration_id": "iph_8YqL3mZxR1tV0nKfH9bA",
    "integration_type": "phone_call",
    "timezone": "America/Mexico_City",
    "first_message": "Hi, am I speaking with {name}?",
    "cycles": {
      "enabled": true,
      "mode": "cooldown",
      "max_iterations": 3,
      "cooldown_minutes": 30,
      "filter_statuses": ["converted"]
    }
  }'

WhatsApp campaign

curl -X POST "https://api.altur.io/api/v1.0/campaigns" \
  -H "Authorization: api-key YOUR_API_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Promo June",
    "agent_id": "6cy951e6-9877-4d7c-88d7-56b4948d3cce",
    "integration_id": "iwa_8YqL3mZxR1tV0nKfH9bA",
    "integration_type": "whatsapp",
    "template": "promo_june_v1"
  }'

Authorizations

Authorization
string
header
required

Add api-key YOUR_API_SECRET_KEY as the value of the Authorization header.

Headers

Idempotency-Key
string

Optional client-generated key (UUID recommended) to make the request idempotent. Replays within the dedup window return the original response.

Body

application/json

Campaign to be created

name
string
required
Maximum string length: 255
agent_id
string<uuid4>
required

public_id of the agent that will own this campaign.

integration_id
string
required

public_id of the integration to use. Must belong to agent_id.

integration_type
enum<string>
required
Available options:
phone_call,
whatsapp
description
string
timezone
string

IANA timezone. Defaults to America/Mexico_City.

retries
integer
default:1
Required range: 0 <= x <= 5
message_limit
integer
default:250
Required range: 1 <= x <= 10000
first_message
string

First message the Agent will say upon the call being answered. Phone-call only.

template
string

WhatsApp template name. WhatsApp only.

template_alt
string

Alternate WhatsApp template name. WhatsApp only.

scheduling
object
cycles
object

Cycles configuration block. Phone-call campaigns only.

Response

Campaign created successfully

success
boolean
campaign
object

Single Campaign detail with nested agent, integration and cycles config. The analytics field is included only when a snapshot is available for the campaign.