Skip to main content
PATCH
/
campaigns
/
{id}
cURL
curl --request PATCH \
  --url https://api.altur.io/api/v1.0/campaigns/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "timezone": "<string>",
  "retries": 2,
  "message_limit": 5000,
  "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
    }
  },
  "first_message": "<string>",
  "template": "<string>",
  "template_alt": "<string>",
  "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

Immutable Fields

The following fields cannot be modified after creation. Including them in a PATCH returns 400 IMMUTABLE_FIELD and identifies the offending field in the response field key:
  • agent_id
  • integration_id
  • integration_type
  • cycles.enabled
  • cycles.mode
Finished campaigns are read-only and return 409 CAMPAIGN_FINISHED on any PATCH.

Cycle Updates

Cycle fields can only be updated on campaigns that have cycles enabled (400 CYCLES_NOT_ENABLED otherwise). schedule, schedule_start_date, and schedule_end_date are only valid when cycles.mode is scheduled (400 SCHEDULED_MODE_ONLY otherwise).

Examples

Rename a campaign and tighten retries

curl -X PATCH "https://api.altur.io/api/v1.0/campaigns/1234" \
  -H "Authorization: api-key YOUR_API_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q2 Reactivation - wave 2",
    "retries": 2
  }'

Update cycle cooldown

curl -X PATCH "https://api.altur.io/api/v1.0/campaigns/1234" \
  -H "Authorization: api-key YOUR_API_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cycles": { "cooldown_minutes": 60 }
  }'

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

Body

application/json

Partial Campaign update

Partial update. Any field may be omitted. Immutable fields (agent_id, integration_id, integration_type, cycles.enabled, cycles.mode) cannot be included.

name
string
Maximum string length: 255
description
string
timezone
string
retries
integer
Required range: 0 <= x <= 5
message_limit
integer
Required range: 1 <= x <= 10000
scheduling
object
first_message
string
template
string
template_alt
string
cycles
object

Cycles configuration block. Phone-call campaigns only.

Response

Campaign updated 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.