---
title: "Track an in-app message open"
method: POST
path: "/api/events/trackInAppOpen"
tags: ["events"]
---

# Track an in-app message open

`POST /api/events/trackInAppOpen`

Creates an inAppOpen event for the specified user and message, and marks the message as having been read. When not using one of Iterable’s mobile SDKs, call this endpoint when a mobile app displays an in-app message to a user.<br/><br/>Learn about <a href="https://support.iterable.com/hc/articles/29156459027348">identifying users by <code>userId</code> and <code>email</code></a>.

## Request body

- InAppOpenRequest
  - `createdAt` integer — Time event happened. Set to the time event was received if unspecified. Expects a Unix timestamp.
  - `deviceInfo` DeviceInfo
    - `appPackageName` string, required — Package name of the app.
    - `deviceId` string, required — Device unique identifier.
    - `platform` 'iOS' | 'Android' | 'Web', required — Device platform (case-sensitive).
  - `email` string — An email address that identifies a user profile in Iterable. Provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.
  - `messageContext` InboxMessageContext
    - `location` string — Where the event occurred: <code>in-app</code>, <code>inbox</code>, or a custom value (string).
    - `saveToInbox` boolean — Whether or not the message associated with the event was configured to be stored in the inbox
    - `silentInbox` boolean — Whether or not the message associated with the event was configured to send directly to the inbox
  - `messageId` string, required — The ID of the message associated with the event
  - `userId` string — A user ID that identifies a user profile in Iterable. Provide an <code>email</code> or a <code>userId</code> (but not both), depending on <a href="https://support.iterable.com/hc/articles/29156459027348">how your project identifies users</a>.

## Response `200`

successful operation

## Other responses

- `400` — Invalid parameters
- `401` — Invalid API key

---

[API](https://skmtc.net/iterable/apis/iterable-api.md) · [All operations](https://skmtc.net/iterable/apis/iterable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/iterable/iterable-api/revisions/afaab604b58c/schema)
