v1

latestOpenAPI 3.0.22026-07-12103244.1 KB
Email templates

bulkSendMessage

Send emails to multiple recipients using a template

post/v1/email-template/templates:bulkSendMessage

Request body

OR
OR

Example request

{
  "email_template_id": "511ceb90-f738-47aa-8b1e-915ace0ae13c",
  "recipient_query": "_schema:contact AND consent_email_marketing:active",
  "custom_variables": [
    {
      "variable": "{{abc.xyz}}",
      "value": "ReplacedValue"
    }
  ]
}

Response

Success

org_idstring

Organization ID

job_idstring required

Job ID for tracking the status of bulk message action

skip_creating_entitiesboolean

When true, it lets to send only the email by skip creating the thread & message entities.

complete_threadboolean

Whether the thread is marked as Done immediately after sending the message

status'PROCESSING' | 'QUEUEING' | 'APPROVAL' | 'SENDING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' required

Status of the bulk message action

  • PROCESSING: Bulk message action is processing the request
  • QUEUEING: Bulk message action is generating emails to send in a queue
  • SENDING: Bulk message action is sending emails from the queue
  • SUCCESS: Bulk message action is completed successfully
  • FAILED: Bulk message action is failed
  • CANCELLED: Bulk message action was cancelled
created_bystring

User ID who created the bulk message action

created_atstring date-time

Time when the bulk message action was created

updated_atstring date-time

Time when the bulk message action was last updated

approved_atstring date-time

Time when the bulk message action was last approved

approve_action'APPROVE_WITH_CONSENT' | 'APPROVE_ALL'

Type of approval action for the bulk message request.

  • APPROVE_WITH_CONSENT: Approve the bulk message request and send emails to queued recipients with consent
  • APPROVE_ALL: Approve the bulk message request and send emails to all queued recipients, including those without consent
task_tokenstring

Task token to approve or cancel the bulk message action

total_queuedinteger

Total number of emails generated and queued for sending

Example response

{
  "org_id": "206801",
  "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
  "request": {
    "email_template_id": "511ceb90-f738-47aa-8b1e-915ace0ae13c",
    "recipient_ids": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "3fa85f64-5717-4562-b3fc-2c963f66afa7",
      "3fa85f64-5717-4562-b3fc-2c963f66afa8"
    ],
    "custom_variables": [
      {
        "variable": "{{abc.xyz}}",
        "value": "ReplacedValue"
      }
    ]
  },
  "created_by": "1234",
  "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
  "total_queued": 100,
  "queued": [
    {
      "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "email_to": [
        "recipient@example.com"
      ],
      "email_with_consent": [
        "recipient@example.com"
      ]
    }
  ],
  "sent": [
    {
      "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "message_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "email_to": [
        "recipient@example.com"
      ]
    }
  ],
  "failed": [
    {
      "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "email_to": [
        "recipient@example.com"
      ]
    }
  ]
}