Get estimated cost for campaign
Use this endpoint to retrieve the projected cost of a Campaign based on its configured budget and a target number of gifts. Use this before launching a Campaign to verify available funds and confirm the expected spend.
Required fields:
campaignId- the Campaign identifier, passed as a path parameter
Optional parameters:
numberOfGiftsquery parameter - the number of gifts to estimate for (1-99,999, default1)companyIdquery parameter - Company ID (when not inferable from the calling key)Request-Sourceheader - source of the request
Please note:
- The response includes the configured
budget, plusestimatedFee,estimatedTax, andestimatedTotalCostper gift. Multiply bynumberOfGiftsto project the total Campaign spend. - Estimates use the Campaign’s default shipping country and current pricing. Actual cost per gift may vary slightly based on the recipient’s country and the variant they select.
Permissions
- Requires:
campaigns:read
Authorizations
Company Level Authentication
Company level authentication provides access to all resources under your company, including accounts, campaigns, gifts, and recipients.
Getting Your API Key
- Create an API Key: Use the
POST /v2/authentication/apiKeysendpoint to generate a new API key - Set Expiration: Choose from 30, 60, 90, or 180 days (default: 90 days)
- Optional mTLS: Enable mutual TLS for enhanced security
- Name Your Key: Provide a descriptive name for easy identification
Using Your API Key
Include your API key in the X-Api-Key header for every request:
X-Api-Key: YOUR_24_CHARACTER_API_KEYAPI Key Management
- Maximum Keys: Up to 3 active API keys per company
- Rotation: Delete old keys before creating new ones when at the limit
- Security: Keys are hashed and cannot be retrieved after creation
Enhanced Security (mTLS)
For production environments, enable mutual TLS authentication:
- Set
enforceMtls: truewhen creating the API key - Contact support to obtain your client certificates
- Use the mTLS endpoint:
https://mtls-api.snappy.com/public-api
Headers
Source of the request
api_native, api_zapier, api_salesforce, api_ftp, api_make "api_native"
Path Parameters
Campaign ID
^[A-Za-z0-9]{8,}$"abcd1234"
Query Parameters
Company ID
^[A-Za-z0-9]{8,}$"12345678"
Number of gifts
1 <= x <= 999991
Response
Ok
Campaign estimated cost response.
The campaign ID.
"abcd1234"
The total number of gifts.
3
The estimated cost of the gift including estimated tax and fee.
{
"budget": 100,
"estimatedFee": 2,
"estimatedTax": 7,
"estimatedTotalCost": 109
}