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

# Native JSON intake

> POST records as JSON to a stream.

```http theme={null}
POST /api/v1/intake/{type}/{stream}
```

`{type}` is `logs`, `metrics`, or `traces`. Post a single record object or an array. The stream is
created on first write, and the schema evolves as fields appear. Timestamps are microseconds since the
Unix epoch (`_timestamp`).

**Path parameters**

| Param    | Type   | Notes                         |
| -------- | ------ | ----------------------------- |
| `type`   | string | `logs` / `metrics` / `traces` |
| `stream` | string | Stream name, e.g. `app`       |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST http://localhost:5080/api/v1/intake/logs/app \
    -H "authorization: Bearer $MS_JWT" \
    -H 'content-type: application/json' \
    -d '[{"_timestamp":1700000000000000,"level":"error","msg":"db pool exhausted","trace_id":"abc123"}]'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "accepted": 1, "rejected": 0, "errors": [] }
  ```
</ResponseExample>

`402` means the license, subscription, trial, or daily intake allowance blocks the write. `413`
means the organization storage quota is exceeded; `429` means the intake rate limit was hit. This
endpoint requires `streams.write`.
