Skip to content
Denne side findes på dansk. Læs på dansk
HeyMySocial

build_campaign

Build a whole campaign as drafts

writes listed directly

Create a complete campaign in one call: the campaign, its strategy brief, optional hypotheses, and up to 20 posts, each with channel, funnel stage, planned local time, text (yours, or compose: true for the rule-built variant), an optional creative and an optional tracked link.

Strategy fields you leave out are filled by fixed rules from the brand profile and listed as generated. Everything is saved as drafts in one step: if any post is invalid, nothing is created. Nothing is approved or scheduled. The reply is the whole tree with ids, app_urls, QA errors and warnings per post, and the first creative as a picture to look at. Read get_brand, list_channels and list_creative_templates first; use only facts from the workspace or the person. Always pass request_key so a retry does not build it twice. Then show the plan to the person and call request_approval for the posts they accept.

Arguments

NameTypeNeededWhat it is
request_key string no Any unique string for this build (for example a UUID). The same key returns the first result instead of building a second campaign.
campaign object yes The campaign. Its opaque ref_code is generated and returned.
campaign.name string yes The campaign name, up to 160 characters.
campaign.objective string no One of: awareness, engagement, traffic, leads, sales
campaign.kind string no Default organic.One of: organic, paid, mixed
campaign.starts_on string no First day, YYYY-MM-DD.
campaign.ends_on string no Last day, YYYY-MM-DD.
campaign.budget_minor integer no The person's own budget in minor units (øre, cents). Never invent one.
campaign.currency string no ISO currency of the budget; defaults to the workspace currency.
strategy object no The strategy brief. Every field is optional: what you leave out is filled by rules from the brand profile and reported in strategy.generated_fields.
strategy.name string no Default: the campaign name.
strategy.goal string no
strategy.target_segment string no
strategy.persona_id string no A persona id from get_brand.
strategy.offer_id string no An offer id from get_brand.
strategy.messaging object no
strategy.messaging.awareness object no
strategy.messaging.awareness.message string no What a post at the awareness stage has to get across: a brief for the writer, not finished copy.
strategy.messaging.awareness.cta string no The one thing to ask for at this stage.
strategy.messaging.consideration object no
strategy.messaging.consideration.message string no What a post at the consideration stage has to get across: a brief for the writer, not finished copy.
strategy.messaging.consideration.cta string no The one thing to ask for at this stage.
strategy.messaging.conversion object no
strategy.messaging.conversion.message string no What a post at the conversion stage has to get across: a brief for the writer, not finished copy.
strategy.messaging.conversion.cta string no The one thing to ask for at this stage.
strategy.channels array of string no One of: mock, facebook, instagram, linkedin
strategy.kpi string no One of: reach, engagement_rate, link_clicks, leads, qualified_leads, sales, cost_per_lead
strategy.exclusions string no What must never be said, shown or promised.
strategy.experiment_design string no What is compared, on which metric, when a decision is made and when the answer is inconclusive.
strategy.budget_hypothesis_minor integer no The person's own budget estimate in minor units. Never invent one.
strategy.currency string no
hypotheses array of object no Up to 10 beliefs the campaign will test.
hypotheses[].statement string yes The belief to test, in one sentence.
hypotheses[].rationale string no
hypotheses[].primary_metric string no One of: reach, engagement_rate, link_clicks, leads, qualified_leads, sales, cost_per_lead
hypotheses[].evidence_tier string no What the belief rests on today. A competitor's post is market_signal: it proves nothing about results.One of: none, market_signal, own_measured, verified_sales
hypotheses[].priority integer no 1 (first) to 5.
posts array of object yes 1 to 20 posts.
posts[].channel_id string no The channel from list_channels. When omitted and exactly one connected channel fits `platform`, that one is used and reported.
posts[].platform string no Used when no channel_id is given. "mock" is the practice channel.One of: mock, facebook, instagram, linkedin
posts[].funnel_stage string no One of: awareness, consideration, conversion, retention
posts[].intent string no One of: educate, prove, offer, engage, announce
posts[].planned_for string no Local time in the workspace time zone, "YYYY-MM-DD HH:MM". Planning a time schedules nothing.
posts[].title string no A working title for finding the post.
posts[].body string no The post text. Give this, or set compose: true.
posts[].compose boolean no true: take the best variant from the rule-based composer (approved facts only, no model) instead of a body.
posts[].topic string no With compose: what the post is about. Default: the strategy's message for the funnel stage.
posts[].cta string no Call to action, added as the last line when the body does not contain it.
posts[].link_url string no An https link from the brand profile or the person. Ignored when tracked_link is given.
posts[].format string no Default: image when a creative is made, otherwise text.One of: text, image, carousel, video, story, link
posts[].locale string no Default: the workspace language.One of: en, da
posts[].creative object no A picture made with the built-in designer for this post.
posts[].creative.template string yes A layout from list_creative_templates.One of: bold_headline, quote, offer_badge, checklist, announcement, photo_caption
posts[].creative.headline string yes The main line, up to 300 characters.
posts[].creative.subline string no
posts[].creative.cta string no Up to 60 characters.
posts[].creative.badge string no Up to 40 characters.
posts[].creative.items array of string no For "checklist": up to five short points.
posts[].creative.image_asset_id string no For "photo_caption": an uploaded image id.
posts[].creative.formats array of string no Default ["1:1"]. Each format is one render; the first is attached to the post.One of: 1:1, 4:5, 9:16, 16:9
posts[].tracked_link object no Make a tracked link for this post, attach it to the post and the campaign, and use its short address as the post's link.
posts[].tracked_link.destination_url string yes Where the link leads: a full https address on the person's own site.
posts[].tracked_link.label string no A short name people will recognize in reports.
posts[].tracked_link.utm_content string no Tells variants apart, for example "video-a". No spaces.

Like every workspace tool it also takes workspace: a workspace id or slug. Leave it out to use the workspace the person last worked in.

Example

From a recorded run in which an assistant built a campaign from an empty workspace. Ids are replaced with placeholders.

{
    "name": "build_campaign",
    "arguments": {
        "request_key": "kc-spring-service-2027-build-1",
        "campaign": {
            "name": "Spring service 2027",
            "kind": "organic",
            "objective": "leads",
            "starts_on": "2026-12-01",
            "ends_on": "2027-04-30"
        },
        "strategy": {
            "name": "Spring service 2027",
            "goal": "Get leads for the Spring service offer from commuters in Aarhus.",
            "target_segment": "Commuters in Aarhus who ride to work every day.",
            "persona_id": "{persona}",
            "offer_id": "{offer}",
            "kpi": "leads",
            "channels": [
                "mock"
            ],
            "exclusions": "Never say \"cheapest\" or \"guaranteed\". No promises of results. No facts, prices, numbers or claims beyond the approved brand facts and the Spring service offer.",
            "experiment_design": "Three posts on the practice channel, one per funnel stage, each with its own tracked link. Compare link clicks and leads per link after the posts have run. The practice channel's metrics are invented and three posts are a small sample, so any difference counts as inconclusive.",
            "messaging": {
                "awareness": {
                    "message": "Introduce Kystens Cykler to daily commuters: a bike shop and workshop in Aarhus, open since 2011, that services all bike brands.",
                    "cta": "See the Spring service"
                },
                "consideration": {
                    "message": "Give the practical reasons to choose the workshop: all bike brands, pickup and return service inside Aarhus, a standard service takes one working day.",
                    "cta": "See what the Spring service includes"
                },
                "conversion": {
                    "message": "Present the Spring service offer exactly: 499 DKK, includes gears, brakes and chain adjustment, valid until 30 April 2027.",
                    "cta": "Get the Spring service"
                }
            }
        },
        "hypotheses": [
            {
                "statement": "A post that leads with practical workshop facts (pickup and return inside Aarhus, one working day) brings more link clicks from commuters than a post that leads with the price.",
                "rationale": "Starting assumption to test. One competitor post with a before/after hook was seen in the market (market signal only); it says nothing about results.",
                "evidence_tier": "none",
                "primary_metric": "link_clicks",
                "priority": 1
            }
        ],
        "posts": [
            {
                "title": "Awareness: your Aarhus bike workshop",
                "channel_id": "{channel}",
                "funnel_stage": "awareness",
                "intent": "educate",
                "planned_for": "2026-12-01 08:00",
                "body": "Do you ride to work in Aarhus every day?\n\nThen you should know us. Kystens Cykler is a bike shop and workshop in Aarhus, open since 2011.\n\nWe service all bike brands, so whatever you ride, you can bring it to us.",
                "cta": "See the Spring service",
                "creative": {
                    "template": "bold_headline",
                    "headline": "Ride to work in Aarhus every day?",
                    "subline": "Kystens Cykler: bike shop and workshop in Aarhus, open since 2011. We service all bike brands.",
                    "cta": "See the Spring service",
                    "formats": [
                        "1:1"
                    ]
                },
                "tracked_link": {
                    "destination_url": "https://kystenscykler.example/spring-service",
                    "label": "Spring service 2027, awareness post",
                    "utm_content": "awareness"
                }
            },
            {
                "title": "Consideration: how the workshop works",
                "channel_id": "{channel}",
                "funnel_stage": "consideration",
                "intent": "educate",
                "planned_for": "2026-12-02 08:00",
                "body": "Your bike gets you to work. Here is how our workshop fits around that:\n\n- We service all bike brands.\n- We offer a pickup and return service inside Aarhus.\n- A standard service takes one working day.\n\nRight now we have the Spring service. It includes gears, brakes and chain adjustment.",
                "cta": "See what the Spring service includes",
                "creative": {
                    "template": "checklist",
                    "headline": "Our workshop in short",
                    "items": [
                        "We service all bike brands",
                        "Pickup and return service inside Aarhus",
                        "A standard service takes one working day",
                        "In Aarhus since 2011"
                    ],
                    "cta": "See the Spring service",
                    "formats": [
                        "1:1"
                    ]
                },
                "tracked_link": {
                    "destination_url": "https://kystenscykler.example/spring-service",
                    "label": "Spring service 2027, consideration post",
                    "utm_content": "consideration"
                }
            },
            {
                "title": "Conversion: Spring service 499 DKK",
                "channel_id": "{channel}",
                "funnel_stage": "conversion",
                "intent": "offer",
                "planned_for": "2026-12-03 08:00",
                "body": "Spring service: 499 DKK.\n\nIt includes gears, brakes and chain adjustment, and we service all bike brands.\n\nThe offer is valid until 30 April 2027.",
                "cta": "Get the Spring service",
                "creative": {
                    "template": "offer_badge",
                    "headline": "Spring service",
                    "badge": "499 DKK",
                    "subline": "Includes gears, brakes and chain adjustment. Valid until 30 April 2027.",
                    "cta": "Get the Spring service",
                    "formats": [
                        "1:1"
                    ]
                },
                "tracked_link": {
                    "destination_url": "https://kystenscykler.example/spring-service",
                    "label": "Spring service 2027, conversion post",
                    "utm_content": "conversion"
                }
            }
        ]
    }
}

How it behaves

  • It changes something in the workspace, within what the signed-in person's role allows.
  • It is in the list every assistant sees when it connects.

How tools behave: confirmation, review links, errors and limits

decide_strategy · get_campaign · get_strategy · list_campaigns · manage_campaigns · manage_hypotheses · save_strategy_draft