Skip to main content
POST
/
campaigns
/
{id}
/
{action}
cURL
curl --request POST \
  --url https://api.altur.io/api/v1.0/campaigns/{id}/{action} \
  --header 'Authorization: <api-key>'
{
  "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
action is one of activate, pause, archive, resume.

Valid Transitions

ActionAllowed source statusesEffect
activatepending, ready, cooldownsets statusactive
pauseactive, cooldownsets statusinactive
resumeinactivesets statusactive
archiveanysets archived = true

Idempotency

  • archive is always a success. Re-archiving a campaign is a no-op.
  • pause on a campaign already inactive, and resume on a campaign already active, are no-op successes.
  • activate is not idempotent: calling it on a campaign already in active (or inactive, or finished) returns 409 INVALID_STATUS_TRANSITION because active is not in the allowed source statuses. Use resume to re-activate a paused campaign.

Errors

  • 400 UNKNOWN_ACTION: action is not one of the supported values.
  • 402 BILLING_LIMIT_REACHED: activate or resume and the plan limit was reached.
  • 409 INVALID_STATUS_TRANSITION: current status is not in the allowed sources. The response includes current_status and valid_targets.

Examples

curl -X POST "https://api.altur.io/api/v1.0/campaigns/1234/activate" \
  -H "Authorization: api-key YOUR_API_SECRET_KEY"

Authorizations

Authorization
string
header
required

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

Path Parameters

id
integer
required

The identifier of the Campaign

action
enum<string>
required

Lifecycle action to apply

Available options:
activate,
pause,
archive,
resume

Response

Lifecycle action applied 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.