Skip to main content
POST
/
management
/
v1
/
projects
/
{projectId}
/
templates
/
campaigns
/
{campaignTemplateId}
/
copy
Copy Campaign Template to a Project
curl --request POST \
  --url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Id: <api-key>' \
  --header 'X-Management-Token: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "destination_project_id": "<string>"
}'
{
  "id": "camp_tpl_0f7e3ac98f04d00ab9",
  "name": "Item_Discount_Campaign_Template",
  "description": "To be reused in the future",
  "campaign_type": "DISCOUNT_COUPONS",
  "created_at": "2024-10-09T15:52:45.414Z",
  "object": "campaign_template"
}

Authorizations

X-Management-Id
string
header
required
X-Management-Token
string
header
required

Path Parameters

projectId
string
required

Provide the unique identifier of the project.

Example:

"proj_TrlkLiH4"

campaignTemplateId
string
required

Provide the unique identifier of the campaign template.

Example:

"camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq"

Body

application/json

Determines the details about the template in the destination project as well as the destination project itself.

Response body schema for POST /management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy. Request body for updating a campaign template.

name
string
required

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

destination_project_id
string
required

Unique identifier of the project to which the campaign template will be copied.

description
string | null

User-defined description of the campaign template.

Response

Returns the details about the copied campaign template.

Response body schema for POST /management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy. Stores details about a campaign template.

id
string
required

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

Example:

"camp_tpl_eR9NsNJ5gqJRN2TG3fqCvbVl"

name
string
required

User-defined name of the campaign template.

campaign_type
enum<string>
required

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

Available options:
DISCOUNT_COUPONS,
GIFT_VOUCHERS
created_at
string<date-time>
required

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

Example:

"2024-07-16T09:05:53.175Z"

object
enum<string>
required

The type of the object represented by JSON.

Available options:
campaign_template
description
string

User-defined description of the campaign template.

⌘I