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

# DELETE (/users/xuid({xuid})/inbox/{messageId})

> DELETE (/users/xuid({xuid})/inbox/{messageId})

# DELETE (/users/xuid({xuid})/inbox/{messageId})

删除用户收件箱中的用户消息。
这些 URI 的域为 `msg.xboxlive.com`。

* [备注](#ID4EV)
* [URI 参数](#ID4ECB)
* [授权](#ID4EPB)
* [请求正文](#ID4E1B)
* [HTTP 状态代码](#ID4EHC)
* [JavaScript 对象表示法 (JSON) 响应](#ID4EAE)
* [隐私设置对资源的影响](#ID4EYF)

## 备注

删除操作是幂等的。

此 API 支持的唯一内容类型是 “application/json”,每次调用的 HTTP 标头中都需要此内容类型。

## URI 参数

| 参数 | 类型 | 说明 |
| - | - | - |
| xuid | 64 位无符号整数 | 发出请求的玩家的 XBOX User ID (XUID)。 |
| messageId | string\[50] | 正在检索或删除的消息的 ID。 |

## 授权

必须具有自己的用户声明才能删除用户消息。

## 请求正文

此请求的正文中不发送任何对象。

## HTTP 状态代码

服务针对使用此方法对此资源发出的请求,返回本节中的某个状态代码。有关与 XBOX Live 服务一同使用的标准 HTTP 状态代码的完整列表,请参见 [标准 HTTP 状态代码](https://devdocs.xbox.com/zh-CN/reference/live/rest/additional/httpstatuscodes)。

\| 代码 | 说明 |
\| --- | --- | --- | --- | --- |
\| 204 | 成功。 |
\| 403 | 无法转换 XUID 或找不到有效的 XUID 声明。 |
\| 404 | 无法解析 URI 中的消息 ID,或 URI 中缺少 XUID。 |
\| 500 | 常规服务器端错误。 |

## JavaScript 对象表示法 (JSON) 响应

出错时,服务可能返回 errorResponse 对象,其中可能包含来自服务环境的值。

\| 属性 | 类型 | 说明 |
\| --- | --- | --- | --- | --- | --- | --- | --- |
\| errorSource | string | 错误来源的指示。 |
\| errorCode | int | 与错误关联的数字代码(可以为 null)。 |
\| errorMessage | string | 如果配置为显示详细信息,则显示错误的详细信息。 |

## 隐私设置对资源的影响

只有你自己可以删除自己的用户消息。

## 另请参阅

##### 父主题

[/users/xuid({xuid})/inbox](https://devdocs.xbox.com/zh-CN/reference/live/rest/uri/users/uri-usersxuidinbox)

##### 参考资料  [标准 HTTP 状态代码](https://devdocs.xbox.com/zh-CN/reference/live/rest/additional/httpstatuscodes)


## Related topics

- [XblAchievementsGetAchievementsForTitleIdAsync](https://devdocs.xbox.com/zh-TW/reference/live/xsapi-c/achievements_c/functions/xblachievementsgetachievementsfortitleidasync.md)
- [XblAchievementsUpdateAchievementForTitleIdAsync](https://devdocs.xbox.com/zh-TW/reference/live/xsapi-c/achievements_c/functions/xblachievementsupdateachievementfortitleidasync.md)
