Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User documentation
  • FAQ
  • Altcraft glossary
  • Profiles and databases
  • Communication channels
  • Segmentation
  • Message templates
  • Mailings
  • Campaigns
  • Automation scenarios
  • Market
  • Loyalty programs
  • Reports and analytics
  • Integrations
    • Action hooks
      • Altcraft Action Hooks
      • Action hooks event types
      • Action Hook Message Structure
      • JSON batch request (HTTP POST action hook)
      • Message to RabbitMQ broker
      • Message to RabbitMQ exchanger
      • Message to Kafka broker
      • Test event
    • Integration of third-party services using Albato
    • Facebook Ads Manager™
    • Google Ads Audiences
    • Yandex.Audience™
    • VK Ads™
    • Static segment synchronization
    • Yandex AppMetrica™
    • Tilda™
    • Lpgenerator™
    • WhatsApp
    • Viber*™ integration
    • Integration scope
    • Notify
  • Weblayers
  • Settings
  • API requests: where to start
  • Changelog
  • library
  • Integrations
  • Action hooks
  • JSON batch request (HTTP POST action hook)
Documentation for version v74

JSON batch request (HTTP POST action hook)

Batch requests allow you to combine many HTTP requests into one by specifying each request as a separate object in the body. The server returns one HTTP response that contains the responses to each submitted request.

When we choose this request type, we send the received events in JSON format in the body of the POST request to an external API. When sent, a JSON array with events will be generated.

Request settings​

The standard request is sent without authorization. However, if you want to send data to an external service that uses the OAuth 2.0 framework as its authorization method, change the authorization type to OAuth2. In this case, you will need to select the connection that links Altcraft Platform and the service.

You have to specify:

  • URL of the service that receives the data
  • Maximum batch size: limit the number of events in JSON array. POST request will be sent as soon as there are enough events.
[{"event": "send", ... }, { }, ... ]
  • Timeout sec: the period of time during which events are accumulated in a batch to be sent to the server. If during this time the maximum batch size is not reached, the POST request is still sent. In this case, the JSON array contains the number of events that have accumulated by the time the timeout expires.
  • API response success message: the response from the server must go into this Regex, only then the request to the server will be considered successful. For instance:

.*OK.*

caution

If you leave field API response success message empty, any response the status code of which is 200 is considered successful.

Email delivered message example​

[
{
"event_type": "deliv",
"list_id": 50,
"account_id": 161,
"_xxh": "5ada5e6ea3c6da5f",
"_md5": "a5656dc1e3f603063a1918d582a10f58",
"event_data": {
"message_id": 5,
"segment_id": 0,
"campaign_id": 130
},
"event_date": "2016-11-15T09:12:28.514388956Z",
"custom_data": {
"email": "eddie@test-ukr.net",
"_fname": "Eddie"
},
"is_test": false
},
{
"event_type": "deliv",
"list_id": 50,
"account_id": 161,
"_xxh": "bb42e541c7267fa6",
"_md5": "593b250db256a764da8d2da4be694b31",
"event_data": {
"message_id": 5,
"segment_id": 0,
"campaign_id": 130
},
"event_date": "2016-11-15T09:12:28.569124547Z",
"custom_data": {
"email": "simon@test-gmail.com",
"_fname": "Simon"
},
"is_test": false
}
]
Last updated on May 22, 2023
Previous
Action Hook Message Structure
Next
Message to RabbitMQ broker
  • Request settings
  • Email delivered message example
© 2015 - 2025 Altcraft, LLC. All rights reserved.