Create campaign
Use this endpoint to create a new Campaign under an Account. When created via the API, the Campaign is automatically assigned the Account’s default Billing Method.
Required fields:
name- display name of the Campaign (must be unique within the Company)accountId- the Account this Campaign belongs tocustomization- Gift Customization configuration (giftProperties,notificationPolicy, optionallyrecipientExperience)
Optional parameters:
companyIdquery parameter - Company identifier, when not inferable from the API key contextRequest-Sourceheader - source of the request (api_native,api_zapier,api_salesforce,api_ftp,api_make)
Behavior Notes:
- Returns
201with the new Campaign on success. - Campaigns created via the API are always created with
type: oneOffs. Other Campaign types (anniversary,birthday,schedule,marketing,newHire) can only be created through the Snappy Dashboard. - Returns
409when a Campaign with the same name already exists in the Company. - Returns
422for business-rule violations (e.g. invalid Collection/Product reference, conflicting customization).
Permissions
- Requires:
campaigns:create
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"
Query Parameters
Company ID
^[A-Za-z0-9]{8,}$"12345678"
Body
Request body for creating a campaign.
The name of the campaign
"My Campaign"
The account ID this campaign belongs to
"a12bcd34"
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.
Response
Campaign created successfully
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.
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.
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.