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
  • Profile import + trigger campaign launch
Documentation for version v72

Profile import + trigger campaign launch

Description​

A new customer profile import followed by a trigger campaign launch.

URL​

Method: POST

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

Request parameters​

ParametersTypeExampleRequiredDescription
Profile import
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
dataJSON object
{
"_fname": "John",
"_lname": "Doe"
}
YesProfile fields data
skip_triggersbooltrueNoSkip trigger events.
By default – false
skip_invalid_subscriptionsbooltrueNoSkip invalid subscriptions
By default – false
detect_geobooltrueNoDetect location by _regip or _ip from data object
Profile matching mode
matchingstring

"email"
"email_profile"
"phone"
"profile_id"
"custom"

No, if matched by email from profile or subscriptionsProfile matching mode
By default - email
emailstring"john@example.com""matching":"email" - both profile data and subscriptions

"matching":"email_profile" - profile data only
Email address
phonestring"+79000000000""matching":"phone"Phone number
profile_idstring"abcdefghijklmnqrstuvwxyz""matching":"profile_id"Profile ID
field_namestring"CRM_ID""matching":"custom"Custom profile data field name
field_valueint/string"123420""matching":"custom"

Custom profile data field value.

tip

Searching by combination of tags is available for tag type profile fields. Values are recorded as a string: "tag-1, tag-2".

resource_idint24NoResource ID for email and phone matching
Trigger launch
trigger_idint13YesTrigger campaign ID
timeoutJSON object
{
"days": 0,
"hours": 0,
"minutes": 5
}
NoTrigger start timeout. Specify the days, hours, and minutes to set the timeout period.
custom_dataJSON object
{
"sending_time": "12:31:12"
}
NoData used for integration Action hooks
contentJSON object
{
"page": "registration_form"
}
NoData you can use in a message template using {apicontent.fieldname} variable
attachJSON objects array
{
"data": "data:text/csv;base64,SEVMTE8K",
"name": "Attach.txt"
}
NoA file you can attach to an Email message

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"matching": "email",
"email": "example@example.com",
"detect_geo": true,
"data": {
"_fname": "Olly",
"_lname": "Lambert",
"email": "example@example.com",
"phones": [
"+79000000000"
],
"_bdate": "1990-02-22T21:00:00Z",
"custom_field": "custom_value",
"subscriptions": [
{
"channel": "email",
"email": "example@example.com",
"resource_id": 21
},
{
"channel": "phone",
"phone": "+79000000000",
"resource_id": 21
}
]
},
"trigger_id": 96,
"timeout": {
"days": 0,
"hours": 0,
"minutes": 5
},
"custom_data": {
"sending_time": "12:31:12"
},
"attach": [
{
"data": "data:text/csv;base64,5LuK5pel44GvCg==",
"name": "Attach.txt"
}
]
}

<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<matching>email</matching>
<email>example@example.com</email>
<detect_geo>true</detect_geo>
<data>
<_fname>Garry</_fname>
<_lname>Sallivan</_lname>
<_bdate>1990-02-22T21:00:00Z</_bdate>
<email>example@example.com</email>
<phones array='true'>+79000000027</phones>
<custom_field>custom_value</custom_field>
<subscriptions>
<channel>email</channel>
<email>testtriggers90@example.com</email>
<resource_id>21</resource_id>
</subscriptions>
<subscriptions>
<channel>phone</channel>
<phone>+79000000780</phone>
<resource_id>21</resource_id>
</subscriptions>
</data>
<trigger_id>96</trigger_id>
<timeout>
<days>0</days>
<hours>0</hours>
<minutes>5</minutes>
</timeout>
<custom_data>
<sending_time>12:31:12</sending_time>
</custom_data>
<attach array='true'>
<data>data:text/csv;base64,5LuK5pel44GvCg==</data>
<name>Attach.txt</name>
</attach>
</xml>

Response example​

  • JSON
  • XML
{
"error": 0,
"error_text": "",
"profile_id": "54759eb3c090d83494e2d804"
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<profile_id>660feee02984cf021df478f3</profile_id>
</xml>
caution

Subscription to the Resource that is used by the trigger campaign has to be sent within profile data object. If not — the following mistake will be sent back:

{
"error": 400,
"error_text": "No active subscriptions passed for trigger resource"
}

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError description
profile_idstringImported profile ID
Last updated on Aug 16, 2024
Previous
Trigger launch (API call)
Next
Task for bulk trigger launch
  • Description
  • URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.