Perkadoo
API

Customer API and Zapier

Connect Zapier with Sign in with Perkadoo, or use an API key, to count member actions, look up streaks and subscribe to milestone and at-risk events.

Use the customer API from any automation platform or backend that can send an Authorization header. It also powers the private Zapier connector preview.

Connect Zapier

For setup without a native app invite, use Webhooks by Zapier with your incoming URL.

The native Perkadoo connector is a private preview. The instructions and trigger list below require an invitation to that connector; searching the public app directory is not the setup path. If you have an invite, add a Perkadoo step and choose Sign in. Sign in to Perkadoo, check what Zapier will be able to do, and choose Allow. There's no key to copy.

Zapier can reach every project you can. To cut it off, open the Setup page and choose Disconnect next to Zapier under Connected apps. That stops its access straight away and removes every zap subscription it made.

Use an API key

For Make, n8n or your own code, open Use an API key instead on the Setup page and choose Create API key. The key starts with sfx_api_, and Perkadoo shows it once.

A key can reach every program in the workspace it was created in. It never expires. Use Manage API keys → Disconnect to revoke it; this also removes every subscription created with it. Perkadoo stores only a hash of the key.

Private Zapier connector preview

TypeNameWhat it does
TriggerMilestone AchievedA member reaches a milestone, like 7 or 30 days.
TriggerReward UnlockedA member earns a milestone that has a reward attached.
TriggerStreak At RiskA new day starts and the member hasn't kept their streak alive yet.
TriggerStreak BrokenThe member missed a full day and the streak ended.
ActionRecord Member ActionCounts an action toward the member's streak.
SearchFind Member StreakLooks up a member's current and best streak.

Triggers are instant. Perkadoo sends milestone and reward events as soon as the action is processed. At-risk and broken checks run hourly. Triggers follow the same rules as follow-up webhooks: they only fire for live programs, and never for members in a Proof control group.

Adding or removing a zap trigger changes what members experience. Like any follow-up change, it ends a running Proof experiment for that program.

REST endpoints

All endpoints live under https://api.perkadoo.com/v1/api and need Authorization: Bearer <token>, using an API key (sfx_api_...) or an OAuth access token (sfx_oat_...).

MethodPathPurpose
GET/meThe account the key belongs to.
GET/programsPrograms the key can reach, with id, name, eventKey, status and project.
POST/programs/{programId}/eventsCount a member action.
GET/programs/{programId}/members/{userHash}A member's streak.
POST/hooksSubscribe a URL to webhook events.
DELETE/hooks/{subscriptionId}Remove a subscription.
GET/programs/{programId}/webhook-samples?type=Recent payloads for one event type, or a sample.

Count an action

curl -X POST https://api.perkadoo.com/v1/api/programs/$PROGRAM_ID/events \
  -H "Authorization: Bearer $PERKADOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"userHash": "member_123", "idempotencyKey": "lesson-completion-987"}'
FieldRequiredDescription
userHash✅Stable member ID. Hash emails before sending them.
idempotencyKey❌Retries with the same key count once.
ts❌ISO 8601 time of the action. Defaults to now.
meta❌Up to 4 KB of details.
externalService, integrationId❌Source labels for Insights.
test❌true counts the action as test progress.

Returns 202 with counted: true. If the program is in test mode and test is not set, it returns counted: false with reason: "PROGRAM_NOT_LIVE".

Subscribe to events

curl -X POST https://api.perkadoo.com/v1/api/hooks \
  -H "Authorization: Bearer $PERKADOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"programId": "'$PROGRAM_ID'", "url": "https://example.com/perkadoo", "eventTypes": ["streak.at_risk"]}'

The URL must use HTTPS. The response includes a secret; deliveries are signed with it exactly like follow-up webhooks. If your receiver answers 410 Gone, Perkadoo removes the subscription.

Outbound webhook headers

Perkadoo sends an HTTPS POST with a JSON body to your receiver. These headers apply to both API subscriptions and dashboard follow-up webhooks. They are separate from the inbound X-Streak-Webhook-Secret used to count member actions. HTTP header names are case-insensitive.

HeaderMeaning
Content-Typeapplication/json.
User-AgentPerkadoo-Webhooks/1.0.
X-Perkadoo-DeliveryDelivery ID. Stable across retries of this delivery; use it as a unique key in your receiver's delivery ledger.
X-Perkadoo-EventEvent type, such as reward.unlocked or streak.at_risk. Dashboard connection tests use webhook.test.
X-Perkadoo-TimestampUnix time in seconds for this sending attempt. A retry gets a freshly generated timestamp.
X-Perkadoo-Signaturev1= followed by the hexadecimal HMAC-SHA256 of timestamp.rawBody, signed with the outbound signing secret.

Verify before processing

Keep the signing secret from the subscription response in private configuration. For dashboard follow-ups, use the signing secret shown in the dashboard.

  1. Read the exact raw request body and the timestamp/signature headers. Reject missing or malformed headers before processing any event.
  2. Reject timestamps more than five minutes ahead of or behind your clock.
  3. Compute HMAC-SHA256 over the timestamp, a literal period, and the raw body. Prefix the hexadecimal digest with v1= and compare it with the signature using a constant-time comparison. Do not parse and re-serialize JSON first.
  4. After verification, parse the body and validate its expected event and subject before using it. Store the delivery ID durably and handle retries idempotently.

See the Node signature verification example. The signature covers the timestamp and body, not the delivery/event headers; header values alone are not authentication. Keep both sides' signing secrets in sync when rotating them.

Coupon fulfillment

For coupon rewards, reward.value is the member's own code and reward.codeStatus is issued or awaiting_code. When a code pool runs out, the reward arrives with value: null and awaiting_code; don't treat it as fulfilled or substitute a shared code. Add codes in Perks to fill waiting grants, then read the grant history for the codes they got. Adding codes does not resend a webhook that was already delivered. Link and message perks send codeStatus: none, and a milestone with no perk sends codeStatus: null.

Acknowledgments, retries and duplicate effects

Return a 2xx response once you have durably accepted the delivery. A successful response means your receiver accepted the event, not that a message reached a member or a reward was redeemed. A duplicate already accepted by your receiver should also receive a 2xx response without repeating the side effect.

The default request timeout is 10 seconds. Network errors, timeouts and non-2xx responses are retried up to three total attempts, with a one-minute delay after the first failure and a two-minute delay after the second. These are scheduled delays; worker scheduling can make actual delivery later. For an API subscription, 410 Gone removes the subscription and stops that delivery instead of retrying. Do not use 410 for a temporary receiver outage.

An interrupted response can cause a retry even if your receiver already acted. Use a unique delivery ledger and make downstream actions idempotent as well; where possible, commit the ledger and queued work in one transaction. The signing timestamp changes between attempts, so it is not a deduplication key.

Before a real member delivery, Perkadoo rechecks that the program and follow-up are enabled, the subscription remains authorized, and the member is eligible under Proof. A queued delivery can be suppressed when those conditions change. Treat webhook.test as a connection check: never send a real member message or issue a reward for it.