Skip to main content
PUT
/
v1
/
participants
/
{id}
/
state
/
attributes
/
{key}
Set participant attribute
curl --request PUT \
  --url https://api.scrip.dev/v1/participants/{id}/state/attributes/{key} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "value": "gold"
}
'
{
  "key": "tier",
  "value": "gold"
}
Sets a single attribute on a participant. The key is passed as a path parameter and the value is provided in the request body. If the key already exists, its value is overwritten. If it does not exist, it is created. Values are stored as strings but can represent dates (e.g. "06-15" or "2024-01-15") for use with ATTRIBUTE_DATE automations. This endpoint is idempotent — calling it multiple times with the same key and value produces the same result.
For usage patterns and examples, see the State Management guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Participant ID

key
string
required

Attribute key to set

Body

application/json

Attribute value

value
string
required

Attribute value

Minimum string length: 1
Example:

"gold"

Response

Attribute set

key
string

Attribute key

Example:

"tier"

value
string

Attribute value

Example:

"gold"