Skip to main content
PUT
Replace a recipe
The body is the whole recipe, not a patch: rules and parameters you omit are cleared. Read the recipe first if you are changing one field. This is also how a recipe moves through its lifecycle - send the same body with a new status to promote a SHADOW recipe to LIVE, or to take a LIVE one back to INACTIVE.

Authorizations

Authorization
string
header
required

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

Path Parameters

recipe_id
string
required

The recipe identifier.

Example:

"rcp_01jc0t6fwwfgfsq1md24mhyztj"

Body

application/json
name
string
required
Maximum string length: 128
Example:

"signup_proxy_abuse"

status
enum<string>
required

Whether the recipe takes part in an evaluation, and whether its verdict counts.

  • DRAFT - Not yet in service. It does not evaluate.
  • SHADOW - Evaluates and is reported, so you can watch a threshold against live traffic before trusting it.
  • LIVE - Evaluates, and its verdict counts toward the evaluation-level answer.
  • INACTIVE - Taken back out of service. It does not evaluate.
Available options:
DRAFT,
SHADOW,
LIVE,
INACTIVE
Example:

"SHADOW"

threshold
integer<int64>
required

The score at which the recipe flags. The weights of the rules that triggered are summed, and the recipe flags when the total reaches this value. A threshold of 0 flags every evaluation.

Example:

70

rules
object[]
required

The rules this recipe scores over, with their weights. At least one is required.

Minimum array length: 1
parameters
object

This recipe's configuration: keys and their values, referenced in an expression as param.<key>, fixed until the recipe is replaced. Use them for the country list or the limit a shared rule should apply here, so the same rule can serve two recipes tuned differently.

A key is lower snake_case, at most 64 characters, and at most 32 may be declared. Values are strings - the only type either supports today.

Every key needs a value. An empty value is refused - omit the key instead.

Example:

Response

OK

id
string
required

The recipe identifier. Reference it in a flow's recipes to run it.

Example:

"rcp_01jc0t6fwwfgfsq1md24mhyztj"

name
string
required
Example:

"signup_proxy_abuse"

status
enum<string>
required
Available options:
DRAFT,
SHADOW,
LIVE,
INACTIVE
threshold
integer<int64>
required
Example:

70

rules
object[]
required
parameters
object
Example: