Skip to main content
PUT
/
v1
/
groups
/
{id}
/
state
/
attributes
/
{key}
Set a group attribute
curl --request PUT \
  --url https://api.scrip.dev/v1/groups/{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 group by key. If the key already exists, its value is overwritten. If the key does not exist, it is created. The key is specified in the URL path. The request body contains the value to set. This endpoint is useful when you want to update exactly one attribute without sending the full attribute map.
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

Group ID

key
string
required

Attribute key

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"