---
title: "Ingest Mobile Logs"
method: POST
path: "/logs/mobile"
tags: ["logs"]
---

# Ingest Mobile Logs

`POST /logs/mobile`

## Request

- Base URL: `https://api.projectindi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.projectindi.com/logs/mobile`
- Auth: none declared

Accept a batch of mobile log entries and forward them via stdout.

Auth is enforced by the global JWT middleware before we get here;
`request.state.user_id` is guaranteed present on this path. The
type annotation below documents that invariant without introducing
a runtime check that duplicates the middleware.

## Request body

- MobileLogBatch
  - `entries` MobileLogEntry[], required
    - `level` 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal', required
    - `message` string, required
    - `context` object, nullable
    - `timestamp_ms` integer, required

## Response `200`

Successful Response

- SrcApiLogsRoutesIngestResponse
  - `accepted` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles.md) - [All operations](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/llms.txt) - [OpenAPI document](https://skmtc.dev/projectindi/apis/indi-agent-api-first-principles/revisions/25a7813e21fd?raw)
