Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
    • Activate mailing
    • Deactivate mailing
    • Get mailing list
    • Get mailing information
    • Get mailing log
    • Clone mailing
    • Delete mailing
    • Get mailing status
    • Broadcast mailings
    • Regular mailings
    • Trigger mailings
      • Get trigger mailings list
      • Get trigger mailing information
      • Create trigger mailing
      • Update trigger mailing
      • Trigger launch (API call)
      • Profile import + trigger mailing launch
      • Task for bulk trigger launch
      • Task for bulk profiles import + trigger launch
      • Bulk trigger launch
      • Bulk profiles import + trigger mailing launch
      • Clone a trigger mailing
      • Data array
  • Automation scenarios
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Mailings
  • Trigger mailings
  • Bulk trigger launch
Documentation for version v74

Bulk trigger launch

Description​

Launches a trigger mailing for multiple profiles.

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

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

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json
trigger_idint1YesTrigger mailing 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

[    {"email": "profile1@example.com"},    {"email": "profile2@example.com"} ]

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 subscriptionsProfile matching mode
By default - email
Learn more.

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError text
resultarrayProfile IDs to which the mailing was sent

Request example (matching by email)​

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

Request example (matching by custom field)​

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

Response example​

  • JSON
  • XML
{
"error": 0,
"error_text": "Successful operation",
"result": [
{
"profile_id": "6606e08f10bcdd88297057a7"
},
{
"profile_id": "66101437dc4594c2934da6da"
}
]
}
<xml>
<error>0</error>
<error_text>Successful operation</error_text>
<result>
<profile_id>66101437dc4594c2934da6da</profile_id>
</result>
<result>
<profile_id>6606e08f10bcdd88297057a7</profile_id>
</result>
</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 Oct 8, 2024
Previous
Task for bulk profiles import + trigger launch
Next
Bulk profiles import + trigger mailing 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.