Docs

Add Threshold

POST /rule-sets/{ruleSetId}/rules/{ruleId}/thresholds

POST/rule-sets/{ruleSetId}/rules/{ruleId}/thresholds

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually.

Adds a threshold to a rule.

Requires EventSettings permission on the event.
Event scoping: This endpoint does not include {eventId} in the URL. The event is determined automatically from your x-Event-Token.

Path Parameters

FieldTypeRequiredDescription
ruleSetIdGuidRequiredThe rule set.
ruleIdGuidRequiredThe rule.

Request Body

FieldTypeRequiredDescription
orderintRequiredPosition among the rule's thresholds.
thresholddecimalRequiredThe amount.
thresholdUnitstringRequired`Hours`, `Minutes` or `Days`.
operatorstringRequired`GreaterThan` or `LessThan`.
resultingStateIdGuidRequiredState applied past the threshold.

Response

201 Created. No response body.

Error Codes

HTTP StatusDescription
400Invalid arguments.
404Rule set, rule or state not found.