unPLUGDevelopers

Management API · Challenges

Preview a challenge Coming soon

POST/v1/challenges/{id}/preview

A dry run with no side effects. It estimates the audience, how many members will complete the challenge based on their past orders, and what the rewards will cost. Warnings flag a goal that looks too easy (more than about 80% expected to complete) or too hard (under about 10%).

expected_points is the bonus points to be paid. expected_cost_cents is the discount value of catalog rewards to be paid. Weekly regular pays points only: 640 completions times 50 Beans.

Permissions: Secret key with challenges:write.

Request headers#

  • Idempotency-Keystring
    Any string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response with Idempotent-Replayed: true.
    Max Length 255

Path parameters#

  • idstring (uuid)Required

Response fields#

Returns 200 with ChallengePreview

  • audience_membersinteger
  • expected_completionsinteger
  • expected_pointsinteger
  • expected_cost_centsinteger
  • warningsarray of string

Error descriptions#

404Not found
not_found

No such challenge.

Any endpoint can also return the common errors.