---
title: POST /api/v1/analytics/collect
description: Collect
locale: en
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/api/analytics/post-analytics-collect/
---

> Documentation index: https://enterium-developer-docs.pages.dev/developers/llms.txt — every page of this portal has a Markdown twin at <route>.md; the frozen API contract is at https://enterium-developer-docs.pages.dev/developers/api/openapi.json.

:::note
Generated from the OpenAPI contract — do not edit by hand. Interactive explorer with full schemas: [https://entherium.duckdns.org:8443/reference](https://entherium.duckdns.org:8443/reference); frozen spec for this build: [openapi.json](/developers/api/openapi.json). Group: [analytics](../).
:::

Collect

Trigger a collection run (idempotent; safe to re-run).

`collect=false` runs the cheap SYNCHRONOUS mode: external collectors are not called,
only the ingest of already-fetched files and topic scoring run, and the caller gets the
RESULT instead of an "accepted" — so a scheduled caller can tell whether the loop
actually computed.

**Auth:** `Authorization: Bearer <token>` required

## Request

```sh
curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/analytics/collect" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"collect":"<collect>","date":"<date>","with_psi":"<with_psi>"}'
```

## Response `200`

The contract carries no example for this response; schema: `object`. Field-level shape: [interactive explorer](https://entherium.duckdns.org:8443/reference).

## Returns

`object` — Successful Response

## Parameters

| Parameter | In | Required | Type | Default | Constraints | Description |
| --- | --- | --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | no | `string` | — | uuid | Optional. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `collect` | `boolean` | no |  |
| `date` | `string \| null` | no |  |
| `with_psi` | `boolean` | no |  |

## Errors

| Code | Meaning | Body |
| --- | --- | --- |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

Every error body is `{detail, code?, request_id, doc_url}` — `request_id` is the value to quote, `doc_url` points at the [Errors reference](../../../reference/errors/).
