Prerequisites
- API key with
gifts:createscope - At least one Campaign configured in the Snappy Dashboard
- The
campaignIdfor the campaign you’re sending under
Create gifts
recipients array — each entry creates one gift for one recipient.
The V2 gifting API uses lowercase field names for recipient names:
firstname and lastname (not camelCase). This differs from the V3 orders API which uses firstName / lastName.JavaScript
Python
Chunking for large lists
The V2 gifts endpoint has a maximum recipients per request. For large sends, split into chunks of 100 and send sequentially (or with bounded concurrency):JavaScript
Python
Idempotency
Each recipient entry accepts akey field — a stable, permanent identifier for that recipient in the context of this send. Snappy uses this to deduplicate: sending the same key twice does not create a second gift.
Derive key from stable identifiers, not from random values or timestamps:
JavaScript
{campaignId}-{userId} or {campaignId}-{employeeId}.
Partial failure handling
The API may succeed for some recipients and fail for others in the same request. The response includes per-recipient status:
Always inspect
errors in the response and re-run the failed recipients rather than the full list. Since each recipient has a key, re-running is safe — duplicates are silently ignored.
JavaScript
Related
- Auto-claim Gifts as Fallback — what to do when a recipient doesn’t claim their gift
- Track Order Fulfillment — subscribe to webhooks once the gift is claimed