Skip to contentSkip to navigation

Import Campaign Beta

Create a draft campaign from an exported document.

POST /api/v1/campaigns/import

Requires an API key with the write scope.

Creates a draft campaign from the document Export Campaign returns (send the contents of data). The new campaign has the document's settings, steps and A/B variants. It has no sending accounts and no leads: attach accounts and add leads, then start it. The request is rejected with 422 and nothing is created when the document has an unknown field, a version other than 1, an invalid timezone or sendingDays, more than 20 steps or 10 variants per step, steps not numbered 1, 2, 3 in order, duplicate variant labels within a step, invalid spin syntax, or more than 1,000,000 characters of step text in total. The request body is limited to 2 MB. An audit entry audit.campaign.imported is recorded.

Query Parameters

name string query

Name for the new campaign instead of the one in the document. 1 to 255 characters.

Request Body

The exported document: format (foxreach.campaign), version (1), optional exportedAt (ignored), and campaign with name and the settings and sequences shown below. Every field of campaign except name is optional and takes the default of Create Campaign.

Request document

JSON
{
  "format": "foxreach.campaign",
  "version": 1,
  "exportedAt": "2026-12-03T10:00:00+00:00",
  "campaign": {
    "name": "Q1 outreach",
    "timezone": "America/New_York",
    "sendingDays": [1, 2, 3, 4, 5],
    "sendingStartHour": 9,
    "sendingStartMinute": 0,
    "sendingEndHour": 17,
    "sendingEndMinute": 0,
    "dailyLimit": 50,
    "context": null,
    "minGapMinutes": null,
    "sendGapJitterMinutes": null,
    "listUnsubscribeHeader": false,
    "espMatching": false,
    "trackOpens": false,
    "trackOpensFirstStep": false,
    "trackClicks": false,
    "sequences": [
      {
        "stepNumber": 1,
        "name": "Intro",
        "subject": "Quick question, {{firstName}}",
        "body": "Hi {{firstName}}, ...",
        "delayDays": 0,
        "delayHours": 0,
        "sendOnlyIfNoReply": true,
        "sendAsHtml": false,
        "variants": [
          { "label": "A", "subject": "Quick question", "body": "Hi, ...", "weight": 1, "sendAsHtml": false }
        ]
      }
    ]
  }
}

Errors

StatusDescription
401Missing, invalid, revoked or expired API key
403API key does not have the required scope: write
413The request body is larger than 2 MB
422The document is not valid: unknown field, unsupported version, invalid value or invalid spin syntax

Rate Limit

  • 120 requests per minute, shared by every write call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (write).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns, see Rate Limiting.

Was this page helpful?