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

# Delete in-app message

> Permanently delete an in-app message by its UUID. Deletion cannot be undone. Pause the in-app message instead if you need to keep it and its stats.

## Overview

Permanently delete an [in-app message](https://documentation.onesignal.com/docs/en/in-app-messages-setup.md) by its UUID.

> [!CAUTION]
>
> Deletion is permanent and cannot be undone. To stop showing an in-app message and keep it, pause it with [Pause or resume in-app message](https://documentation.onesignal.com/reference/pause-or-resume-in-app-message.md) instead.

An in-app message used by a [Journey](https://documentation.onesignal.com/docs/en/journeys-overview.md) cannot be deleted. The request returns `400 Bad Request` with the error `In-App Message is used by a Journey and cannot be deleted`, and the in-app message is kept.

***

## How to use this API

Authenticate with your [App API Key](https://documentation.onesignal.com/docs/en/keys-and-ids.md). Find an in-app message's `id` from the [View in-app messages](https://documentation.onesignal.com/reference/view-in-app-messages.md) API.

```http theme={null}
DELETE /apps/{app_id}/in_app_messages/{id}
```

## Response

A successful request returns `200 OK` with a confirmation body:

```json theme={null}
{
  "success": true,
  "payload": { "success": true }
}
```


## OpenAPI

````yaml DELETE /apps/{app_id}/in_app_messages/{id}
openapi: 3.1.0
info:
  title: api.onesignal.com
  version: '11.6'
servers:
  - url: https://api.onesignal.com
security:
  - {}
paths:
  /apps/{app_id}/in_app_messages/{id}:
    delete:
      summary: Delete in-app message
      description: >-
        Permanently delete an in-app message by its UUID. Deletion cannot be
        undone. An in-app message used by a Journey cannot be deleted.
      operationId: delete-in-app-message
      parameters:
        - name: app_id
          in: path
          description: >-
            Your OneSignal App ID in UUID v4 format. See [Keys &
            IDs](/docs/en/keys-and-ids).
          schema:
            type: string
            default: YOUR_APP_ID
          required: true
        - name: id
          in: path
          description: UUID of the in-app message to delete.
          required: true
          schema:
            type: string
            default: YOUR_IN_APP_MESSAGE_ID
        - name: Authorization
          in: header
          description: >-
            Your App API key with prefix `Key `. See [Keys &
            IDs](/docs/en/keys-and-ids).
          required: true
          schema:
            type: string
            default: Key YOUR_APP_API_KEY
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: '`true` when the request succeeded.'
                  payload:
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: '`true` when the in-app message was deleted.'
              example:
                success: true
                payload:
                  success: true
        '400':
          description: The in-app message could not be deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppMessageErrorResponse'
              example:
                success: false
                errors:
                  - In-App Message is used by a Journey and cannot be deleted
        '401':
          description: >-
            The API key is missing or invalid, or belongs to another app or
            organization. This body has no `success` key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicErrorResponse'
              example:
                errors:
                  - >-
                    Access denied.  Please include an 'Authorization: ...'
                    header with a valid API key
                    (https://documentation.onesignal.com/docs/en/keys-and-ids#api-keys).
        '404':
          description: No in-app message with that `id` exists for this app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppMessageErrorResponse'
              example:
                success: false
                errors:
                  - In-App Message not found
        '429':
          description: >-
            Rate limit exceeded. Requests to this path are blocked for 60
            seconds. This body has no `success` key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                  limit:
                    type: string
                    description: Name of the rate limit that was exceeded.
              example:
                errors:
                  - API rate limit exceeded
                limit: API Per App
components:
  schemas:
    InAppMessageErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Always `false`.
        errors:
          type: array
          items:
            type: string
          description: >-
            Every problem found with the request. Field-level errors start with
            the quoted field name, for example `'name' Message name required`.
    BasicErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: One or more human-readable error messages.
        success:
          type: boolean
          description: >-
            Present (and `false`) on some endpoints (notifications, templates,
            segments). Not emitted by every endpoint.
        reference:
          type: array
          items:
            type: string
          description: >-
            Documentation URL fragments related to the error. Only emitted by
            the API-key auth error helpers.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.