Skip to main content

MCP campaign tutorial

Use IQM Model Context Protocol (MCP) to interact with the Campaign API.

Overview​

This tutorial guides you through using IQM MCP to access and manage campaigns and insertion orders (IOs) with the Campaign API.

The Campaign MCP supports a limited set of features of the Campaign API. For a comprehensive list of supported features and best practices for using the Campaign API, refer to the Campaign API guidelines.

Before you begin​

To create an IO and campaign, the following are required:

  1. An account on the IQM platform
    • See Before you begin to create an account and request a Client ID and Client Secret
  2. An approved and running creative
  3. A conversion
  4. A PG deal (for PG campaigns)

About IQM campaigns​

IQM's campaigns define the individual marketing strategies of your ads. By specifying the supported parameters, you can use the API to create a new campaign.

More resources​

Create an insertion order​

You can use IQM MCP to create and manage IOs by providing the required details and settings for each type.

PromptResponse exampleNotes
Help me create a new insertion orderMCP prompts the user for the required details and settings for the new insertion order.
Let's update that IO with a new name: IOQ2
Show me a list of active IOs on this WorkspaceMCP identifies IO status ID 1 as "active" and retrieves a filtered list.

Create an Advanced campaign​

You can also use IQM MCP to create an Advanced campaign by providing the required details and settings for the campaign.

PromptResponse exampleNotes
Help me create a new Advanced campaign for insertion order "IOQ2"MCP prompts the user for the required details and settings for the new Advanced campaign.
Let's update that campaign with a few parameters: change included device types to IDs 13 and 15; add PMP deal ID 1757; and include Pixel conversion ID 6808
Show me details for campaign 594029

Create a PG campaign​

You can also use IQM MCP to create a PG campaign by providing the required details and settings for the campaign.

PromptResponse exampleNotes
Help me create a new PG campaignMCP prompts the user for the required details and settings for the new PG campaign.
Let's update that PG campaign. I want to use a different creative. Also, rename it to "PG Campaign 2026 Q3"MCP retrieves a list of available creatives and updates the PG campaign with the selected creative and new name.
Show me a list of PG campaigns

Manage campaign targeting​

You can manage campaign targeting by providing the required details and settings for the campaign.

PromptResponse exampleNotes
I want to update the audience targeting for each of the A1-A5 campaigns. Include audience 1140761 for targeting in each of those campaigns. Then include audiences 1140753 and 1140752 in campaigns A2 and A3MCP may try to edit each campaign in parallel. Try prompting to use the "audience targeting tool" to update audience targeting for multiple campaigns at once.
Now I want to assign multiple PMP deals to campaigns A2, A3, and A5. Assign these deal IDs: 440, 119, and 1448MCP identifies one PMP deal as inaccessible to the user and updates with the two that are accessible.
Now let's assign creatives 715867, 714974, and 714821 to campaigns A1, A3, and A5
Now show me a list of the A campaigns we have just updated with their details in a table

Tools index​

The table below lists the tools that MCP uses in this tutorial, with links to their API documentation. For every Campaign API tool available in MCP, see the Campaign API section of the Tools index.

Tool nameDescriptionDocumentation
createCampaignIOCreate a new insertion orderCreate an insertion order
editIODetailsUpdate an existing insertion orderUpdate insertion order details
getIOBasicDetailsListList IOs with filters (status, budget type, owner)Get insertion order details
saveCampaignCreate an advanced campaign in pending statusCreate new campaign
editCampaignPatchUpdate a campaign (auto-promotes draft to pending)Update campaign
getCampaignFetch full details of one campaignGet campaign details by ID
addPGCampaignCreate a PG campaignCreate new PG campaign
editPGCampaignUpdate a PG campaignUpdate PG campaign
getCreatives_1Get a list of creatives and their detailsGet list of creatives and details
getCampaignBasicDetailListPaginated list with rich filters (type, status, IO, creative type)Get basic details of campaigns
CampaignAudienceTargetingListBulk include/exclude/remove audiences across many campaigns (map-keyed by campaign ID)Update audience targeting in campaigns
managePMPDealCampaignMappingsBulk assign/de-assign PMP deals to campaignsAssign PMP deals
createCampaignCreativeTargetingBulk assign/unassign creatives to campaignsUpdate creative targeting in campaigns
Have a question?
Was this page helpful?