Get orchestrations stats

Stats

get

Get statistics about an orchestration.

Authorizations
Query parameters
orchestration_idstringRequired

The id of the orchestration to fetch statistics from.

Example: orchestration_0664hyh918hr1gnzka9py5t62nrc0e1q
fromstring · dateRequired

Statistics starting date in a yyyy-MM-dd format. Cannot be earlier than 6 months ago.

Example: 2025-01-13
tostring · dateRequired

Statistics ending date in a yyyy-MM-dd format.

Example: 2025-02-12
Header parameters
X-Batch-ProjectstringRequired

The unique project key, identifying a project on the Batch platform

Example: project_0664hxvwffvbpn278gxdyhsadddqgna6
Responses
200
Successful response with statistics about an orchestration.
application/json
Responseone of
or
get
GET /2.5/orchestrations/stats HTTP/1.1
Host: api.batch.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-Batch-Project: text
Accept: */*
{
  "id": "orchestration_0664hyh918hr1gnzka9py5t62nrc0e1q",
  "details": [
    {
      "date": "2025-03-18",
      "sent": 972,
      "delivered": 847,
      "unique_open": 214,
      "total_open": 259,
      "unique_machine_open": 126,
      "unique_click": 37,
      "total_click": 41,
      "spam": 4,
      "unsubscribe": 13,
      "total_bounce": 14,
      "skipped": 15,
      "versions": [
        {
          "version": "a",
          "sent": 530,
          "delivered": 465,
          "unique_open": 139,
          "total_open": 161,
          "unique_machine_open": 37,
          "unique_click": 14,
          "total_click": 16,
          "spam": 3,
          "unsubscribe": 10,
          "total_bounce": 4,
          "skipped": 10
        },
        {
          "version": "b",
          "sent": 442,
          "delivered": 382,
          "unique_open": 75,
          "total_open": 98,
          "unique_machine_open": 89,
          "unique_click": 23,
          "total_click": 25,
          "spam": 1,
          "unsubscribe": 3,
          "total_bounce": 10,
          "skipped": 5
        }
      ]
    }
  ]
}

Request structure

Route

The orchestration API exposes a GET endpoint that allows you to export message analytics for a specific Orchestration within a defined date range. This includes metrics such as sent, open, and click counts, with daily granularity.

https://api.batch.com/2.5/orchestrations/stats

Headers and authentication

See Overview → Using Project APIs.

Query parameters

See the API Description.

Responses

Success

A successful GET request to this endpoint will return an HTTP 200 OK response. The body of the response will contain a JSON object with the statistics for the requested orchestration over the specified date range.

Response Body

The main JSON object contains the following fields:

  • id (string): The unique identifier of the orchestration for which statistics are being returned.

  • details (array): An array of objects, where each object contains the daily statistics for a specific date. This can include:

    • Step Detail: For trigger orchestrations.

    • Variant Detail: For A/B tested orchestrations.

{
  "id": "orchestration_0694rjc8znu6rdvfzkxp2wab2m704kne",
  "details": [
    {
      "date": "2025-06-03",
      "sent": 129,
      "delivered": 125,
      "sent_optin" : 121,
      "unsubscribe": 1,
      "unique_open": 33,
      "total_open": 52,
      "unique_machine_open": 11,
      "unique_click": 8,
      "total_click": 10,
      "total_bounce": 4,
      "message_steps": [
        {
          "step_id": "MESSAGE__ndPS6g3",
          "sent": 1,
          "delivered": 1
        },
        {
          "step_id": "MESSAGE__3gZK1yp",
          "sent": 128,
          "delivered": 124,
          "sent_optin" : 121,
          "unsubscribe": 1,
          "unique_open": 33,
          "total_open": 52,
          "unique_machine_open": 11,
          "unique_click": 8,
          "total_click": 10,
          "total_bounce": 4
        }
      ]
    },
    {
      "date": "2025-06-02",
      "sent": 336,
      "delivered": 327,
      "sent_optin" : 303,
      "unsubscribe": 2,
      "skipped": 2,
      "unique_open": 150,
      "total_open": 242,
      "unique_machine_open": 80,
      "unique_click": 36,
      "total_click": 57,
      "total_bounce": 5,
      "message_steps": [
        {
          "step_id": "MESSAGE__3gZK1yp",
          "sent": 326,
          "delivered": 317,
          "sent_optin" : 303,
          "unsubscribe": 2,
          "skipped": 2,
          "unique_open": 150,
          "total_open": 242,
          "unique_machine_open": 80,
          "unique_click": 36,
          "total_click": 57,
          "total_bounce": 5
        },
        {
          "step_id": "MESSAGE__ndPS6g3",
          "sent": 10,
          "delivered": 10
        }
      ]
    }
  ]
}

Failure

If the GET data does not meet the API requirements you will receive an actionable error message. Contact us at support@batch.com if you need further support.

See the list of potential failures in the API Description.

Last updated

Was this helpful?