---
title: "Create or edit a LinkedIn conversion rule"
method: POST
path: "/api/v1/tools/linkedin_manage_conversions/execute"
tags: ["LinkedIn Ads"]
---

# Create or edit a LinkedIn conversion rule

`POST /api/v1/tools/linkedin_manage_conversions/execute`

## Request

- Base URL: `https://adako.ai`
- URL: `https://adako.ai/api/v1/tools/linkedin_manage_conversions/execute`
- Auth: HTTP bearer

Creates a conversion rule on the account, or edits an existing one's name, value, attribution windows or enabled state.
Use when: the user needs a conversion to track before running a WEBSITE_CONVERSION campaign, or wants to change what a conversion is worth. A new rule is created **enabled but attached to nothing** — it records nothing until linkedin_associate_conversion attaches it to a campaign, and this tool says so in its result.
Do not create a second rule for something already tracked: duplicate rules double-count and make every cost-per-conversion figure wrong. Run linkedin_list_conversions first, every time.
Do not change an attribution window on a live rule without telling the user the reported history will shift — LinkedIn re-attributes, and last month's numbers will no longer match what they saw.
Do not use this for Lead Gen Form leads: those are counted by LinkedIn automatically and need no rule.
Pass url_rules for a rule the site-wide Insight Tag fires by page URL (a thank-you page, say). A rule without URL rules is event-specific: it records nothing until the site runs that rule's own event snippet from Campaign Manager — say so to the user. On an existing rule, url_rules replaces the whole list.
Attribution windows are 1, 7 or 30 days (post-click default 30, view-through default 7).
Returns the rule read back from the platform. A rule requires the Insight Tag to be installed on the site; this tool cannot verify that, so say it plainly if the user is unsure.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `arguments` object
    - `ad_account_id` string: LinkedIn ad account id — the numeric id from Campaign Manager, as a string ("506699162"). Omit it to use the primary account; pass it when the user manages several.
    - `conversion_id` string: The rule to edit. Omit to create a new one. LinkedIn ids are numeric strings; a full urn:li:… value is also accepted.
    - `name` string: Rule name as it appears in reporting.
    - `type` 'LANDING' | 'DOWNLOAD' | 'SIGN_UP' | 'PURCHASE' | 'ADD_TO_CART' | 'KEY_PAGE_VIEW' | 'LEAD' | 'JOB_APPLY' | 'INSTALL' | 'PHONE_CALL' | 'TALK_TO_HUMAN' | 'OTHER': What the conversion represents (default LEAD for a new rule). LinkedIn documents ADD_TO_CART, DOWNLOAD, INSTALL, KEY_PAGE_VIEW, LEAD, PURCHASE, SIGN_UP, OTHER; the other values are refused with the closest one named.
    - `value` number: What one conversion is worth, a decimal in the account currency.
    - `post_click_window_days` union: Post-click attribution window in days: 1, 7 or 30 (LinkedIn defaults to 30). 90 is refused.
      - 1
      - 7
      - 30
      - 90
    - `view_through_window_days` union: View-through attribution window in days (1, 7 or 30; LinkedIn defaults to 7).
      - 1
      - 7
      - 30
    - `enabled` boolean: Switch the rule on or off.
    - `url_rules` object[]: Page URLs that count as this conversion when the Insight Tag sees them; a visit matching any one rule counts. Omit for an event-specific rule the site fires itself. On an existing rule this replaces every current URL rule.
      - `match_type` 'EXACT' | 'STARTS_WITH' | 'CONTAINS', required: EXACT (the whole URL), STARTS_WITH (a prefix) or CONTAINS (a fragment).
      - `value` string, required: The URL text to match, without the protocol: "example.com/thank-you". No regular expressions.
    - `idempotency_key` string: Optional caller-supplied key; identical keys never execute twice.
    - `raw_data` boolean: Return compact JSON only (no markdown). Use when you will compute on the result.

## Response `200`

The tool ran. A write returns proposal_id and approve_url while the change waits for approval.

- SuccessEnvelope
  - `success` unknown, required
  - `tool` string, required
  - `data` object, required: Machine-readable result.
  - `markdown` string, required: The same result written for a person or a model.
  - `quota` Quota: Task usage for the current billing period.
    - `plan` string
    - `used` integer
    - `limit` integer
    - `period_end` string
    - `upgrade_url` string
  - `proposal_id` string: Present for writes. Nothing changes on the ad platform until it is approved.
  - `approve_url` string: Where a person approves the proposal.
  - `request_id` string, required

## Other responses

- `400`: Invalid arguments, or the ad account could not be resolved.
- `401`: Missing, invalid, revoked or expired API key.
- `402`: Monthly task quota used up, or the plan does not include this tool.
- `403`: The connected ad account lacks the access level this tool needs.
- `404`: Unknown tool name.
- `409`: Not connected, reconnect needed, confirmation required, a proposal already pending or no longer pending, an identical create that failed earlier today (proposal_failed_before), a create that duplicates an approved one (duplicate_create), the ad-account limit of the plan reached (account_limit), or an Idempotency-Key reused with different arguments.
- `429`: Rate limited by Adako or by the ad platform. See Retry-After.
- `500`: Unexpected error inside Adako.
- `502`: The ad platform returned an error.

---

[API](https://skmtc.dev/adako/apis/adako-rest-api.md) · [All operations](https://skmtc.dev/adako/apis/adako-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adako/apis/adako-rest-api/revisions/59ee60d48a56?raw)
