---
id: "zh/api-post-nd-api-enterprise-add-ent-mem"
title: "添加企业成员"
language: "zh"
description: "POST /api/add_ent_mem.do：添加企业成员 接口说明，包含路径、方法、参数和返回信息。"
canonical_url: "https://www.babel.cc/public/babelwiki/zh/api-post-nd-api-enterprise-add-ent-mem.html"
markdown_url: "https://www.babel.cc/public/babelwiki/ai/zh/api-post-nd-api-enterprise-add-ent-mem.md"
alternates: {"en": "https://www.babel.cc/public/babelwiki/ai/en/api-post-nd-api-enterprise-add-ent-mem.md", "zh": "https://www.babel.cc/public/babelwiki/ai/zh/api-post-nd-api-enterprise-add-ent-mem.md"}
reading_note: "文档记录不等于当前部署能力；以实际版本、授权模块与配置为准。保留原文的可选、限制及待确认说明，勿补猜接口。 / Documentation is not a guarantee for every deployment. Preserve optional-module requirements, limitations and unresolved API contracts."
---

# 添加企业成员

| 属性 | 值 |
| --- | --- |
| HTTP 方法 | `POST` |
| 接口路径 | `/api/add_ent_mem.do` |
| 所属分类 | 企业 API |

## 接口说明




#### POST 请求体参数

| 参数 | 类型 | 说明（保留原资料的必填、默认值及范围） |
| --- | --- | --- |
| `email` | `string` | Email 邮箱 |
| `password` | `string` | 密码 |
| `enterprise_role` | `number` | 企业成员角色, 可选 |
| `department_ids[]` | `string[]` | 该用户的部门， 可选 |
| `department_roles[]` | `string[]` | 在部门中的角色， 可选 |
| `sex` | `number` | 性别 0 - 未设置 1 - 男 2 - 女 |
| `name` | `string` | 用户名 |
| `phone` | `string` | 手机号， 可选 |
| `babelId` | `string` | 工号，可选 |
| `spacelimit` | `number` | 个人空间限制，单位 GB, 0 表示不限制 |
| `can_ownfile` | `number` | 用户能否拥有个人文件， -1 - 使用企业总体设置, 0 - 没有个人文件, 1 - 有个人文件 |
| `remarks` | `string` | 用户描述， 可选 |
| `join_time` | `number` | 用户加入企业时间，Unix time, 单位秒 |
| `password_is_md5` | `number` | 传入密码是否需要 md5 加密, 0 非 md5 密码， 1 md5 加密过的密码 |

#### 返回信息 {#response-status}

添加企业成员的业务结果如下。

成功：

```json
{"code":0,"success":true}
```

失败：

```json
{"code":2,"success":false}
```

## 调用说明

- 调用前需完成 [获取 token](https://www.babel.cc/public/babelwiki/zh/api-post-api-token-do.html) 或相应免登录认证，并在请求 Header 中携带 `Authorization: Bearer <access_token>`。
- 参数和返回字段如因部署版本存在差异，应以实际私有云 API 文档和联调结果为准。
- 所属分类：企业 API。
