Skip to main content
PUT
/
api
/
v1
/
templates
/
{template_id}
/
rules
/
{rule_id}
/
styles
Update Rule Styles
curl --request PUT \
  --url https://api.artosai.com/api/v1/templates/{template_id}/rules/{rule_id}/styles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "style_names": [
    "Heading 2",
    "Normal"
  ],
  "fill": "#FFFF00",
  "color": null
}
'
{
  "rule_id": "<string>",
  "styles": {},
  "updated": true
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Token provides organization-scoped access.

Path Parameters

template_id
string
required

UUID of template (for authorization)

rule_id
string
required

UUID of rule to update

Body

application/json
style_names
string[] | null

List of style names to apply (e.g., ['Heading 2', 'Normal'])

fill
string | null

Background fill color hex (e.g., '#FFFF00') or null to remove

color
string | null

Text/font color hex (e.g., '#FF0000') or null to remove

Response

Rule styles updated successfully

rule_id
string
required

UUID of the updated rule

styles
object
required

Updated styles object

updated
boolean
default:true
required

Whether the update was successful