Clone Sweepstakes
POST
https://api-v3.sweeppea.com/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.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
Handler |
String | Yes | The handler of the original sweepstakes to clone |
HandlerNew |
String | Yes | Unique handler for the new cloned sweepstakes (max 20 chars, alphanumeric only) |
SweepstakesName |
String | Yes | Name for the new cloned sweepstakes |
StartDate |
String | Yes | Start date for the clone in YYYY-MM-DD format |
EndDate |
String | Yes | End date for the clone in YYYY-MM-DD format (cannot be before StartDate) |
StartTime |
String | Yes | Start time for the clone in HH:MM format (24-hour) |
EndTime |
String | Yes | End time for the clone in HH:MM format (24-hour) |
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"
}'
const response = await fetch('https://api-v3.sweeppea.com/sweepstakes/clone', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'Handler': 'ORIGINALHANDLER',
'HandlerNew': 'NEWHANDLER',
'SweepstakesName': 'New Sweepstakes Name',
'StartDate': '2025-12-01',
'EndDate': '2025-12-31',
'StartTime': '09:00',
'EndTime': '23:59'
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://api-v3.sweeppea.com/sweepstakes/clone"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"Handler": "ORIGINALHANDLER",
"HandlerNew": "NEWHANDLER",
"SweepstakesName": "New Sweepstakes Name",
"StartDate": "2025-12-01",
"EndDate": "2025-12-31",
"StartTime": "09:00",
"EndTime": "23:59"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Response
{
"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
{
"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
}
403 Forbidden — plan cap reached. A clone consumes a sweepstakes slot exactly like a creation, and the count includes archived sweepstakes (see MaxSweepstakesAllowed in Plan Details).
{
"Response": false,
"Message": "Sweepstakes Limit Reached. Your plan allows 10 sweepstakes and you currently have 10. Please upgrade your plan to create more sweepstakes",
"Code": 403
}
{
"Response": false,
"Message": "Missing required parameters or validation errors",
"Help": {
"ExpectedBody": {
"Handler": "string (required) \u2014 handler of the sweepstakes being cloned",
"HandlerNew": "string (required) \u2014 handler for the new sweepstakes. Alphanumeric plus underscores, max 25 characters, and must not already be taken",
"SweepstakesName": "string (required) \u2014 name of the new sweepstakes, max 80 characters",
"StartDate": "string (required) \u2014 start date, YYYY-MM-DD",
"EndDate": "string (required) \u2014 end date, YYYY-MM-DD. Must be after StartDate",
"StartTime": "string (required) \u2014 start time, HH:MM (24-hour)",
"EndTime": "string (required) \u2014 end time, HH:MM (24-hour)"
}
},
"Code": 400
}
{
"Response": false,
"Message": "User or original sweepstakes not found",
"Code": 404
}
{
"Response": false,
"Message": "New handler already exists",
"Code": 409
}