POST
/
v0
/
tags
/
rules
curl --request POST \
  --url https://api.sandbox.teal.dev/v0/tags/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'teal-instance-id: <teal-instance-id>' \
  --data '{
  "expression": "t.amount == 100",
  "name": "<string>",
  "priority": 1,
  "tag_id": "NCB2xo5S1yQbNgyWskXpwG"
}'
{
  "expression": "t.amount == 100",
  "id": "<string>",
  "name": "<string>",
  "priority": 1,
  "tag_id": "<string>"
}

Authorizations

Authorization
string
headerrequired

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

teal-instance-id
string
required

The teal instance ID

Body

application/json
expression
string
required

The rule expression

name
string
required

The name of the rule

priority
integer
required

The rule priority. Higher values take priority over lower values.

tag_id
string
required

Tag id to apply if the rule matches

Response

201 - application/json
expression
string
required

The rule expression

id
string
required

The id of the rule

name
string
required

The name of the rule

priority
integer
required

The rule priority. Higher values take priority over lower values.

tag_id
string
required

Tag id to apply if the rule matches