Files
mipu-open/docs/11-04_mailbox-domain-delete.md
杨柳杰 b450b512a2 init: mipu-open 对外开放项目统一管理仓库
- 添加 mipu-api 作为 git submodule (Claude Code Skill)
- 迁移 API 文档源文件到 docs/ 目录统一维护
- 添加 Gitea Actions 工作流:tag推送自动打包docs并发布Release
- Skill 运行时自动从 mipu-open Release 下载最新文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 12:16:08 +08:00

96 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- mipuyun-api-doc: mailbox-domain-delete -->
# mailbox/domain/delete - 删除域名
# 删除域名(mailbox/domain/delete) API 说明文档
## 使用场景
> 1. 企业不再需要使用某个域名作为邮箱域名
> 1. 域名配置错误,需要删除后重新申请
## 错误场景(不应该使用本接口的场景)
> 1. 域名下仍有活跃的邮箱账户(需要先删除邮箱账户)
> 1. 域名不属于当前客户(权限不足)
> 1. 域名ID不存在
## 性能指标
> - 响应速度98% 的请求响应速度 < 1000ms
## 请求说明
| **请求地址** | https://${endpoint}/mailbox/domain/delete |
| --- | --- |
| **请求方法** | POST |
## 请求参数
### Header
| **参数名称** | **类型** | **是否必选** | **示例值** | **说明** |
| --- | --- | --- | --- | --- |
| Content-Type | String | 是 | application/json | 固定值,指定请求体格式为 JSON |
| Accept-Encoding | String | 是 | gzip, deflate, br | 必须要填写,否则服务器会拒绝 |
| client-key | String | 是 | xxxxx | 联系我们获取生产环境key |
| client-secret | String | 是 | xxxxx | 联系我们获取生产环境secret |
### 请求体
```json
{
"domainId": 123
}
```
#### 参数详情
| **参数名称** | **类型** | **是否必选** | **示例值** | **说明** |
| --- | --- | --- | --- | --- |
| domainId | Long | 是 | 123 | 要删除的域名ID |
## 返回参数
| **参数名称** | **类型** | **示例值** | **说明** |
| --- | --- | --- | --- |
| code | Integer | 0 | 状态码0=成功1=失败 |
| msg | String | Domain deleted successfully | 操作结果消息 |
| domainId | Long | 123 | 被删除的域名ID |
## 返回示例
成功响应:
```json
{
"code": 0,
"msg": "Domain deleted successfully",
"domainId": 123
}
```
失败响应:
```json
{
"code": 1,
"msg": "Failed to delete domain",
"domainId": 123
}
```
## 注意事项
> - 删除域名是不可逆操作,请谨慎操作
> - 删除前请确保该域名下没有关联的邮箱账户
> - 删除后,该域名的所有邮箱服务将停止
## 错误码说明
| **错误码** | **说明** |
| --- | --- |
| 400 | 请求参数错误domainId 格式不正确 |
| 401 | 认证失败client-key 或 client-secret 无效 |
| 403 | 权限不足,无权删除该域名 |
| 404 | 域名不存在 |
| 409 | 域名下仍有活跃的邮箱账户,无法删除 |
| 500 | 服务器内部错误 |