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
  • Task for bulk trigger launch
Documentation for version v72

Task for bulk trigger launch

Description​

Launches a trigger campaign for multiple profiles.

This request is a batch version of the Trigger Launch (API call) request.

Returns a response with the task id, without waiting for completion.

note

The request body size is limited by default to 10 Mb, exception for files — 100 Mb.

URL request​

Method: POST

http://example.com/api/v1.1/campaigns/triggers/start_batch_task

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format
By default – "json"
idint1YesTrigger campaign ID
attachJSON array of File object[]NoFile object
contentJSON object

{    "H1": "Weather alert",    "H2": "Welcome" }

NoData you can use in a message template using {apicontent.fieldname} variable
custom_dataJSON object
{
"field": "value"
}
NoData used for integration Action hooks
dataarray
{
"_fname": "John",
"_lname": "Doe"
}
YesA field in the database and its value, which will be used to search for the desired profile.
Profile matching mode
matchingstring

"email"
"email_profile"
"email_sub"
"phone"
"phone_sub"
"profile_id"
"push_sub"
"custom"
"custom_sub"
"email_phone"
"email_phone_sub"

No,
if matched by email from profile or subscriptions
Profile matching mode.

By default - email

Learn more.
emailstring"john@example.com""matching":"email" - both profile data and subscriptions
"matching":"email_profile" - profile data only

"matching":"email_sub" - subscription data only
Email address
phonestring"+79000000000""matching":"phone" - by phone number from profile or subscriptions

"matching":"phone_sub" - by phone number from subscriptions
Phone number
profile_idstring"abcdefghijklmnqrstuvwxyz""matching":"profile_id"Profile ID
field_namestring"matching":"custom"Name of the custom profile data field
field_value"matching":"custom"Value of the custom profile data field
custom_requestJSON object
{
"email": {
"$in": [
"asd@dsfsd.com",
"zxcv@sdfsd.com"
]
}
}
When no matching
specified
Custom MongoDB database query

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError text
task_idstringTask ID

Request example (matching by email)​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 96,
"format": "json",
"matching": "email",
"data": [
{
"email": "example1@example.com"
},
{
"email": "example2@example.com"
}
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>96</id>
<format>xml</format>
<matching>email</matching>
<data>
<email>example1@example.com</email>
</data>
<data>
<email>example2@altcraft.com</email>
</data>
</xml>

Request example (matching by custom field)​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 96,
"format": "json",
"skip_triggers": false,
"matching": "custom",
"field_name": "Custom_ID",
"data": [
{
"field_value": "001"
},
{
"field_value": "002"
}
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>96</id>
<format>xml</format>
<skip_triggers>false</skip_triggers>
<matching>custom</matching>
<field_name>Custom_ID</field_name>
<data>
<field_value>001</field_value>
</data>
<data>
<field_value>002</field_value>
</data>
</xml>

Response example​

  • JSON
  • XML
{
"error": 0,
"error_text": "Successful operation",
"task_id": "30421978-7f6d-4f39-913f-fb6cad8e2477"
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<task_id>392b7e46-e4d9-4a07-959a-1e541138b684</task_id>
</xml>

Response example when a request constraint is triggered​

  • JSON
  • XML
{
"error": 400,
"error_debug": "http: request body too large",
"error_text": "Invalid request"
}
<xml>
<error>400</error>
<error_debug>http: request body too large</error_debug>
<error_text>"Invalid request"</error_text>
</xml>
Last updated on Dec 7, 2024
Previous
Profile import + trigger campaign launch
Next
Task for bulk profiles import + trigger launch
  • Description
  • URL request
  • Request parameters
  • Response parameters
  • Request example (matching by email)
  • Request example (matching by custom field)
  • Response example
  • Response example when a request constraint is triggered
© 2015 - 2025 Altcraft, LLC. All rights reserved.