Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v72
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Static segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
    • Activate campaign
    • Deactivate campaign
    • Get campaign list
    • Get campaign information
    • Get campaign log
    • Clone campaign
    • Delete campaign
    • Get campaign status
    • Broadcast campaigns
    • Regular campaigns
    • Trigger campaigns
      • Get trigger campaigns list
      • Get trigger campaign information
      • Create trigger campaign
      • Update trigger campaign
      • Trigger launch (API call)
      • Profile import + trigger campaign launch
      • Task for bulk trigger launch
      • Task for bulk profiles import + trigger launch
      • Bulk trigger launch
      • Bulk profiles import + trigger campaign launch
      • Clone a trigger campaign
      • Data array
  • Automation scenarios
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDevv71
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
This is documentation for Altcraft Platform v72. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Campaigns
  • Trigger campaigns
  • Create trigger campaign
Documentation for version v72

Create trigger campaign

Description​

Creates a new trigger campaign.

Request URL​

Method: POST

https://example.com/api/v1.1/campaigns/triggers/add/

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"csv"NoResponse data format.
By default – json
namestring"New Awesome Campaign"YesNew campaign name
is_activebooltrueNoActivates campaign instantly
contentJSON array
[
   {
      "from_email": "",
      "from_name": "",
      "message_id": 12,
      "replyto_email": "",
      "replyto_name": "",
      "subject": "Weather alert"
   }
]
YesMessage template object
subidstring"Adv_1"NoCampaign SubID
trigger_typestring"api_call"YesTrigger type
skip_minutesint0NoWait for X minutes before sending
resource_idint24Noresource ID
send_channelstring"email"
"sms"
"push"
YesSending channel
content_typestring"email"NoDeprecated. If you pass this parameter, the campaign will use the email channel for sending, no matter what value you specify. It is recommended to use send_channel.
send_email_contentbooltrueNoDeprecated. If you pass this parameter, the campaign will use the email channel for sending, no matter what value you specify. It is recommended to use send_channel.
send_sms_contentbooltrueNoDeprecated. If you pass this parameter, the campaign will use the email channel for sending, no matter what value you specify. It is recommended to use send_channel.
send_push_contentbooltrueNoDeprecated. If you pass this parameter, the campaign will use the email channel for sending, no matter what value you specify. It is recommended to use send_channel.
policy_idint1NoSending policy ID
attributesobject"season":"summer_2024"NoAssigned attributes and their values
push_sending_modestring"fanout" (default)
"last"
NoPush notification sending mode (push channels only)
Smart settings
virtual_sender_idint12NoVirtual sender ID
(Smart accounts)
is_random_trk_prefixboolfalseNoTracking domain random prefix.
(Smart accounts)
custom_trk_domainJSON array["trk.example.com", "trk2.example.com"]NoTracking domains list
(Smart accounts)
blind_carbon_copyJSON array["john@example.com", "george@example.com"]NoHidden copy email addresses
(Smart accounts)
unconditional_sendingbooltrueNoSend messages ignoring subscription status
(Smart accounts)
info

Unconditional sending is available only for On-premise and Off-premise licensed instances. To activate it add "unc_campaign" to EXTRAS object of main.json configuration file.

Trigger type parameters​

ParameterTypeDescriptionapi_callapi_importactionupdatepixelsubscribe
actionstringAction based triggerNoNoYesNoNoNo
update_queryJSON array
{ 
"fieldname": "custom_ID",
"fieldtype": "int",
"operator": "equal",
"value": "2000"
}
NoNoNoYesNoNo
link_namestringMessage link nameNoNoYesNoNoNo
message_idintTemplate IDNoNoYesNoNoNo
list_idintDatabase IDYesYesNoYesNoNo
subscribe_resource_idintResource IDNoNoNoNoNoYes
channelstringSubscription channelNoNoNoNoNoYes
is_new_subboolNew resource triggerNoNoNoNoNoYes
is_new_chboolNew channel triggerNoNoNoNoNoYes
is_new_contactboolNew contact triggerNoNoNoNoNoYes
is_status_changedboolSubscription status change triggerNoNoNoNoNoYes
trigger_statusesarray(int)Subscription status change optionsNoNoNoNoNoYes
pixel_idintPixel IDNoNoNoNoYesNo

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"name": "New trigger campaign №1",
"content": [
{
"subject": "Maybe very important message",
"from_email": "",
"from_name": "James",
"replyto_email": "",
"replyto_name": "",
"message_id": 14
}
],
"trigger_type": "api_call",
"send_channel": "email",
"list_id": 1
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<name>New trigger campaign №1</name>
<content array='true'>
<from_email/>
<from_name>James</from_name>
<message_id>15</message_id>
<replyto_email/>
<replyto_name/>
<subject>Maybe very important message</subject>
</content>
<trigger_type>api_call</trigger_type>
<send_channel>email</send_channel>
<list_id>1</list_id>
</xml>

Response example​

  • JSON
  • XML
{
"data": {
"saved_id": 95,
"trigger_link": "http://trk.test.test.altcraft.com:8095/trg/65512f8ec196edd6ac71fa5d068d355f65512f8ec196edd62f3de6b87e2969e3/<email|md5|xxh>"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<saved_id>96</saved_id>
<trigger_link>http://trk.test.test.altcraft.com:8095/trg/65512f8ec196edd6fc63524eba02bff065512f8ec196edd62f3de6b87e2969e3/
<email|md5|xxh>
</trigger_link>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError text
saved_idintNew trigger campaign ID
trigger_linkstringtrigger link. Only for trigger_type = "api_call"
Last updated on Feb 21, 2024
Previous
Get trigger campaign information
Next
Update trigger campaign
  • Description
  • Request URL
  • Request parameters
  • Trigger type parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.