Update Group
Update the name of an existing group for a sweepstakes. The new name must be unique within the sweepstakes.
POST
groups/update
Description
This endpoint allows you to update the name of an existing group. The group is identified by its GroupToken and must belong to the specified sweepstakes. The new name must be unique within the sweepstakes.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sweepstakesToken |
String (UUID v4) | Required | The UUID token of the sweepstakes |
groupToken |
String (UUID v4) | Required | The UUID token of the group to update |
groupName |
String | Required | The new name for the group (must be unique within the sweepstakes) |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/groups/update" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sweepstakesToken": "uuid-v4-string",
"groupToken": "uuid-v4-string",
"groupName": "Updated Group Name"
}'
Response
200 OK
{
"Response": true,
"Data": {
"GroupToken": "uuid-v4-string",
"GroupName": "Updated Group Name",
"SweepstakesToken": "uuid-v4-string",
"Primary": false,
"Locked": false,
"CreationDate": "2026-01-15T13:16:43.576Z"
},
"Message": "Group updated successfully"
}
Error Responses
400 Bad Request
{
"Response": false,
"Message": "Group name already exists for this sweepstakes"
}
404 Not Found
{
"Response": false,
"Message": "Group not found"
}