curl --request POST \
--url https://api.snappy.com/public-api/v2/gifts \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"campaignId": "12345678",
"recipients": [
{
"firstname": "John",
"lastname": "Doe",
"externalId": "1234567890",
"phone": "+1234567890",
"email": "example@domain.com",
"key": "abc123"
}
],
"sendingMethod": "mail",
"customization": {
"recipientExperience": {
"type": "enterAddress",
"visualElements": {
"reveal": {
"type": "snowGlobe",
"primaryColor": "#000000",
"secondaryColor": "#000000",
"mediaItems": {
"logo": [
{
"type": "image",
"url": "https://example.com/media-item-1.jpg"
}
]
}
},
"greeting": {
"content": {
"ops": [
{
"attributes": {
"font": "pacifico",
"size": "32px",
"color": "#000000"
},
"insert": "Happy Birthday!"
}
]
},
"banner": {
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/media-item-1.jpg"
}
]
},
"text": "🎁 Enjoy your gift!",
"color": "#36d4ff"
}
},
"postClaim": {
"redirectAfterClaim": "https://example.com/redirect"
}
}
},
"giftProperties": {
"selectedGiftType": "product",
"product": {
"id": "productId",
"displayType": "displayAsSurprise"
},
"budget": {
"max": 100,
"min": 76
},
"expiration": {
"type": "daysFromSend",
"numberOfDays": 30
}
},
"notificationPolicy": {
"sendingChannels": [
"mail"
],
"disableReminders": true
}
},
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
'{
"message": "2 gifts out of 3 have been sent successfully",
"metadata": {
"campaignName": "Employee Appreciation Q1 2025",
"totalRecipients": 3,
"batchId": "batch_20250609_001"
},
"results": [
{
"success": true,
"link": "https://snappy.com/experience/K9mP3xL7dN",
"id": "G7nR4bD9mK",
"experienceId": "exp_2024_john_001"
},
{
"success": true,
"link": "https://snappy.com/experience/X2pQ8vB5jL",
"id": "H8sT6cF2nP",
"experienceId": "exp_2024_jane_002"
},
{
"success": false,
"message": "Gift creation failed",
"errorCode": 40000
}
]
}Use this endpoint to create one or more gifts within a Campaign and initiate the Triggered Gifting flow. Snappy will notify recipients based on the Campaign’s Notification Policy.
gifts:createcurl --request POST \
--url https://api.snappy.com/public-api/v2/gifts \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"campaignId": "12345678",
"recipients": [
{
"firstname": "John",
"lastname": "Doe",
"externalId": "1234567890",
"phone": "+1234567890",
"email": "example@domain.com",
"key": "abc123"
}
],
"sendingMethod": "mail",
"customization": {
"recipientExperience": {
"type": "enterAddress",
"visualElements": {
"reveal": {
"type": "snowGlobe",
"primaryColor": "#000000",
"secondaryColor": "#000000",
"mediaItems": {
"logo": [
{
"type": "image",
"url": "https://example.com/media-item-1.jpg"
}
]
}
},
"greeting": {
"content": {
"ops": [
{
"attributes": {
"font": "pacifico",
"size": "32px",
"color": "#000000"
},
"insert": "Happy Birthday!"
}
]
},
"banner": {
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/media-item-1.jpg"
}
]
},
"text": "🎁 Enjoy your gift!",
"color": "#36d4ff"
}
},
"postClaim": {
"redirectAfterClaim": "https://example.com/redirect"
}
}
},
"giftProperties": {
"selectedGiftType": "product",
"product": {
"id": "productId",
"displayType": "displayAsSurprise"
},
"budget": {
"max": 100,
"min": 76
},
"expiration": {
"type": "daysFromSend",
"numberOfDays": 30
}
},
"notificationPolicy": {
"sendingChannels": [
"mail"
],
"disableReminders": true
}
},
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
'{
"message": "2 gifts out of 3 have been sent successfully",
"metadata": {
"campaignName": "Employee Appreciation Q1 2025",
"totalRecipients": 3,
"batchId": "batch_20250609_001"
},
"results": [
{
"success": true,
"link": "https://snappy.com/experience/K9mP3xL7dN",
"id": "G7nR4bD9mK",
"experienceId": "exp_2024_john_001"
},
{
"success": true,
"link": "https://snappy.com/experience/X2pQ8vB5jL",
"id": "H8sT6cF2nP",
"experienceId": "exp_2024_jane_002"
},
{
"success": false,
"message": "Gift creation failed",
"errorCode": 40000
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.snappy.com/llms.txt
Use this file to discover all available pages before exploring further.
Company level authentication provides access to all resources under your company, including accounts, campaigns, gifts, and recipients.
POST /v2/authentication/apiKeys endpoint to generate a new API keyInclude your API key in the X-Api-Key header for every request:
X-Api-Key: YOUR_24_CHARACTER_API_KEYFor production environments, enable mutual TLS authentication:
enforceMtls: true when creating the API keyhttps://mtls-api.snappy.com/public-apiSource of the request
api_native, api_zapier, api_salesforce, api_ftp, api_make "api_native"
Company ID
^[A-Za-z0-9]{8,}$"12345678"
The gift object.
Campaign ID
^[A-Za-z0-9]{8,}$"12345678"
The recipients of the gift.
Show child attributes
Deprecated. Use "customization.notificationPolicy.sendingChannels" instead.
mail, sms, mailAndSms, link "mail"
Customization configuration of the gift.
Show child attributes
Optional metadata object with key-value pairs. Keys must be alphanumeric (including underscores) and up to 40 characters. Values must be alphanumeric and up to 500 characters. Maximum 50 key-value pairs allowed.
Show child attributes
{ "key1": "value1", "key2": "value2" }Ok
The response of the gift creation
The message of the response
Optional metadata object with key-value pairs. Keys must be alphanumeric (including underscores) and up to 40 characters. Values must be alphanumeric and up to 500 characters. Maximum 50 key-value pairs allowed.
Show child attributes
{ "key1": "value1", "key2": "value2" }Show child attributes
Was this page helpful?