Sweeppea API v3

Pause Sweepstakes

Pause a sweepstakes by providing the SweepstakesToken. This endpoint sets the sweepstakes status to inactive without deleting any data.

POST https://api-v3.sweeppea.com/sweepstakes/pause

Description

This endpoint allows you to pause a sweepstakes. The sweepstakes must belong to the authenticated user.

Request Body

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

Parameters:

  • SweepstakesToken (string, required): The unique identifier of the sweepstakes to pause

Code Examples

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

Response

{
  "Response": true,
  "Message": "Sweepstakes Paused Successfully"
}

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
}
{
  "Response": false,
  "Message": "Missing Required Parameter: SweepstakesToken",
  "Help": {
    "ExpectedBody": {
      "SweepstakesToken": "string (required) \u2014 UUID v4 of the sweepstakes"
    }
  },
  "Code": 400
}
{
  "Response": false,
  "Message": "Sweepstakes Not Found",
  "Code": 404
}
© Sweeppea. All rights reserved.