update_linkedin_campaign_targeting

LinkedIn Ads Write

User wants to add or remove targeting criteria from a LinkedIn campaign

Endpoint

POST https://api.adspirer.ai/api/v1/tools/update_linkedin_campaign_targeting/execute

Headers

Description

User wants to add or remove targeting criteria from a LinkedIn campaign. Smart targeting update - incrementally add or remove targeting facets without replacing everything. Parameters: - campaign_id: Campaign ID to update targeting for (required) - add_locations / remove_locations: Location URNs to add/remove - add_industries / remove_industries: Industry URNs to add/remove - add_seniorities / remove_seniorities: Seniority URNs to add/remove - add_job_titles / remove_job_titles: Job title URNs to add/remove - add_company_sizes / remove_company_sizes: Company size URNs to add/remove - replace_all: If True, replaces ALL targeting (default: False, incremental) - account_id: Optional LinkedIn Ad Account ID Use `search_linkedin_targeting` first to find the correct URNs for targeting criteria. Example Prompts: - "Add New York to my campaign targeting" - "Remove the finance industry from targeting" - "Target VP and C-suite in my campaign" - "Change targeting to include tech companies" - "Add software engineers to my ad targeting" Execution time: 3-5 seconds

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
campaign_idstring requiredCampaign ID to update targeting for
add_locationsarray optionalLocation URNs to ADD to targeting
remove_locationsarray optionalLocation URNs to REMOVE from targeting
add_industriesarray optionalIndustry URNs to ADD
remove_industriesarray optionalIndustry URNs to REMOVE
add_senioritiesarray optionalSeniority URNs to ADD
remove_senioritiesarray optionalSeniority URNs to REMOVE
add_job_titlesarray optionalJob title URNs to ADD
remove_job_titlesarray optionalJob title URNs to REMOVE
add_company_sizesarray optionalCompany size URNs to ADD
remove_company_sizesarray optionalCompany size URNs to REMOVE
add_skillsarray optionalSkill URNs to ADD
remove_skillsarray optionalSkill URNs to REMOVE
add_job_functionsarray optionalJob function URNs to ADD
remove_job_functionsarray optionalJob function URNs to REMOVE
add_interestsarray optionalInterest URNs to ADD
remove_interestsarray optionalInterest URNs to REMOVE
add_degreesarray optionalDegree URNs to ADD
remove_degreesarray optionalDegree URNs to REMOVE
add_fields_of_studyarray optionalField of study URNs to ADD
remove_fields_of_studyarray optionalField of study URNs to REMOVE
add_employersarray optionalEmployer URNs to ADD
remove_employersarray optionalEmployer URNs to REMOVE
add_member_groupsarray optionalLinkedIn group URNs to ADD (include-only)
remove_member_groupsarray optionalLinkedIn group URNs to REMOVE
add_age_rangesarray optionalAge range URNs to ADD (include-only)
remove_age_rangesarray optionalAge range URNs to REMOVE
add_gendersarray optionalGender URNs to ADD (include-only)
remove_gendersarray optionalGender URNs to REMOVE
add_schoolsarray optionalSchool URNs to ADD
remove_schoolsarray optionalSchool URNs to REMOVE
add_member_behaviorsarray optionalMember behavior URNs to ADD
remove_member_behaviorsarray optionalMember behavior URNs to REMOVE
add_years_of_experiencearray optionalYears of experience URNs to ADD
remove_years_of_experiencearray optionalYears of experience URNs to REMOVE
add_followed_companiesarray optionalFollowed company URNs to ADD
remove_followed_companiesarray optionalFollowed company URNs to REMOVE
add_buyer_groupsarray optionalBuyer group URNs to ADD (API 2026-03+)
remove_buyer_groupsarray optionalBuyer group URNs to REMOVE
replace_allboolean optionalIf True, replaces ALL targeting. If False, adds/removes incrementally. default: false
account_idstring optionalLinkedIn Ad Account ID. Required for multi-account users. Get from list_connected_accounts.

Example request

{
  "arguments": {
    "campaign_id": "<campaign_id>",
    "add_locations": [
      "string"
    ],
    "remove_locations": [
      "string"
    ],
    "add_industries": [
      "string"
    ],
    "remove_industries": [
      "string"
    ],
    "add_seniorities": [
      "string"
    ],
    "remove_seniorities": [
      "string"
    ]
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for update_linkedin_campaign_targeting)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "update_linkedin_campaign_targeting"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "update_linkedin_campaign_targeting"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "update_linkedin_campaign_targeting",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai