curl --request PATCH \
--url https://api.snappy.com/public-api/v2/campaigns/{campaignId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "New campaign name",
"status": "active",
"customization": {
"giftProperties": [
{
"budget": {
"max": 100,
"min": 76
},
"expiration": {
"type": "daysFromSend",
"numberOfDays": 30
},
"guaranteedGift": {
"type": "daysFromSend",
"numberOfDays": 30
},
"selectedGiftType": "collection",
"collection": {
"id": "12345678",
"featuredProducts": [
"12345678"
]
}
}
],
"notificationPolicy": {
"sendingChannels": [
"mail"
],
"disableReminders": true
},
"recipientExperience": {
"type": "enterAddress",
"visualElements": {
"reveal": {
"type": "snowGlobe",
"primaryColor": "#000000",
"secondaryColor": "#000000",
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
],
"logo": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
},
"greeting": {
"content": {
"ops": [
{
"attributes": {
"font": "pacifico"
},
"insert": "Happy Birthday!"
}
]
},
"banner": {
"text": "Happy Birthday!",
"color": "#000000",
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
],
"logo": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
}
}
},
"postClaim": {
"redirectAfterClaim": "https://example.com/redirect"
}
}
}
}
'{
"id": "abcd1234",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"name": "Campaign Name",
"accountId": "a12bcd34",
"companyId": "A1b2C3d4",
"status": "draft",
"source": "api_native",
"account": {
"id": "a12bcd34",
"name": "Account Name"
},
"type": "oneOffs",
"giftsExpirationInDays": 30,
"giftExpirationDate": "<string>",
"properties": [
{
"budget": 100,
"collection": {
"id": "abcdef12",
"name": "Collection Name",
"defaultCountry": "US"
}
}
],
"customization": {
"giftProperties": [
{
"selectedGiftType": "collection",
"budget": {
"max": 100,
"min": 76
},
"expiration": {
"type": "daysFromSend",
"numberOfDays": 30
},
"guaranteedGift": {
"type": "daysFromSend",
"numberOfDays": 30
},
"collection": {
"id": "12345678",
"featuredProducts": [
"12345678"
]
},
"product": {
"id": "12345678",
"displayType": "displayAsSurprise"
}
}
],
"notificationPolicy": {
"sendingChannels": [
"mail"
],
"disableReminders": true
},
"recipientExperience": {
"type": "enterAddress",
"visualElements": {
"reveal": {
"type": "snowGlobe",
"primaryColor": "#000000",
"secondaryColor": "#000000"
},
"greeting": {
"content": {
"ops": [
{
"insert": "Happy Birthday!"
}
]
},
"banner": {
"text": "Happy Birthday!",
"color": "#000000",
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
}
},
"postClaim": {
"redirectAfterClaim": "https://example.com/redirect"
}
}
}
}
}Use this API to update an existing campaign’s configuration, including name, status, and customization settings.
campaigns:updatecurl --request PATCH \
--url https://api.snappy.com/public-api/v2/campaigns/{campaignId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "New campaign name",
"status": "active",
"customization": {
"giftProperties": [
{
"budget": {
"max": 100,
"min": 76
},
"expiration": {
"type": "daysFromSend",
"numberOfDays": 30
},
"guaranteedGift": {
"type": "daysFromSend",
"numberOfDays": 30
},
"selectedGiftType": "collection",
"collection": {
"id": "12345678",
"featuredProducts": [
"12345678"
]
}
}
],
"notificationPolicy": {
"sendingChannels": [
"mail"
],
"disableReminders": true
},
"recipientExperience": {
"type": "enterAddress",
"visualElements": {
"reveal": {
"type": "snowGlobe",
"primaryColor": "#000000",
"secondaryColor": "#000000",
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
],
"logo": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
},
"greeting": {
"content": {
"ops": [
{
"attributes": {
"font": "pacifico"
},
"insert": "Happy Birthday!"
}
]
},
"banner": {
"text": "Happy Birthday!",
"color": "#000000",
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
],
"logo": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
}
}
},
"postClaim": {
"redirectAfterClaim": "https://example.com/redirect"
}
}
}
}
'{
"id": "abcd1234",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"name": "Campaign Name",
"accountId": "a12bcd34",
"companyId": "A1b2C3d4",
"status": "draft",
"source": "api_native",
"account": {
"id": "a12bcd34",
"name": "Account Name"
},
"type": "oneOffs",
"giftsExpirationInDays": 30,
"giftExpirationDate": "<string>",
"properties": [
{
"budget": 100,
"collection": {
"id": "abcdef12",
"name": "Collection Name",
"defaultCountry": "US"
}
}
],
"customization": {
"giftProperties": [
{
"selectedGiftType": "collection",
"budget": {
"max": 100,
"min": 76
},
"expiration": {
"type": "daysFromSend",
"numberOfDays": 30
},
"guaranteedGift": {
"type": "daysFromSend",
"numberOfDays": 30
},
"collection": {
"id": "12345678",
"featuredProducts": [
"12345678"
]
},
"product": {
"id": "12345678",
"displayType": "displayAsSurprise"
}
}
],
"notificationPolicy": {
"sendingChannels": [
"mail"
],
"disableReminders": true
},
"recipientExperience": {
"type": "enterAddress",
"visualElements": {
"reveal": {
"type": "snowGlobe",
"primaryColor": "#000000",
"secondaryColor": "#000000"
},
"greeting": {
"content": {
"ops": [
{
"insert": "Happy Birthday!"
}
]
},
"banner": {
"text": "Happy Birthday!",
"color": "#000000",
"mediaItems": {
"background": [
{
"type": "image",
"url": "https://example.com/image.jpg"
}
]
}
}
},
"postClaim": {
"redirectAfterClaim": "https://example.com/redirect"
}
}
}
}
}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"
Campaign ID
^[A-Za-z0-9]{8,}$"abcd1234"
Company ID
^[A-Za-z0-9]{8,}$"12345678"
Request body for updating a campaign.
The name of the campaign.
"New campaign name"
The status of the campaign.
active, paused, archived "active"
Configuration options for customizing the campaign. The entire customization object must be provided when updating.
Show child attributes
Campaign updated
Campaign details including configuration and customization.
The id of the campaign.
"abcd1234"
The date when the campaign was created.
"2021-01-01T00:00:00.000Z"
The date when the campaign was last updated.
"2021-01-01T00:00:00.000Z"
The name of the campaign.
"Campaign Name"
The id of the account.
"a12bcd34"
The id of the company.
"A1b2C3d4"
The status of the campaign.
live, sent, draft, paused, pending, scheduled, archived, active "draft"
The source of the campaign.
dashboard, dashboard_ai, api_native, api_zapier, api_make, api_salesforce, api_ftp "api_native"
The account of the campaign.
Show child attributes
The type of the campaign. valid values are: anniversary, birthday, schedule, marketing, oneOffs, newHire.
anniversary, birthday, schedule, marketing, oneOffs, newHire "oneOffs"
The number of days until the gifts will expire. The default value is 30 days.
30
The date when the gift will expire. Date Format: YYYY-MM-DDThh:mm:ss.sZ.
The properties of the campaign.
Show child attributes
Campaign customization defines the entire gift recipient experience. It includes budget parameters, collection or product selection, expiration settings, notification methods, and visual presentation elements that create a cohesive branded experience.
Show child attributes
Was this page helpful?