> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Campaign Report Logs

> Returns paginated campaign delivery logs

#### Description

This endpoint returns paginated delivery logs for campaigns and other delivery types. You must provide a date range and channel. Results are cached for 5 seconds for the same workspace and query.

#### Headers

<ParamField header="x-api-key" type="string" required placeholder="Enter your API key">
  Your API key for authentication.
</ParamField>

<ParamField header="x-workspace-id" type="string" required placeholder="Enter your workspace ID">
  Your workspace ID for authentication.
</ParamField>

#### Query Parameters

<ParamField query="start_date" type="string" required placeholder="2024-01-01T00:00:00Z">
  Start date in RFC3339 format.
</ParamField>

<ParamField query="end_date" type="string" required placeholder="2024-01-31T00:00:00Z">
  End date in RFC3339 format.
</ParamField>

<ParamField query="channel" type="string" required placeholder="whatsapp">
  Channel filter. Possible values: `sms`, `whatsapp`, `rcs`, `email`, `push`.
</ParamField>

<ParamField query="page" type="integer" placeholder="1">
  Page number.
</ParamField>

<ParamField query="page_size" type="integer" placeholder="50">
  Number of items to return per page.
</ParamField>

<ParamField query="status" type="string" placeholder="delivered">
  Delivery status filter.
</ParamField>

<ParamField query="type" type="string" placeholder="campaign">
  Delivery type. Possible values: `campaign`, `api`, `flow`, `inbox`, `otpflow`.
</ParamField>

<ParamField query="search" type="string" placeholder="+1555">
  Recipient search term.
</ParamField>

#### Response

<ResponseField name="success" type="boolean">
  Indicates whether the API call was successful.
</ResponseField>

<ResponseField name="message" type="string">
  Success or error message from the API.
</ResponseField>

<ResponseField name="data" type="array">
  An array of campaign report log objects, each containing:
</ResponseField>

<ResponseField name="data[].recipient" type="string">
  The recipient address (phone number or email).
</ResponseField>

<ResponseField name="data[].status" type="string">
  The delivery status of the message.
</ResponseField>

<ResponseField name="data[].sent_at" type="string">
  Timestamp when the message was sent.
</ResponseField>

<ResponseField name="data[].delivered_at" type="string">
  Timestamp when the message was delivered.
</ResponseField>

<ResponseField name="data[].cost" type="number">
  Cost of the message.
</ResponseField>

<ResponseField name="data[].refunded" type="number">
  Refunded amount, if any.
</ResponseField>

<ResponseField name="data[].message" type="string">
  Message content.
</ResponseField>

<ResponseField name="data[].message_count" type="integer">
  Number of message parts (for example, SMS segments).
</ResponseField>

<ResponseField name="data[].failed_reason" type="string">
  Failure reason when the message was not delivered.
</ResponseField>

<ResponseField name="data[].remark" type="string">
  Additional remarks about the delivery.
</ResponseField>

<ResponseField name="data[].platform" type="string">
  Platform used to send the message.
</ResponseField>

<ResponseField name="data[].phone_number" type="string">
  Sender or account phone number, when applicable.
</ResponseField>

<ResponseField name="data[].bot_id" type="string">
  RCS bot ID, when applicable.
</ResponseField>

<ResponseField name="data[].sender_id" type="string">
  SMS sender ID, when applicable.
</ResponseField>

<ResponseField name="data[].route" type="string">
  SMS route, when applicable.
</ResponseField>

<ResponseField name="data[].from_email" type="string">
  From email address, when applicable.
</ResponseField>

<ResponseField name="data[].from_name" type="string">
  From display name, when applicable.
</ResponseField>

<ResponseField name="data[].subject" type="string">
  Email subject, when applicable.
</ResponseField>

<ResponseField name="data[].buttons" type="array">
  Button labels associated with the message, when applicable.
</ResponseField>

<ResponseField name="data[].people" type="object">
  Associated people record, when available.
</ResponseField>

<ResponseField name="data[].people.id" type="string">
  The people record ID.
</ResponseField>

<ResponseField name="data[].people.name" type="string">
  The people record name.
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information containing:
</ResponseField>

<ResponseField name="pagination.size" type="integer">
  The total number of logs available.
</ResponseField>

<ResponseField name="pagination.count" type="integer">
  The number of logs returned in this response.
</ResponseField>

<ResponseField name="pagination.pageSize" type="integer">
  The page size used for this request.
</ResponseField>

<ResponseExample>
  ```json 200-Success theme={null}
  {
    "success": true,
    "message": "Campaign report logs retrieved successfully",
    "data": [
      {
        "recipient": "+15551234567",
        "status": "delivered",
        "sent_at": "2024-01-15T10:30:00Z",
        "delivered_at": "2024-01-15T10:30:08Z",
        "cost": 0.012,
        "refunded": 0,
        "message": "Your order has been shipped",
        "message_count": 1,
        "failed_reason": "",
        "remark": "",
        "platform": "whatsapp",
        "phone_number": "123456789",
        "bot_id": "",
        "sender_id": "",
        "route": "",
        "from_email": "",
        "from_name": "",
        "subject": "",
        "buttons": ["Track order"],
        "people": {
          "id": "65f1a2b3c4d5e6f7a8b9c0d2",
          "name": "Jane Doe"
        }
      }
    ],
    "pagination": {
      "size": 150,
      "count": 50,
      "pageSize": 50
    }
  }
  ```

  ```json 400-Bad Request theme={null}
  {
    "success": false,
    "message": "start_date, end_date, and channel are required"
  }
  ```

  ```json 401-Unauthorized theme={null}
  {
    "success": false,
    "message": "Unauthorized. Please check your API key and workspace ID."
  }
  ```

  ```json 429-Too Many Requests theme={null}
  {
    "success": false,
    "message": "Too many requests, try again later!"
  }
  ```

  ```json 500-Internal Server Error theme={null}
  {
    "success": false,
    "message": "Internal server error. Please try again later."
  }
  ```
</ResponseExample>
