Documentation / MCP / campaigns_update
campaigns_update
POSThttps://mcp.oppalerts.com/mcptool: campaigns_update
Changes the label, the industry, or the description of one campaign.
What it does
The tool changes the label, the industry, or the description of one campaign. Before the campaign is finalized, all 3 can change. After it is finalized, only the label can change.
The response contains the campaign after the change. In the web app, the change shows on the Settings tab of Edit Campaign, on the Campaign card.
Who May Call It
- The account owner, an account editor, or a campaign editor of this campaign. An account viewer or a campaign viewer gets the error
no_access. - The token or the connection needs the scope
api:write, andmcp:useas every MCP tool does. Withoutapi:write, the call gets the errorforbidden. Authentication says which tokens and apps have it. - The tool tells the MCP client that it changes data, so a client such as Claude asks you before the call.
Connect
claude mcp add --transport http oppalerts https://mcp.oppalerts.com/mcp
The first call opens a browser window for the OppAlerts login. Allow changes there. Connect an AI Agent has the details.
Parameters
campaignint, required, 1 to 4294967295- The campaign id, from campaigns_list. It must be a campaign of your account.
labelstring, required, at most 255 characters- Required. The name of the campaign, at most 255 characters. It cannot be empty.
industrystring, optional, at most 255 characters- Optional. The industry of the campaign, for example Boutique hotels: 2 to 10 words and at most 255 characters. Words are separated by spaces. Fewer or more words are refused with industry_words. Leave it out to keep the stored value. It cannot be empty, and it must be different from the industries of the other campaigns of the account.
descriptionstring, optional- Optional. The market description: 100 to 1,000 characters, counted after the spaces at the start and the end are removed. A text outside that range is refused with description_length, including when you resend the stored description. Leave it out to keep the stored value. An empty text and a text of only spaces are refused with description_empty: a campaign cannot have no description.
Rules
labelis required.industryanddescriptionare optional. A field that you leave out does not change, and nothing is assumed in its place.- After the campaign is finalized, an industry or a description that is different from the stored one is refused with
campaign_finalized. industrytakes 2 to 10 words, separated by spaces. Fewer or more words are refused withindustry_words.descriptiontakes 100 to 1,000 characters, counted after the spaces at the start and the end are removed. A text outside that range is refused withdescription_length, including when you resend the stored description.- An empty description, or a description of only spaces, is refused with
description_empty: a campaign cannot have no description. - The industry must be different from the industries of the other campaigns of the account (
industry_taken).
Strict Rules
- A field that is not in the list above is refused. The result then has
isErrortrue, and its text starts withbad_param. The error names the field: "<field> is not a field of this tool." - A bad value is refused, and the error names the field. A bad value is a value of the wrong type, a number with a fraction for a whole-number field, a value out of its range, a value that is not in its list, or an empty text, list, or object. A required field that you do not send is refused too. To send no value for an optional field, leave the field out. No field has a default value, and the tool never changes a value that you send.
- An error about the format of a call, such as a refused field, names the field. Its message ends with one sentence: "Read the documentation at https://oppalerts.com/docs for the correct format." Every other error, such as
forbiddenbelow, has only its own sentence.
Response fields
The response contains the campaign after the change, in the same format that campaigns_settings returns.
campaign.idint- The campaign id.
campaign.labelstring- The name of the campaign.
campaign.industrystring- The industry of the campaign.
campaign.descriptionstring- The description of the campaign. It is an empty string when the campaign has none.
campaign.statestring- The state of the campaign. The example shows
active. campaign.finalizedbooltruewhen the campaign is finalized.campaign.finalized_atstring- The time when the campaign was finalized, as ISO 8601 text in UTC. Empty when
finalizedisfalse. campaign.researchstring- The progress of the campaign’s research, with the values of
researchin campaigns_list. The example showsnot_started. campaign.started_atstring- The time when the campaign last counted as a start in the plan limit of campaigns started in 24 hours, as ISO 8601 text in UTC: its create, or campaigns_activate of a campaign that was never finalized. Empty when the campaign has no such time.
campaign.taxonomy_presetslist- The taxonomy presets of the campaign. Each item is one taxonomy category.
campaign.taxonomy_presets[].taxonomystring- The taxonomy of the category, as taxonomy_taxonomies names it.
campaign.taxonomy_presets[].category_idint- The id of the category.
campaign.taxonomy_presets[].category_labelstring- The label of the category, for example
Travel > Travel Type > Hotels and Motels. campaign.daily_opportunities_emailobject- The daily opportunities email settings of the campaign.
campaign.daily_opportunities_email.enabledbooltruewhen the daily opportunities email is on.campaign.daily_opportunities_email.emailstring- The address that gets the daily opportunities email.
campaign.daily_opportunities_email.first_namestring- The first name used in the daily opportunities email.
campaign.daily_opportunities_email.send_hourint- The hour of the day when the daily opportunities email is sent, in
campaign.daily_opportunities_email.timezone. campaign.daily_opportunities_email.timezonestring- The time zone of
send_hour, for exampleAmerica/Los_Angeles. campaign.daily_opportunities_email.unsubscribedbooltruewhen the address unsubscribed from the daily opportunities email.campaign.daily_opportunities_email.unsubscribed_atstring- The time when the address unsubscribed with the link in the email, as ISO 8601 text in UTC. Empty when
unsubscribedisfalse.
Example
Call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "campaigns_update",
"arguments": {
"campaign": 124,
"label": "Boutique Hotels",
"industry": "Boutique hotels",
"description": "Boutique hotel brands competing for direct bookings in mid-size US cities, against the online travel agencies and the big hotel chains."
}
}
}
Response
The response is shown in full.
{
"campaign": {
"id": 124,
"label": "Boutique Hotels",
"industry": "Boutique hotels",
"description": "Boutique hotel brands competing for direct bookings in mid-size US cities, against the online travel agencies and the big hotel chains.",
"state": "active",
"finalized": false,
"finalized_at": "",
"research": "not_started",
"started_at": "2026-11-01T15:04:05Z",
"taxonomy_presets": [
{
"taxonomy": "iab-content-taxonomy",
"category_id": 2358064203319202,
"category_label": "Travel > Travel Type > Hotels and Motels"
}
],
"daily_opportunities_email": {
"enabled": true,
"email": "pat@example.com",
"first_name": "Pat",
"send_hour": 7,
"timezone": "America/Los_Angeles",
"unsubscribed": false,
"unsubscribed_at": ""
}
}
}
Errors
An error returns as a tool result with isError true. Its text starts with the error code. An example: a call by a team member who cannot make this change.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "no_access: You have read permissions for this campaign."
}
],
"isError": true
}
}
One error is not a tool result. A call with a token that does not have the scope api:write gets the HTTP status 403, as the MCP standard says. The answer has a WWW-Authenticate header with error="insufficient_scope" and the scopes that the call needs. An MCP app that reads this header asks you for the permissions to change campaigns. The body has the error code forbidden and its sentence. The tool does not run, and the call is not counted.
HTTP/1.1 403 Forbidden
WWW-Authenticate: Bearer error="insufficient_scope", scope="mcp:use api:write", resource_metadata="https://mcp.oppalerts.com/.well-known/oauth-protected-resource/mcp", error_description="This token cannot change data. Make a new API token with edit permissions on the API tokens page, or connect the app again and allow changes."
Content-Type: application/json
{
"error": "forbidden",
"error_description": "This token cannot change data. Make a new API token with edit permissions on the API tokens page, or connect the app again and allow changes."
}
The error codes of this tool, each with its HTTP status and its sentence:
bad_param(HTTP 400 in the API): A parameter is missing or has a wrong value. The sentence names it.no_campaign(HTTP 404 in the API): That campaign is not in this account.forbidden(HTTP 403 in the API, and HTTP 403 in MCP too, see above): This token cannot change data. Make a new API token with edit permissions on the API tokens page, or connect the app again and allow changes.no_access(HTTP 403 in the API): You have read permissions for this campaign.db_error(HTTP 500 in the API): The change could not be saved. Nothing was changed.missing_field(HTTP 400 in the API): A label is needed, and before the campaign is finalized an industry too.campaign_finalized(HTTP 409 in the API): This campaign is finalized. Its industry and its description cannot be changed. The label, the organizations, and the saved opportunities can still change.industry_taken(HTTP 409 in the API): Not saved: another campaign in your account uses this industry. Choose a different industry.description_empty(HTTP 400 in the API): description is empty or holds only spaces. Send the description of the campaign, or leave the field out to keep the stored one.industry_words(HTTP 400 in the API): industry takes 2 to 10 words.description_length(HTTP 400 in the API): description has fewer than 100 or more than 1,000 characters after the spaces at its start and end are removed. The sentence gives the count. Send 100 to 1,000 characters.
Limits
- This tool has its own daily count for the account. When the count is used up, the call is refused with
daily_limit(HTTP 429 in the API). account_calls_left shows the calls left today and when the count resets. - A refused call does not use the daily count of this tool.
- This tool is not an index search. It does not use the daily count of index searches.
- Only one change runs at a time per account. A call made while another change is running for the account is refused with
one_at_a_time(HTTP 429 in the API) and uses no daily call. Send it again after a few seconds.
Same change in the API
POST /v1/campaigns/update HTTP/1.1
Host: api.oppalerts.com
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{"campaign": 124, "label": "Boutique Hotels", "industry": "Boutique hotels", "description": "Boutique hotel brands competing for direct bookings in mid-size US cities, against the online travel agencies and the big hotel chains."}
The API page is POST /v1/campaigns/update.