---
title: "Record an explicit app foreground event"
method: POST
path: "/api/analytics/app-lifecycle"
tags: ["analytics"]
---

# Record an explicit app foreground event

`POST /api/analytics/app-lifecycle`

## Request body

- AppOpenRequest
  - `event_id` string, uuid, required — Client-generated idempotency UUID
  - `open_type` 'cold_start' | 'resume', required — How the native app entered the foreground.
  - `occurred_at` string, date-time, required — Timezone-aware client timestamp
  - `channel` 'native_app' | 'web', required — Delivery channel used for an app-open event.
  - `platform` 'ios' | 'android' | 'web', required — Runtime platform used for an app-open event.
  - `form_factor` 'mobile' | 'tablet' | 'desktop', required — Physical device class used for an app-open event.
  - `app_version` string, nullable
  - `device_id` string, uuid, required — Stable client UUID; reuse the chat device UUID in the native app

## Response `201`

Successful Response

- AppOpenResponse
  - `access_id` string, uuid, required
  - `event_id` string, uuid, required
  - `recorded_at` string, date-time, required
  - `created` boolean, required — False when this event_id was already recorded

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/corabea/apis/corabea-api.md) · [All operations](https://skmtc.dev/corabea/apis/corabea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corabea/corabea-api/revisions/13c1bce1bdc4/schema)
