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

# Mobile Observe API

> Mobile observation ingestion used by the official Flutter and React Native SDKs.

Mobile observation ingestion used by the official Flutter and React Native SDKs. The endpoint is supplied to the SDK at initialization.

Authentication: `mobile_app_key`. Every operation below is traced to an official SDK source file listed in the generated coverage report.

| Method | SDK route                  | SDK method                | Request type        | Response type    |
| ------ | -------------------------- | ------------------------- | ------------------- | ---------------- |
| `POST` | `/observe/{appKey}/events` | `StackShiftObserve.flush` | `ObserveEventBatch` | `empty response` |

## Error envelope

Non-2xx responses use the StackShift response envelope. Check `success: false`, then read the structured `error` value and HTTP status. SDK clients surface the status, code, message, and details through their native error type.

## Examples

These static examples show the verified route and authentication boundary. Use the official SDK method shown in each heading so serialization and response unwrapping remain consistent with the contract.

### `POST /observe/{appKey}/events`

The SDK sends this request to the endpoint supplied by your application. StackShift does not publish a universal mobile endpoint in this reference.

```typescript theme={null}
await StackShiftObserve.init({ appKey: 'my-app', endpoint: process.env.STACKSHIFT_OBSERVE_ENDPOINT!, appVersion: '1.4.0' })
await StackShiftObserve.flush()
```

The SDK sends a JSON batch to `/observe/{appKey}/events` and authenticates with the `appKey` path value. A successful ingestion returns `2xx` with no response body.
