Skip to main content
PUT
/
v0
/
tags
/
rules
/
{tag_rule_id}
Update a tag rule
curl --request PUT \
  --url https://api.sandbox.teal.dev/v0/tags/rules/{tag_rule_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'teal-instance-id: <teal-instance-id>' \
  --data '
{
  "name": "Tag gas expense",
  "tag_id": "Tag gas expense",
  "expression": "match(\".*(?i)SHELL GAS\", t.description)",
  "priority": 10
}
'
{
  "message": "<string>",
  "data": "<unknown>",
  "display_message": "<string>",
  "error_code": "invalid_date"
}

Authorizations

Authorization
string
header
required

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

Headers

teal-instance-id
string
required

The teal instance ID

Path Parameters

tag_rule_id
string
required

The tag ID

Body

application/json
name
string | null

An arbitrary string, useful for identifying the tag rule.

Example:

"Tag gas expense"

tag_id
string | null

An arbitrary string, useful for identifying the tag rule.

Example:

"Tag gas expense"

expression
string | null

A pattern matching expression using the match(pattern, field) function. Use t to access the Transaction object. The pattern supports regular expression syntax.

Read more: Categorization guide

Example:

"match(\".*(?i)SHELL GAS\", t.description)"

priority
integer | null

The priority of the rule.

Example:

10

Response

Successful Response