Skip to main content
PATCH
/
campaigns
/
v2
/
{campaignId}
/
rules
Update lead rules
curl --request PATCH \
  --url https://inboxapp.com/api/v1/campaigns/v2/{campaignId}/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "syncedListIds": [
    "<string>"
  ],
  "excludedListIds": [
    "<string>"
  ],
  "excludeContacted": true,
  "excludeMutuals": true,
  "columnMappings": {},
  "detachBehavior": "unlink"
}
'
{
  "success": "<unknown>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaignId
string
required

The ID of the campaign.

Pattern: ^[0-9a-z]+$

Body

application/json
syncedListIds
string[]

List IDs to sync leads from. Leads in these lists are automatically added to the campaign and removed when they leave all synced lists.

Pattern: ^[0-9a-z]+$
Example:
["l44e15irdq4db30i77cgphhx"]
excludedListIds
string[]

User-created list IDs to exclude. Leads in these lists are removed from the campaign even if they appear in a synced list. Do not pass system list IDs here — use excludeContacted and excludeMutuals instead.

Pattern: ^[0-9a-z]+$
Example:
["kx9r3m7v2n1p5q8w4y6z0taj"]
excludeContacted
boolean

When true, leads you've already sent a direct message to are excluded from the campaign. Under the hood, this excludes the Contacted system list, which Inbox automatically maintains across all linked accounts.

Example:

true

excludeMutuals
boolean

When true, leads with a mutual conversation (at least one message sent and received) are excluded from the campaign. Under the hood, this excludes the Mutual system list, which Inbox automatically maintains across all linked accounts.

Example:

false

columnMappings
object

Custom column mappings keyed by source list ID. Each entry maps a source column ID to a campaign column ID. Only needed for custom columns — profile data is synced automatically. Columns must be created beforehand via the columns API. Unmapped source columns are ignored.

Example:
{
"l44e15irdq4db30i77cgphhx": {
"custom_q5cktl47a6pqa74eu06fz89v": "custom_m8r2xj93hd5bk0atcw7oe4fp"
}
}
detachBehavior
enum<string>
default:unlink

Controls what happens to leads when their source list is detached. 'unlink' (default) keeps the leads in the campaign but removes the link to the source list. 'remove' removes leads that were only in the campaign because of the detached list.

Available options:
unlink,
remove
Example:

"unlink"

Response

200 - application/json

OK

success
any
required