Skip to main content
Rules

Create a rule

Creates a rule for reviews, predictions, reservations (feedback surveys), host reviews of guests, guest messages, voice calls or listing quality. GET /rule-options lists the conditions, actions and settings the account offers. Actions that stay inside Sparrow Intel need write access; outbound actions (scheduled guest messages, automatic review replies, feedback surveys, reviews of guests, publishing reviews, texts and emails to teammates) also need a key with automations. New rules are saved turned off. Needs a key with the sparrow.write scope.

POST
/rules
Authorizationstringheaderrequired

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

Body

application/json
actionsobject[]required

What the rule does, 1 to 10, each {"type": an action type, "value": its setting (a label, status, teammate or task settings), "settings": an object, for outbound actions that take several}.

conditionsobject[]required

Conditions the item must meet, 1 to 20, each {"type": a condition type, "operator": one of its operators (omit for its first), "value": the value to compare}. Ratings use the account's scale.

matchenum<string>

all (default) when every condition must match, any when one is enough.

Available options: all, any
targetenum<string>required

review, prediction, reservation, host_to_guest_review, conversation_post, voice_conversation or listing_quality.

Available options: review, prediction, reservation, host_to_guest_review, voice_conversation, conversation_post, listing_quality
titlestringrequired

Rule name, up to 200 characters.

Response

application/json

Success

dataany
metaobject