---
title: "Consume or delete an in-app message"
method: POST
path: "/api/events/inAppConsume"
tags: ["events"]
---

# Consume or delete an in-app message

`POST /api/events/inAppConsume`

Consumes or deletes an in-app message from the server. Use this API if your app does not use one of Iterable’s mobile SDKs, since they call it automatically. If an incoming in-app message is not configured to use the mobile inbox, use this API to "consume" it from the server queue after the user sees it. Otherwise, call this API when the user explicitly deletes an inbox-enabled message (by clicking a delete button in its content, swiping it in the inbox, etc.). If you pass a deleteAction value to this endpoint, Iterable generates an inAppDelete event; otherwise, it does not.<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

- InAppConsumeRequest
  - `createdAt` integer — Time event happened. Set to the time event was received if unspecified. Expects a Unix timestamp.
  - `deleteAction` string — How the message was deleted (for example, <code>inbox-swipe</code>, <code>delete-action</code>, or a custom value).
  - `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)
