SDK reference

Marketing

Each route's function in the SDK, its call beside the same request in cURL.
orgMarketingMeta

GET/v1/orgs/:orgId/marketing/meta

What the app loads first: settings, brand kit, sending state and readiness, Mail domains, approvers, members, limits and what the caller may do.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/meta' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgMarketingSettings

PUT/v1/orgs/:orgId/marketing/settings

Sender, physical address, topics, approvals, frequency cap, send-time default, UTM and double opt-in (Marketing admins), over version.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/settings' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "sender": {
      "name": "Example",
      "localPart": "example"
    },
    "physicalAddress": "example",
    "topics": [
      {
        "id": "<id>",
        "name": "Example",
        "basis": "optIn"
      }
    ],
    "approvals": {
      "required": true,
      "approvers": [
        "example"
      ],
      "needed": "one",
      "expiryDays": 1
    },
    "frequencyCap": {
      "messages": 1,
      "days": 1
    },
    "sendTime": {
      "defaultHour": 1,
      "timeZone": "example"
    },
    "utm": {
      "enabled": true,
      "source": "example",
      "medium": "example"
    },
    "doubleOptIn": true,
    "version": 1
  }'
putOrgMarketingBrand

PUT/v1/orgs/:orgId/marketing/brand

The brand kit marketing email is drawn in: logo, light and dark colours, font and corner radius (Marketing admins).

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/brand' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "colors": {
      "page": "example",
      "card": "example",
      "text": "example",
      "muted": "example",
      "link": "example",
      "button": "example",
      "buttonText": "example",
      "border": "example"
    },
    "font": "system",
    "radius": 1,
    "version": 1
  }'
postOrgMarketingResume

POST/v1/orgs/:orgId/marketing/resume

Lifts the reputation guard's pause once the audience is cleaned (Marketing admins).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/resume' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingUsage

GET/v1/orgs/:orgId/marketing/usage

Messages this month and today (the plan's month, warm-up's day) and the plan's limits.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/usage' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingStatsDaily

GET/v1/orgs/:orgId/marketing/stats/daily

The org's numbers per UTC day (from, to as YYYYMMDD; the last 30 days by default) and their totals.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/stats/daily' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingPeopleByAddress

GET/v1/orgs/:orgId/marketing/people/:address

An address's consent, its history (newest first), its engagement summary and recent opens, clicks and unsubscribes; with brandId, that brand scope's consent and history; brands lists each brand scope's status for the address.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/people/{address}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingLists

GET/v1/orgs/:orgId/marketing/lists

Static and suppression lists with their member counts.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingLists

POST/v1/orgs/:orgId/marketing/lists

A static list (people added by hand, CSV or API) or a suppression list (never sent to), for email or texts.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example"
  }'
orgMarketingListsByListId

GET/v1/orgs/:orgId/marketing/lists/:listId

One list.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgMarketingListsByListId

PATCH/v1/orgs/:orgId/marketing/lists/:listId

Renames a list or changes its description, over version.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
deleteOrgMarketingListsByListId

DELETE/v1/orgs/:orgId/marketing/lists/:listId

Deletes a list no segment or unsent campaign uses (its members go in the background).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingListsMembers

GET/v1/orgs/:orgId/marketing/lists/:listId/members

A page of a list's members.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}/members' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingListsMembers

POST/v1/orgs/:orgId/marketing/lists/:listId/members

Adds people by address (with merge fields for people not in Customers); admins may record the consent they gave elsewhere, with a note.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}/members' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "members": [
      {
        "address": "example"
      }
    ]
  }'
postOrgMarketingListsMembersRemove

POST/v1/orgs/:orgId/marketing/lists/:listId/members/remove

Removes people from a list by address.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}/members/remove' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses": [
      "example"
    ]
  }'
postOrgMarketingListsImports

POST/v1/orgs/:orgId/marketing/lists/:listId/imports

Starts a CSV import: small files with the request (content), larger ones to the returned upload URL.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/lists/{listId}/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileName": "Example",
    "size": 1
  }'
orgMarketingImportsByJobId

GET/v1/orgs/:orgId/marketing/imports/:jobId

A list import's progress: rows read, added, skipped and why.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/imports/{jobId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingImportsPreview

GET/v1/orgs/:orgId/marketing/imports/:jobId/preview

The file's columns, a few rows and the suggested mapping.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/imports/{jobId}/preview' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingImportsStart

POST/v1/orgs/:orgId/marketing/imports/:jobId/start

Runs the import with a mapping (a target per column: email, phone, firstName, … or blank) and, for admins, the consent people gave.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/imports/{jobId}/start' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "mapping": [
      "example"
    ]
  }'
orgMarketingSegments

GET/v1/orgs/:orgId/marketing/segments

Segments, by name, with their last size estimate.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingSegments

POST/v1/orgs/:orgId/marketing/segments

A segment: OR-groups of Customers filters (relative dates $daysAgo:N), engagement and list conditions.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "groups": [
      {
        "source": {}
      }
    ]
  }'
postOrgMarketingSegmentsPreview

POST/v1/orgs/:orgId/marketing/segments/preview

The first people a segment (saved or not) reaches, as the caller sees Customers: the builder's live preview.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments/preview' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "groups": [
      {
        "source": {}
      }
    ]
  }'
orgMarketingSegmentsBySegmentId

GET/v1/orgs/:orgId/marketing/segments/:segmentId

One segment with its groups and estimate.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments/{segmentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgMarketingSegmentsBySegmentId

PUT/v1/orgs/:orgId/marketing/segments/:segmentId

Replaces a segment's name, description and groups over version (its estimate is cleared).

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments/{segmentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "groups": [
      {
        "source": {}
      }
    ],
    "version": 1
  }'
deleteOrgMarketingSegmentsBySegmentId

DELETE/v1/orgs/:orgId/marketing/segments/:segmentId

Deletes a segment no unsent campaign or running journey uses.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments/{segmentId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingSegmentsEstimate

POST/v1/orgs/:orgId/marketing/segments/:segmentId/estimate

Counts the segment's people in the background (deduplicated by address); the result lands on the segment.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/segments/{segmentId}/estimate' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "channel": "email"
  }'
orgMarketingTemplates

GET/v1/orgs/:orgId/marketing/templates

Templates campaigns start from.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingTemplates

POST/v1/orgs/:orgId/marketing/templates

A template: a block document campaigns can start from.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "document": {}
  }'
orgMarketingTemplatesByTemplateId

GET/v1/orgs/:orgId/marketing/templates/:templateId

One template with its document.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/templates/{templateId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgMarketingTemplatesByTemplateId

PATCH/v1/orgs/:orgId/marketing/templates/:templateId

Changes a template's name, description or document over version.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/templates/{templateId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
deleteOrgMarketingTemplatesByTemplateId

DELETE/v1/orgs/:orgId/marketing/templates/:templateId

Deletes a template (campaigns made from it keep their copy).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/templates/{templateId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingBlocks

GET/v1/orgs/:orgId/marketing/blocks

Saved blocks in the content library.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/blocks' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingBlocks

POST/v1/orgs/:orgId/marketing/blocks

Saves a block (with its columns, if any) to the content library.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/blocks' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "block": {}
  }'
deleteOrgMarketingBlocksByBlockId

DELETE/v1/orgs/:orgId/marketing/blocks/:blockId

Deletes a saved block.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/blocks/{blockId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingImages

GET/v1/orgs/:orgId/marketing/images

Images on the content library's CDN host.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/images' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingImages

POST/v1/orgs/:orgId/marketing/images

An image upload: the URL the browser PUTs the file to; then finish. PNG, JPEG, GIF or WebP.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/images' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "contentType": "example",
    "bytes": 1
  }'
postOrgMarketingImagesFinish

POST/v1/orgs/:orgId/marketing/images/:imageId/finish

Finishes an upload: the file is checked and the image goes on the CDN host.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/images/{imageId}/finish' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteOrgMarketingImagesByImageId

DELETE/v1/orgs/:orgId/marketing/images/:imageId

Deletes an image (messages already sent keep showing it until it expires from caches).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/images/{imageId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingPreview

POST/v1/orgs/:orgId/marketing/preview

A message as one person would get it (a contact or lead the caller can read, else placeholder values), in a scheme and device.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/preview' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "campaignId": "<campaignId>",
    "document": {},
    "topicId": "<topicId>"
  }'
postOrgMarketingTest

POST/v1/orgs/:orgId/marketing/test

A test to one to five members: "[Test]" in the subject, links work but don't count.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/test' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "userIds": [
      "example"
    ]
  }'
orgMarketingCampaigns

GET/v1/orgs/:orgId/marketing/campaigns

Campaigns, newest first, with their numbers once sending started (status narrows them).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingCampaigns

POST/v1/orgs/:orgId/marketing/campaigns

A draft: a name, a topic, an audience (segments and lists to include and exclude) and content (a document, a template, or the starter).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "topicId": "<topicId>"
  }'
orgMarketingCampaignsByCampaignId

GET/v1/orgs/:orgId/marketing/campaigns/:campaignId

One campaign, and while it's a draft what stops it being sent (problems).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgMarketingCampaignsByCampaignId

PATCH/v1/orgs/:orgId/marketing/campaigns/:campaignId

Changes a draft over version; changing one waiting for approval, or approved, withdraws the request.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
deleteOrgMarketingCampaignsByCampaignId

DELETE/v1/orgs/:orgId/marketing/campaigns/:campaignId

Deletes a campaign that never sent.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingCampaignsDuplicate

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/duplicate

A new draft with the same content and audience.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/duplicate' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingCampaignsRequestApproval

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/request-approval

Asks the org's approvers (other than the caller) to approve the campaign as it stands.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/request-approval' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingCampaignsDecide

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/decide

An approver approves or declines (never their own request).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/decide' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "decision": "approved",
    "version": 1
  }'
postOrgMarketingCampaignsSchedule

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/schedule

Schedules for at (epoch ms; now when left out), optionally spread over a day to each person's usual hour.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/schedule' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingCampaignsUnschedule

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/unschedule

Takes a scheduled campaign back (an approval stays).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/unschedule' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingCampaignsPause

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/pause

Pauses a sending campaign within a page of recipients.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/pause' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingCampaignsResume

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/resume

Resumes a paused campaign where it stopped.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/resume' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingCampaignsCancel

POST/v1/orgs/:orgId/marketing/campaigns/:campaignId/cancel

Cancels a scheduled, sending or paused campaign: nobody not yet sent it gets it.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/cancel' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingCampaignsResults

GET/v1/orgs/:orgId/marketing/campaigns/:campaignId/results

The campaign and its numbers (sent, delivered, opened, clicked, unsubscribed, bounced, conversions, revenue, …).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/results' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingCampaignsRecipients

GET/v1/orgs/:orgId/marketing/campaigns/:campaignId/recipients

The send's recipients and what happened to each, a page at a time.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/recipients' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingCampaignsConversions

GET/v1/orgs/:orgId/marketing/campaigns/:campaignId/conversions

Won opportunities credited to the campaign, newest first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/campaigns/{campaignId}/conversions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingJourneys

GET/v1/orgs/:orgId/marketing/journeys

Journeys, newest first, with how many people entered, are in them, completed and met the goal.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingJourneys

POST/v1/orgs/:orgId/marketing/journeys

A draft journey (the definition is checked when it's published; problems lists what's missing).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example"
  }'
postOrgMarketingJourneysSmsEstimate

POST/v1/orgs/:orgId/marketing/journeys/sms-estimate

What a text step costs per message to each priced destination, for its text as written.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/sms-estimate' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "example"
  }'
orgMarketingJourneysByJourneyId

GET/v1/orgs/:orgId/marketing/journeys/:journeyId

One journey with its draft, versions and approval, and what stops the draft going live (problems).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgMarketingJourneysByJourneyId

PATCH/v1/orgs/:orgId/marketing/journeys/:journeyId

Changes the name, description or draft over version; the live version is untouched until the next publish.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
deleteOrgMarketingJourneysByJourneyId

DELETE/v1/orgs/:orgId/marketing/journeys/:journeyId

Deletes a journey that never went live.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingJourneysDuplicate

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/duplicate

A new draft journey from this one's draft.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/duplicate' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingJourneysRequestApproval

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/request-approval

Asks the org's approvers (other than the caller) to approve the draft as it stands.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/request-approval' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingJourneysDecide

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/decide

An approver approves or declines the draft (never their own request).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/decide' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "decision": "approved",
    "version": 1
  }'
postOrgMarketingJourneysPublish

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/publish

Publishes the draft as the next version and runs it; people already in it stay on theirs.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/publish' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingJourneysPause

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/pause

Pauses a running journey: nobody enters and nobody moves on until it resumes.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/pause' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingJourneysResume

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/resume

Resumes a paused journey: everyone carries on from where they held.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/resume' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingJourneysStop

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/stop

Stops a journey for good: everyone in it leaves.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/stop' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingJourneysEnter

POST/v1/orgs/:orgId/marketing/journeys/:journeyId/enter

Puts someone into a journey that takes entries by API: a Customers record, or an address with merge fields.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/enter' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "recordId": "<recordId>",
    "email": "person@example.com",
    "phone": "example"
  }'
orgMarketingJourneysPeople

GET/v1/orgs/:orgId/marketing/journeys/:journeyId/people

The journey's people and where each is, a page at a time.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/people' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingJourneysPeopleByKey

GET/v1/orgs/:orgId/marketing/journeys/:journeyId/people/:key

One person in the journey, by their email, mobile or rec:<record id>.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/people/{key}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingJourneysStats

GET/v1/orgs/:orgId/marketing/journeys/:journeyId/stats

Totals, each step's numbers (entered, completed, exited, goal reached) and each email and text step's send.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/stats' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingJourneysVersionsByVersion

GET/v1/orgs/:orgId/marketing/journeys/:journeyId/versions/:version

A published version as it was frozen.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/journeys/{journeyId}/versions/{version}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingForms

GET/v1/orgs/:orgId/marketing/forms

Forms with their submission and spam counts.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/forms' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingForms

POST/v1/orgs/:orgId/marketing/forms

A form: fields mapped to lead or contact fields, defaults, a consent box (topics and wording) and what happens after.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/forms' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "object": "lead",
    "fields": [
      {
        "id": "<id>",
        "type": "text"
      }
    ]
  }'
orgMarketingFormsByFormId

GET/v1/orgs/:orgId/marketing/forms/:formId

One form, with its consent wordings and the HTML that embeds it.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/forms/{formId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgMarketingFormsByFormId

PUT/v1/orgs/:orgId/marketing/forms/:formId

Replaces a form over version; a new consent wording becomes a new version and the old ones are kept.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/forms/{formId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "object": "lead",
    "fields": [
      {
        "id": "<id>",
        "type": "text"
      }
    ],
    "version": 1
  }'
deleteOrgMarketingFormsByFormId

DELETE/v1/orgs/:orgId/marketing/forms/:formId

Deletes a form no running journey enters people from.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/forms/{formId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingFormsSubmissions

GET/v1/orgs/:orgId/marketing/forms/:formId/submissions

The form's submissions, newest first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/forms/{formId}/submissions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMarketingPages

GET/v1/orgs/:orgId/marketing/pages

Landing pages with their views.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMarketingPages

POST/v1/orgs/:orgId/marketing/pages

A landing page: a block document with forms, at a slug in the org.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "slug": "example"
  }'
orgMarketingPagesByPageId

GET/v1/orgs/:orgId/marketing/pages/:pageId

One landing page (its draft and what was published) and its public address.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages/{pageId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgMarketingPagesByPageId

PATCH/v1/orgs/:orgId/marketing/pages/:pageId

Changes the draft, name or address over version.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages/{pageId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingPagesPublish

POST/v1/orgs/:orgId/marketing/pages/:pageId/publish

Puts the draft live at /p/<org>/<slug> on the Marketing app.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages/{pageId}/publish' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
postOrgMarketingPagesUnpublish

POST/v1/orgs/:orgId/marketing/pages/:pageId/unpublish

Takes a page down until it is published again.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages/{pageId}/unpublish' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "version": 1
  }'
deleteOrgMarketingPagesByPageId

DELETE/v1/orgs/:orgId/marketing/pages/:pageId

Deletes a landing page and frees its address.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/pages/{pageId}?version=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
personasCatalogGet

GET/v1/orgs/:orgId/marketing/personas

List personas

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/personas' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
personasSegmentsGet

GET/v1/orgs/:orgId/marketing/personas/segments/:segmentId

Get a persona

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/marketing/personas/segments/{segmentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
personasPublicCatalog

GET/v1/public/personas

List the public personas

Parameters and answers
curl 'https://api.cactive.com.au/v1/public/personas' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
personasPublicProfile

GET/v1/public/personas/:code

Get a public persona

Parameters and answers
curl 'https://api.cactive.com.au/v1/public/personas/{code}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"