Skip to main content
PUT
Saves the client rule for one CRM, the same rule as Targeting > Clients in the app. It replaces the saved rule whole. The rule is checked against the CRM’s company schema, then a pull of that CRM’s clients starts straight away; after that the list updates nightly. A rule has one or both of two conditions:
  • A company property: field, fieldType and the values that mean client. Get the property names, types and options from List Client Rule Fields.
  • A won deal (wonDeal: true): HubSpot reads hs_is_closed_won, Salesforce reads IsWon, and Attio, which has no won flag, uses the deal stages you list in wonStages.
With both, match is any (either is enough, the default) or all (both must hold). Check what a rule selects first with Preview Client Rule.

Errors

Authorizations

Authorization
string
header
required

The API key you created on the API settings page of the Clustr app.

Path Parameters

provider
enum<string>
required

The CRM whose client rule to use. It must be connected to your workspace.

Available options:
hubspot,
salesforce,
attio

Body

application/json

Who counts as a client in one CRM: a company property condition (field, fieldType and the values that mean client), a won deal (wonDeal), or both, combined by match.

confirm
boolean

Set Client Rule only (Preview Client Rule ignores it). Changing or turning off a rule that is on can remove companies from your client list, so such a save writes nothing and answers confirmationRequired: true with currentRuleMatches, newRuleMatches, countIsLowerBound, a sample and a message. Send the same request with confirm set to true to apply it.

enabled
boolean

Whether the rule applies. A disabled rule is kept but marks no company as a client.

field
string

The company property's API name, from the fields endpoint. Omit field and fieldType for a rule on won deals alone.

fieldLabel
string

The property's display name. Filled from the CRM when omitted.

fieldType
enum<string>

boolean, single_select, multi_select or text, as the fields endpoint reports it.

Available options:
boolean,
single_select,
multi_select,
text
values
string[]

The values that mean client: option values for a dropdown, ["true"] for a checkbox, exact text for a text property.

valueLabels
string[]

Display labels for values, in the same order.

wonDeal
boolean

A company with at least one won deal is a client: HubSpot hs_is_closed_won, Salesforce IsWon, Attio a deal in one of wonStages.

wonStages
string[]

Attio only, and required there with wonDeal: the ids of the deal stages that count as won, from dealStages. Ignored for HubSpot and Salesforce.

wonStageLabels
string[]

Attio only: display labels for wonStages, in the same order.

match
enum<string>
default:any

With both conditions, any (either is enough) or all (both must hold).

Available options:
any,
all

Response

The rule, as saved

success
boolean
Example:

true

data
object