Skip to content

Reports

GET /projects/{project}/reports

All reports for a project, sorted newest first.

Path parameters

ParameterTypeDescription
projectintegerProject ID

Request

sh
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://admin.trakk.ai/api/v1/projects/42/reports

Response

json
{
  "data": [
    {
      "id": 1081,
      "project_id": 42,
      "report_number": 14,
      "report_name": "H3 + Text 3",
      "status": "completed",
      "date_to_create_texts": "2026-02-20",
      "date_to_send_to_client": "2026-03-01",
      "sent": true,
      "approved_status": "approved",
      "approved_by": { "id": 7, "name": "Jane Smith", "role": "Account Manager", "agency": { "id": 12, "name": "Digipartner Agency" } },
      "managed_status": "completed",
      "managed_by": { "id": 7, "name": "Jane Smith", "role": "Account Manager", "agency": { "id": 12, "name": "Digipartner Agency" } },
      "pdf_link": "https://admin.trakk.ai/reports/digipartner-report-14.pdf",
      "web_link": "https://admin.trakk.ai/reports/view/abc123"
    }
  ],
  "cache_refreshed_at": "2026-03-30T12:00:00.000000Z"
}

Fields

FieldTypeNullableDescription
idintegerNoInternal report ID
project_idintegerNoParent project ID
report_numberintegerNoPosition in the project's report sequence (1-26)
report_namestringYesHuman-readable label for this report type
statusstringNoSee Enums
date_to_create_textsdateYesContent creation deadline
date_to_send_to_clientdateYesScheduled client delivery date
sentbooleanNoWhether the report email has been sent to the client
approved_statusstringYesSee Enums
approved_byuser objectYesUser who approved the report
managed_statusstringYesSee Enums
managed_byuser objectYesUser responsible for managing this report
pdf_linkstringYesURL to the PDF version
web_linkstringYesURL to the web version

GET /projects/{project}/reports/latest

Calendar-aware "current or upcoming" report for a project. Selection uses each report's date_to_create_texts (the scheduled content-creation date) as the anchor:

  1. Current month, completed. If a report has status = completed and date_to_create_texts in the current calendar month, return it (latest date_to_create_texts wins on ties).
  2. Otherwise, next in pipeline. Return the report with the smallest date_to_create_texts whose status is not completed (pending, running, or failed). Past, current, and future dates are all eligible.
  3. Otherwise, 404.

Only project-level reports of the regular action type are considered.

Status check required

This endpoint can return a non-completed report. Always check status before fetching /content, or use /reports/last-generated which is guaranteed to be completed.

Path parameters

ParameterTypeDescription
projectintegerProject ID

Request

sh
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://admin.trakk.ai/api/v1/projects/42/reports/latest

Response

json
{
  "data": {
    "id": 1081,
    "project_id": 42,
    "report_number": 14,
    "report_name": "H3 + Text 3",
    "status": "completed",
    "date_to_create_texts": "2026-02-20",
    "date_to_send_to_client": "2026-03-01",
    "sent": true,
    "approved_status": "approved",
    "approved_by": { "id": 7, "name": "Jane Smith", "role": "Account Manager", "agency": { "id": 12, "name": "Digipartner Agency" } },
    "managed_status": "completed",
    "managed_by": { "id": 7, "name": "Jane Smith", "role": "Account Manager", "agency": { "id": 12, "name": "Digipartner Agency" } },
    "pdf_link": "https://admin.trakk.ai/reports/digipartner-report-14.pdf",
    "web_link": "https://admin.trakk.ai/reports/view/abc123"
  },
  "cache_refreshed_at": "2026-03-30T12:00:00.000000Z"
}

Same fields as a single item from the reports list above.


GET /projects/{project}/reports/last-generated

The most recent project-level report with status = completed, ordered by created_at desc. Use this when you need a "ready to publish" guarantee — no status check needed.

Returns 404 if the project has no completed reports yet.

Path parameters

ParameterTypeDescription
projectintegerProject ID

Request

sh
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
  https://admin.trakk.ai/api/v1/projects/42/reports/last-generated

Same response shape and fields as /reports/latest.

When to use which endpoint

You want…Use
The most recent finished content (safe to publish)/reports/last-generated
The current or next-upcoming report, including in-progress ones/reports/latest
To detect when a new report finishes (across many projects)/reports/last-generated and watch report_number advance