---
title: Delete Message
framework: retentionmessaging
role: symbol
role_heading: Web Service Endpoint
path: retentionmessaging/delete-message
---

# Delete Message

Deletes a previously uploaded message.

## URL

DELETE https://api.storekit.apple.com/inApps/v1/messaging/message/{messageIdentifier}

## Sandbox URL

DELETE https://api.storekit-sandbox.apple.com/inApps/v1/messaging/message/{messageIdentifier}

## Path Parameters

messageIdentifier: The identifier of the message to delete.

## Response Codes

200 OK: Request succeeded. 400 Bad Request: The request is invalid and unacceptable. 401 Unauthorized: The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests. 404 Not Found: The system can’t find the message. 429 : The request exceeded the rate limit. For more information, see Identifying rate limits. 500 Internal Server Error: Server error. Try again later.

## Mentioned in

Identifying rate limits

## Discussion

Discussion Call this endpoint to delete a message. After successfully deleting the message, its messageIdentifier no longer exists. To avoid errors, don’t use the messageIdentifier of deleted messages in RealtimeResponseBody when your server replies to the Get Retention Message endpoint. note: This endpoint isn’t idempotent. If the system doesn’t find the message, this endpoint throws an error. To delete an image associated with a message, call Delete Image after you delete the message.

## See Also

### Message configuration

- [Upload Message](retentionmessaging/upload-message.md)
- [Get Message List](retentionmessaging/get-message-list.md)
- [UploadMessageRequestBody](retentionmessaging/uploadmessagerequestbody.md)
- [UploadMessageImage](retentionmessaging/uploadmessageimage.md)
- [GetMessageListResponse](retentionmessaging/getmessagelistresponse.md)
- [GetMessageListResponseItem](retentionmessaging/getmessagelistresponseitem.md)
