Create rule

This API creates a rule for the user. Devices specified in the rule must exist. The caller must own, or have rights to, the device. Actions can be included at rule-creation time, or they can be added to the rule later.

The expression field must contain an expression conforming to Ayla Rule Expression Syntax. Expressions always evaluate to true or false. If they evaluate to true, the rule performs the associated action(s).

The action_ids field is optional. If you are not associating actions at creation time, eliminate the field from the request data object, or set the field to [] or null.

Language
Authentication
Header
Click Try It! to start a request and see the response here!