Context

Save a campaign context

Creates or updates the description of a campaign on a source (objective, promise, audience, landing page, entered spend), matched by source and name. Fields passed replace the stored values, which are not kept; fields left out stay as they are.

post/sites/{site}/campaign-contexts

Request

  • Base URL: https://api.onelence.com/v1
  • URL: https://api.onelence.com/v1/sites/{site}/campaign-contexts
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://api.onelence.com/oauth/authorize, token URL https://api.onelence.com/oauth/token, scopes: workspace:write)
    • HTTP bearer

Path parameters

sitestring required

Site domain (e.g. example.com) or site id. Defaults to the workspace's newest active site.

Query parameters

dry_runboolean

true returns a preview of the change and applies nothing.

Headers

Idempotency-Keystring

8 to 200 visible ASCII characters. Retries with the same key and request return the stored response for 24 hours.

Request body

source_keystring required

source_key from the campaign contexts list, or a source id.

namestring required

Campaign name; the same name updates that campaign.

type'unknown' | 'ad_campaign' | 'organic_post' | 'referral_placement' | 'email_send' | 'community_post' | 'partner_placement' | 'other'
objective'unknown' | 'awareness' | 'traffic' | 'engagement' | 'leads' | 'conversions' | 'sales' | 'retargeting' | 'trust'
demand_job'unknown' | 'create_demand' | 'reframe_demand' | 'capture_demand' | 'convert_demand' | 'retain_demand'
status'unknown' | 'running' | 'paused' | 'ended' | 'draft'
promisestring nullable
audiencestring nullable
primary_ctastring nullable
landing_page_urlstring uri nullable
context_urlstring uri nullable
notestring nullable

Response

Success.

object'campaign_context' required
idstring required
source_keystring required
source_namestring nullable required
namestring required
type'unknown' | 'ad_campaign' | 'organic_post' | 'referral_placement' | 'email_send' | 'community_post' | 'partner_placement' | 'other' required
objective'unknown' | 'awareness' | 'traffic' | 'engagement' | 'leads' | 'conversions' | 'sales' | 'retargeting' | 'trust' required
demand_job'unknown' | 'create_demand' | 'reframe_demand' | 'capture_demand' | 'convert_demand' | 'retain_demand' required
status'unknown' | 'running' | 'paused' | 'ended' | 'draft' required
promisestring nullable required
audiencestring nullable required
primary_ctastring nullable required
landing_page_urlstring nullable required
context_urlstring nullable required
notestring nullable required
updated_atstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.