Groups
Update a group
Rename a group, archive or restore it, or change its tags, attributes and counters. Scrip applies every change together or none of them, and returns the group with its updated state.
patch/v1/groups/{group_id}
Request
- Base URL: https://api.scrip.dev
- URL: https://api.scrip.dev/v1/groups/{group_id}
- Auth: HTTP bearer
Path parameters
group_idstring uuid required
The group's id.
Headers
Idempotency-Keystring
A key you choose to make this request safe to retry: 1 to 255 printable ASCII characters. Send the same key with the same request to get the first response again, marked Idempotent-Replayed: true. Routes that return a secret once, and claim links, do not replay a response. Event ingest uses the key as the event's identity.
Request body
Example request
{
"attributes": {
"legacy_segment": null,
"plan": "premium"
},
"counters": {
"points_cycle": {
"set": "0"
},
"purchases": {
"increment": "1"
},
"trial_days": null
},
"name": "Updated Team Name",
"status": "ARCHIVED",
"tags": [
"enterprise"
]
}Response
Updated group
Example response
{
"attributes": {
"plan": "premium",
"region": "us-east"
},
"counters": {
"points_earned": "1500",
"purchases": "42"
},
"created_at": "2027-01-15T10:30:00Z",
"deleted_at": "2027-01-15T10:30:00Z",
"id": "0b9e7d3c-5a41-4f68-a2c7-81e4d6b3f907",
"name": "Sales Team",
"status": "ACTIVE",
"tags": [
"enterprise"
],
"updated_at": "2027-01-15T10:30:00Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.