> ## 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 AI Flow Report Logs

> Returns paginated AI flow execution logs

#### Description

This endpoint returns paginated AI flow execution logs for a specific flow. You can filter by run status, date range, and a search term (request ID, profile ID, phone, or email). 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>

#### Path Parameters

<ParamField path="flowId" type="string" required placeholder="65f1a2b3c4d5e6f7a8b9c0d1">
  The unique identifier of the AI flow.
</ParamField>

#### Query Parameters

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

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

<ParamField query="status" type="string" placeholder="Completed">
  Run status filter. Possible values: `Pending`, `Running`, `Completed`, `Failed`, `Stopped`.
</ParamField>

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

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

<ParamField query="search" type="string" placeholder="+1555">
  Search by request ID, profile ID, phone, or email.
</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 AI flow execution log objects, each containing:
</ResponseField>

<ResponseField name="data[].request_id" type="string">
  The unique request ID for this flow run.
</ResponseField>

<ResponseField name="data[].date" type="string">
  The date of the flow execution.
</ResponseField>

<ResponseField name="data[].status" type="string">
  The run status of the flow execution. Possible values: `Pending`, `Running`, `Completed`, `Failed`, `Stopped`.
</ResponseField>

<ResponseField name="data[].delivery_status" type="string">
  The message delivery status for this execution.
</ResponseField>

<ResponseField name="data[].recipients" type="array">
  Recipients associated with this execution.
</ResponseField>

<ResponseField name="data[].recipients[].id" type="string">
  The profile ID of the recipient.
</ResponseField>

<ResponseField name="data[].recipients[].name" type="string">
  The name of the recipient.
</ResponseField>

<ResponseField name="data[].recipients[].phone" type="string">
  The phone number of the recipient.
</ResponseField>

<ResponseField name="data[].recipients[].email" type="string">
  The email address of the recipient.
</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": "AI flow report logs retrieved successfully",
    "data": [
      {
        "request_id": "66e120d1b9eht5059e5e01d",
        "date": "2024-01-15T10:30:00Z",
        "status": "Completed",
        "delivery_status": "delivered",
        "recipients": [
          {
            "id": "65f1a2b3c4d5e6f7a8b9c0d2",
            "name": "Jane Doe",
            "phone": "+15551234567",
            "email": "jane@example.com"
          }
        ]
      }
    ],
    "pagination": {
      "size": 42,
      "count": 20,
      "pageSize": 20
    }
  }
  ```

  ```json 400-Bad Request theme={null}
  {
    "success": false,
    "message": "Invalid flowId or query parameter"
  }
  ```

  ```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>
