Skip to main content
POST
Create Client Rule
Rules filter which workers are eligible for this client’s events. A rule is defined by a field_id (referencing a worker custom field) and an operator (is, is not, etc.). The response includes the full rule structure with resolved field names, credentials, and tags:
  • fields — Custom field conditions (e.g., “Facial Hair is Yes”).
  • credentials — Credential requirements (e.g., “has Completion certificate”).
  • has_tags — Workers must have these tags.
  • does_not_have_tags — Workers must not have these tags.

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string
required

Client ID

Body

application/json

Rule definition. Requires field_id and operator.

field_id
integer
required

Custom field ID to match against.

operator
string
required

Comparison operator (e.g., is, is not).

tag_id
string | null

Tag ID for tag-based rules.

value

Value to compare against.

Response

Created

A worker matching rule for a client, composed of field conditions, credential requirements, and tag filters.

fields
ClientRuleField · object[]
credentials
ClientRuleCredential · object[]
has_tags
ClientRuleTag · object[]
does_not_have_tags
ClientRuleTag · object[]