Sweeppea API v3

Fetch Groups

Retrieve all groups for a specific sweepstakes. Groups allow you to organize and segment participants within your sweepstakes.

POST https://api-v3.sweeppea.com/groups/fetch

Description

This endpoint allows you to fetch all groups for a specific sweepstakes. The groups will be returned in descending order by creation date. Use this to manage your participants & groups data programmatically through the Sweeppea API.

Request Parameters

Parameter Casing: All request parameters are PascalCase. For backward compatibility, camelCase equivalents (e.g. sweepstakesToken) are also accepted.

Parameter Type Required Description
SweepstakesToken String (UUID v4) Required The UUID token of the sweepstakes to fetch groups from

Code Examples

curl -X POST "https://api-v3.sweeppea.com/groups/fetch" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "SweepstakesToken": "uuid-v4-string"
  }'

Response

{
  "Response": true,
  "Data": [
    {
      "GroupToken": "uuid-v4-string",
      "UserToken": "uuid-v4-string",
      "SweepstakesToken": "uuid-v4-string",
      "GroupName": "VIP Members",
      "Primary": false,
      "Locked": false,
      "CreationDate": "2026-01-15T13:16:43.576Z"
    },
    {
      "GroupToken": "uuid-v4-string",
      "UserToken": "uuid-v4-string",
      "SweepstakesToken": "uuid-v4-string",
      "GroupName": "Premium Users",
      "Primary": false,
      "Locked": false,
      "CreationDate": "2026-01-15T13:19:46.133Z"
    }
  ],
  "Count": 2
}

Error Responses

{
  "Response": false,
  "Message": "Missing required parameter: SweepstakesToken",
  "Help": {
    "ExpectedBody": {
      "SweepstakesToken": "string (required) \u2014 UUID v4 of the sweepstakes (sweepstakesToken is also accepted)"
    }
  }
}
{
  "Response": false,
  "Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
  "Code": 401
}
{
  "Response": false,
  "Message": "Invalid API token. It does not match any account.",
  "Code": 403
}
{
  "Response": false,
  "Message": "Sweepstakes not found or does not belong to user"
}
© Sweeppea. All rights reserved.