Skip to content

Verify Code

POST /v1/campaigns/codes/verify

Validates a campaign code without redeeming it. Returns the code’s status, associated campaign, point value, and whether it can be redeemed. This is useful for pre-validating codes in your UI before committing to redemption.

HeaderRequiredValue
X-API-SecretYesYour secret key
Content-TypeYesapplication/json
FieldTypeRequiredDescription
codestringYesThe code to verify (e.g., SUMM-AX7K9M2P)
Terminal window
curl -X POST https://api.gamifyhost.com/v1/campaigns/codes/verify \
-H "X-API-Secret: sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{ "code": "SUMM-AX7K9M2P" }'

Status: 200 OK

{
"status": "success",
"data": {
"valid": true,
"status": "ACTIVE",
"pointsValue": 500,
"campaignName": "Summer Promo 2025",
"campaignSlug": "summer-promo",
"expired": false,
"message": "Code is valid and redeemable"
}
}
{
"status": "success",
"data": {
"valid": false,
"status": "REDEEMED",
"pointsValue": 500,
"campaignName": "Summer Promo 2025",
"campaignSlug": "summer-promo",
"expired": false,
"message": "Code status is REDEEMED"
}
}
FieldTypeDescription
validbooleanWhether the code can be redeemed right now
statusstringCode status: ACTIVE, REDEEMED, EXPIRED, or REVOKED
pointsValueintegerPoints the code is worth (0 if not found)
campaignNamestringCampaign name (empty if not found)
campaignSlugstringCampaign slug (empty if not found)
expiredbooleanWhether the campaign has ended
messagestringHuman-readable explanation
MessageMeaning
Code is valid and redeemableReady to redeem
Code not foundCode doesn’t exist or belongs to another partner
Code status is REDEEMEDAlready redeemed
Code status is EXPIREDCode has expired
Code status is REVOKEDCode was revoked by partner
Campaign is not activeCampaign is paused or ended
Campaign has endedCampaign end date has passed