Skip to content
advardeDeveloper docs
v1.0

Update campaign

Loading server catalog…. Download catalog

POSThttps://app.advarde.com/mcp
Prepare change

Upstream account eligibility and feature access may also apply.

Description: Prepare a reviewable change: Update a campaign. Returns a change_id; call ads_apply_change to execute after approval. Some features need Ads account enablement.

Method: tools/call · ads_update_campaign

Output: Tool data is returned in result.structuredContent and as JSON text in result.content. Inspect result.isError before using the result. Individual output fields depend on the operation.

Access: Requires the applicable write scopes, workspace role, and account permissions.

Upstream operation: POST /campaigns/{campaign_id}. Call this through the MCP tool above.

Review before applying

This tool prepares a proposal. Review the exact payload and obtain authorization before calling ads_apply_change. Preparation does not mean the upstream change has been applied.

Authentication

Use an MCP access token from MCP connections, or connect through OAuth. Send your token in the Authorization: Bearer header.

For full protocol initialization and tool discovery, use an MCP client. These examples show individual JSON-RPC requests.

Tool arguments

Send these fields inside params.arguments. The tool name is sent as params.name.

account_idstringrequired

Workspace-owned Advarde connection ID from ads_list_accounts.

format: "uuid"
campaign_idstringrequired
bodyobjectrequired
additionalProperties: false
EXPAND BODY
namestringoptional
minLength: 3maxLength: 1000pattern: "^.*\\S.*$"
descriptionschemaoptional
EXPAND DESCRIPTION
anyOf · schema 1

See the full schema for accepted values.

{
  "type": "string"
}
anyOf · schema 2

See the full schema for accepted values.

{
  "type": "null"
}
start_timeschemaoptional
EXPAND START_TIME
anyOf · schema 1

See the full schema for accepted values.

{
  "type": "integer",
  "maximum": 4102444800,
  "minimum": 946684800
}
anyOf · schema 2

See the full schema for accepted values.

{
  "type": "null"
}
end_timeschemaoptional
EXPAND END_TIME
anyOf · schema 1

See the full schema for accepted values.

{
  "type": "integer",
  "maximum": 4102444800,
  "minimum": 946684800
}
anyOf · schema 2

See the full schema for accepted values.

{
  "type": "null"
}
statusstringoptional
enum: ["active","paused","archived"]
budgetobjectoptional
additionalProperties: false
EXPAND BUDGET
lifetime_spend_limit_microsintegeroptional
minimum: 1000000
daily_spend_limit_microsintegeroptional
minimum: 1000000
targetingschemaoptional
EXPAND TARGETING
anyOf · schema 1
locationsobjectoptional
additionalProperties: false
EXPAND LOCATIONS
countriesarrayoptional
EXPAND COUNTRIES

Each array item

{
  "type": "string"
}
includearrayoptional
maxItems: 2500
EXPAND INCLUDE

Each array item

idstringrequired
namestringoptional
typestringoptional
country_codestringoptional
region_codestringoptional
excluded_locationsobjectoptional
additionalProperties: false
EXPAND EXCLUDED_LOCATIONS
countriesarrayoptional
EXPAND COUNTRIES

Each array item

{
  "type": "string"
}
includearrayoptional
maxItems: 2500
EXPAND INCLUDE

Each array item

idstringrequired
namestringoptional
typestringoptional
country_codestringoptional
region_codestringoptional
custom_audiencesobjectoptional
additionalProperties: false
EXPAND CUSTOM_AUDIENCES
idsarrayoptional
EXPAND IDS

Each array item

{
  "type": "string"
}
excluded_custom_audiencesobjectoptional
additionalProperties: false
EXPAND EXCLUDED_CUSTOM_AUDIENCES
idsarrayoptional
EXPAND IDS

Each array item

{
  "type": "string"
}
platformsschemaoptional
EXPAND PLATFORMS
anyOf · schema 1
includedarrayoptional
EXPAND INCLUDED

Each array item

{
  "type": "string",
  "enum": [
    "ios_app",
    "android_app",
    "web"
  ],
  "x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
}
{
  "properties": {
    "included": {
      "items": {
        "type": "string",
        "enum": [
          "ios_app",
          "android_app",
          "web"
        ],
        "x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
      },
      "type": "array"
    }
  },
  "type": "object",
  "required": [],
  "x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams",
  "additionalProperties": false
}
anyOf · schema 2

See the full schema for accepted values.

{
  "type": "null"
}
{
  "properties": {
    "locations": {
      "properties": {
        "countries": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "include": {
          "items": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "region_code": {
                "type": "string"
              }
            },
            "type": "object",
            "required": [
              "id"
            ],
            "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
            "additionalProperties": false
          },
          "type": "array",
          "maxItems": 2500
        }
      },
      "type": "object",
      "required": [],
      "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
      "additionalProperties": false
    },
    "excluded_locations": {
      "properties": {
        "countries": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "include": {
          "items": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "region_code": {
                "type": "string"
              }
            },
            "type": "object",
            "required": [
              "id"
            ],
            "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
            "additionalProperties": false
          },
          "type": "array",
          "maxItems": 2500
        }
      },
      "type": "object",
      "required": [],
      "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
      "additionalProperties": false
    },
    "custom_audiences": {
      "properties": {
        "ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "required": [],
      "x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
      "additionalProperties": false
    },
    "excluded_custom_audiences": {
      "properties": {
        "ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "required": [],
      "x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
      "additionalProperties": false
    },
    "platforms": {
      "anyOf": [
        {
          "properties": {
            "included": {
              "items": {
                "type": "string",
                "enum": [
                  "ios_app",
                  "android_app",
                  "web"
                ],
                "x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
              },
              "type": "array"
            }
          },
          "type": "object",
          "required": [],
          "x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams",
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [],
  "x-openai-class-name": "sofa.api.params.campaigns.TargetingParams",
  "additionalProperties": false
}
anyOf · schema 2

See the full schema for accepted values.

{
  "type": "null"
}
landing_page_configurationschemaoptional
EXPAND LANDING_PAGE_CONFIGURATION
anyOf · schema 1
query_string_templatestringoptional
{
  "properties": {
    "query_string_template": {
      "type": "string"
    }
  },
  "type": "object",
  "required": [],
  "x-openai-class-name": "sofa.api.params.campaigns.LandingPageConfigurationParams",
  "additionalProperties": false
}
anyOf · schema 2

See the full schema for accepted values.

{
  "type": "null"
}
conversion_event_setting_idsarrayoptional
EXPAND CONVERSION_EVENT_SETTING_IDS

Each array item

{
  "type": "string"
}
Full JSON Schema
{
  "type": "object",
  "properties": {
    "account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Workspace-owned Advarde connection ID from ads_list_accounts."
    },
    "campaign_id": {
      "type": "string"
    },
    "body": {
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 1000,
          "minLength": 3,
          "pattern": "^.*\\S.*$"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "start_time": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 4102444800,
              "minimum": 946684800
            },
            {
              "type": "null"
            }
          ]
        },
        "end_time": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 4102444800,
              "minimum": 946684800
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "paused",
            "archived"
          ],
          "x-openai-class-name": "sofa.api.params.common.ActivePausedArchivedStatusParam"
        },
        "budget": {
          "properties": {
            "lifetime_spend_limit_micros": {
              "type": "integer",
              "minimum": 1000000
            },
            "daily_spend_limit_micros": {
              "type": "integer",
              "minimum": 1000000
            }
          },
          "type": "object",
          "required": [],
          "x-openai-class-name": "sofa.api.params.campaigns.BudgetParams",
          "additionalProperties": false
        },
        "targeting": {
          "anyOf": [
            {
              "properties": {
                "locations": {
                  "properties": {
                    "countries": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "include": {
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "country_code": {
                            "type": "string"
                          },
                          "region_code": {
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
                        "additionalProperties": false
                      },
                      "type": "array",
                      "maxItems": 2500
                    }
                  },
                  "type": "object",
                  "required": [],
                  "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
                  "additionalProperties": false
                },
                "excluded_locations": {
                  "properties": {
                    "countries": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "include": {
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "country_code": {
                            "type": "string"
                          },
                          "region_code": {
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
                        "additionalProperties": false
                      },
                      "type": "array",
                      "maxItems": 2500
                    }
                  },
                  "type": "object",
                  "required": [],
                  "x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
                  "additionalProperties": false
                },
                "custom_audiences": {
                  "properties": {
                    "ids": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "required": [],
                  "x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
                  "additionalProperties": false
                },
                "excluded_custom_audiences": {
                  "properties": {
                    "ids": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "required": [],
                  "x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
                  "additionalProperties": false
                },
                "platforms": {
                  "anyOf": [
                    {
                      "properties": {
                        "included": {
                          "items": {
                            "type": "string",
                            "enum": [
                              "ios_app",
                              "android_app",
                              "web"
                            ],
                            "x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object",
                      "required": [],
                      "x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams",
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "type": "object",
              "required": [],
              "x-openai-class-name": "sofa.api.params.campaigns.TargetingParams",
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "landing_page_configuration": {
          "anyOf": [
            {
              "properties": {
                "query_string_template": {
                  "type": "string"
                }
              },
              "type": "object",
              "required": [],
              "x-openai-class-name": "sofa.api.params.campaigns.LandingPageConfigurationParams",
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "conversion_event_setting_ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "required": [],
      "x-openai-class-name": "sofa.api.params.campaigns.UpdateCampaignBody",
      "additionalProperties": false
    }
  },
  "required": [
    "account_id",
    "campaign_id",
    "body"
  ],
  "additionalProperties": false
}

Responses

200Successful protocol response

Inspect result.isError for tool-level failures, even when the HTTP status is 200.

202Notification accepted

MCP notifications return no JSON-RPC response body.

400Invalid request

Check the JSON-RPC envelope, parameters, and protocol version.

406Not acceptable

Accept must include application/json and text/event-stream.

429Rate limited

Wait for the Retry-After interval before making another request.

401Unauthorized

A valid, unexpired MCP bearer token is required.

403Access denied

Your connection needs access to this workspace and the requested operation.

Advarde MCP API v1.0