---
title: "Submit Sdk Logs"
method: POST
path: "/api/v1/sdk/users/{user_id}/logs"
tags: ["External: Mobile SDK"]
---

# Submit Sdk Logs

`POST /api/v1/sdk/users/{user_id}/logs`

Accept SDK diagnostic log events and store to raw S3 storage.

Used for observability into mobile SDK sync behavior (background task
lifecycle, device state, sync success/failure).

## Path parameters

- `user_id` string, required

## Headers

- `X-Open-Wearables-API-Key` string, nullable

## Request body

- SDKLogRequest — Top-level request for SDK log events endpoint.
  - `sdkVersion` string, required
  - `provider` string, nullable
  - `events` union[], required
    - union
      - HistoricalDataSyncStartEvent
        - `eventType` 'historical_data_sync_start', required
        - `timestamp` string, date-time, required
        - `dataTypeCounts` DataTypeCount[]
          - `type` string, required
          - `count` integer, required
        - `timeRange` TimeRange
          - `startDate` string, date-time, nullable
          - `endDate` string, date-time, required
      - HistoricalDataTypeSyncEndEvent
        - `eventType` 'historical_data_type_sync_end', required
        - `timestamp` string, date-time, required
        - `dataType` string, required
        - `success` boolean, required
        - `recordCount` integer, nullable
        - `durationMs` integer, nullable
      - DeviceStateEvent
        - `eventType` 'device_state', required
        - `timestamp` string, date-time, required
        - `batteryLevel` number, nullable
        - `batteryState` string, nullable
        - `isLowPowerMode` boolean, nullable
        - `thermalState` string, nullable
        - `taskType` string, nullable
        - `availableRamBytes` integer, nullable
        - `totalRamBytes` integer, nullable

## Response `202`

Successful Response

- UploadDataResponse — Response schema for data upload/sync operations. Returned when health data is queued for asynchronous processing via Celery. The actual import happens in the background - this response indicates the task was queued successfully.
  - `status_code` integer, required — HTTP status code (typically 202 for async operations)
  - `response` string, required — Human-readable response message
  - `user_id` string, nullable — User ID associated with the import operation
  - `dropped_count` integer — Number of individual records dropped by per-record validation
  - `records_saved` integer — Time-series samples saved
  - `types` string[] — Canonical SeriesType identifiers written by this batch (e.g. 'heart_rate'), sorted. Empty when the batch saved no time-series samples.
  - `workouts_saved` integer — Workouts saved
  - `sleep_saved` integer — Sleep records saved

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-19** `8c15cc93d210` — 1 info
  - added the optional property `types` to the response with the `202` status
- **2026-07-31** `e91ac2fa9289` — 6 info
  - the request property `events/items/oneOf[subschema #1: HistoricalDataSyncStartEvent]/timeRange/anyOf[subschema #1: TimeRange]/startDate` became optional
  - request property `events/items/oneOf[subschema #1: HistoricalDataSyncStartEvent]/timeRange/anyOf[subschema #1: TimeRange]/startDate` list-of-types was widened by adding types `null` to media type `application/json`
  - added the optional property `dropped_count` to the response with the `202` status
  - added the optional property `records_saved` to the response with the `202` status
  - …2 more

[Change history](https://skmtc.dev/openwearables/apis/open-wearables-api/changes/api/v1/sdk/users/:user_id/logs/post.md)

---

[API](https://skmtc.dev/openwearables/apis/open-wearables-api.md) · [All operations](https://skmtc.dev/openwearables/apis/open-wearables-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openwearables/apis/open-wearables-api/revisions/427d02add648?raw)
