Delete Sweepstakes

Delete a single sweepstakes by providing the SweepstakesToken. This endpoint permanently removes the sweepstakes from the database.

POST sweepstakes/delete

Description

This endpoint allows you to delete a sweepstakes and all its related data by providing the SweepstakesToken. The sweepstakes must belong to the authenticated user.

What gets deleted: Sweepstakes record, participants, entry pages, statistics, groups, rules, calendar events, short links, coupons, automations, and all related data.

Note: This action is permanent and cannot be undone.

Request Body

{ "SweepstakesToken": "uuid-v4-string" }

Parameters:

Code Examples

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

Response

200 OK

{ "Response": true, "Message": "Sweepstakes Deleted Successfully" }
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 Parameter: SweepstakesToken", "Code": 400 }

404 Not Found

{ "Response": false, "Message": "Sweepstakes Not Found", "Code": 404 }