v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Templates

Create Campaign Template

Creates a template for a discount or gift campaign, or a promotion tier.

A template stores campaign configuration without the following details:

  • Campaign name
  • Category
  • Code count

The following elements are not supported by campaign templates:

  • Redeeming API keys
  • Redeeming users
  • Customer loyalty tier
  • Static segments

👍 Promotion Tiers and Campaign Templates

You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create:

  • Discount campaign,
  • Promotion tier.

📘 Campaign Templates – Documentation

Read the Campaign Templates documentation to learn more about this feature.

post/v1/templates/campaigns

Request body

campaign_idstring nullable

Unique identifier of the campaign that will create a template. It must be an ID of an existing discount or gift card campaign. It cannot be passed when promotion_tier_id has value. Required when the promotion_tier_id is not passed or it is null.

promotion_tier_idstring nullable

Unique identifier of the promotion tier that will create a template. It cannot be passed when campaign_id has value. Required when the campaign_id is not passed or it is null.

namestring required

User-defined name of the campaign template. It must be unique.

descriptionstring nullable

User-defined description of the campaign template.

Response

Returns the details of a created campaign template.

idstring required

Unique identifier of the campaign template. It is assigned by Voucherify.

namestring required

User-defined name of the campaign template.

descriptionstring

User-defined description of the campaign template.

campaign_type'DISCOUNT_COUPONS' | 'GIFT_VOUCHERS' required

Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to DISCOUNT_COUPONS.

created_atstring date-time required

Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.

object'campaign_template' required

The type of the object represented by JSON.

Example response

{
  "id": "camp_tpl_eR9NsNJ5gqJRN2TG3fqCvbVl",
  "created_at": "2024-07-16T09:05:53.175Z"
}