Clone Sweepstakes
Clone Sweepstakes API endpoint for Sweeppea. POST sweepstakes/clone. Complete documentation with code examples in cURL, JavaScript, and Python.
POST
sweepstakes/clone
Description
This endpoint allows you to clone an existing sweepstakes with new parameters. Creates a complete copy including entry pages, calendar events, short links, groups, and all configurations. The cloned sweepstakes will have new tokens and the specified dates/times while preserving all settings from the original.
Code Examples
curl -X POST "https://api-v3.sweeppea.com/sweepstakes/clone" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Handler": "ORIGINALHANDLER",
"HandlerNew": "NEWHANDLER",
"SweepstakesName": "New Sweepstakes Name",
"StartDate": "2025-12-01",
"EndDate": "2025-12-31",
"StartTime": "09:00",
"EndTime": "23:59"
}'
Response
200 OK
{
"Response": true,
"SweepstakesToken": "uuid-v4-string",
"SweepstakesType": 2,
"SweepstakesName": "New Sweepstakes Name",
"Handler": "NEWHANDLER",
"StartDate": "2025-12-01",
"StartTime": "09:00",
"EndDate": "2025-12-31",
"EndTime": "23:59",
"Status": "active",
"Message": "Sweepstakes successfully cloned."
}
Error Responses
401 Unauthorized
{
"Response": false,
"Message": "Invalid or Missing Bearer Token",
"Code": 401
}
403 Forbidden
{
"Response": false,
"Message": "Invalid API Token",
"Code": 403
}
400 Bad Request
{
"Response": false,
"Message": "Missing required parameters or validation errors",
"Code": 400
}
404 Not Found
{
"Response": false,
"Message": "User or original sweepstakes not found",
"Code": 404
}
409 Conflict
{
"Response": false,
"Message": "New handler already exists",
"Code": 409
}