User
All endpoints listed in this doc are not public-accessible and requires token access. (how to get access token)
Create User (unverified by mobile authentication code)
Available after version: Ver5.2023-11-22
Endpoint:
/api/v5/entity/user/createHTTP Method: POST
Request Parameters:
Parameter Type Required Name Description area_codeString Y Area code Area code without "+" from ITU E.164 (http://www.itu.int/dms_pub/itu-t/opb/sp/T-SP-E.164C-2011-PDF-E.pdf) mobileString Y mobile phone number corp_idString Y Corporation ID Access to users in the organization only Response Format & Parameters: JSON
Parameter Type Description user_idString The user's global User ID is_user_existsBoolen Flag if the user has been registered before creation
Bash Example with CURL:
curl -X POST
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
-d '{"area_code": "86", "mobile": "13888888888"}'
<API_SERVICE_HOST>/api/v5/entity/user/create
Example Response
{
"code": 0,
"msg": "success.",
"data": {
"user_id": "5f9b0b1b-5b0b-4b1b-9b0b-1b5b0b4b1b9b",
"is_user_exists": false
}
}
Create User (unverified by email)
This is not a public endpoint and requires token access. (how to get access token)
Available after version: Ver5.2023-11-22
Endpoint:
/api/v5/entity/user/createHTTP Method: POST
Request Parameters:
Parameter Type Required Name Description emailString Y user email corp_idString Y Corporation ID Access to users in the organization only Response Format & Parameters: JSON
Parameter Type Description user_idString The user's global User ID is_user_existsBoolen Flag if the user has been registered before creation
Bash Example with CURL:
curl -X POST
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
-d '{"email": "test@123.com"}'
<API_SERVICE_HOST>/api/v5/entity/user/create
Example Response
{
"code": 0,
"msg": "success.",
"data": {
"user_id": "5f9b0b1b-5b0b-4b1b-9b0b-1b5b0b4b1b9b",
"is_user_exists": false
}
}
Get User Profile
Obtain user identity information, accessible only to the school, for the purpose of generating enrollment forms.
This is not a public endpoint and requires token access. (how to get access token)
Available after version: Ver5.2023-11-01
Endpoint:
/api/v5/entity/profile/fetchHTTP Method: GET
Request Parameters:
Parameter Type Required Name Description corp_idString Y Organization ID Access to users in the organization only user_idString Y User ID Response Format & Parameters: JSON
Parameter Type Description user_idString corp_idString Access to users in the organization only nameString last_nameString Some users can't display last_name due to historical version, please use name first_nameString Some users can't display first_name due to historical version, please use name
Bash Example with CURL
curl -X GET
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
<API_SERVICE_HOST>/api/v5/entity/profile/fetch?corp_id=<CORP_ID>&user_id=<USER_ID>
Example Response
{
"code": 0,
"msg": 'success.',
"data": {
"user_id": <USER_ID>,
"corp_id": <CORP_ID>,
"name": "Amy",
"last_name": "Amy",
"first_name": "Acker",
"area_code": "86",
"mobile": "13888888888",
"gender": None,
"age": 25,
"city": None,
"city_raw": None,
"city_mobile": None,
"company_name": None,
"job_title": None,
"department": None,
"industry": None,
"linkedin_url": None
}
}
Update User's Owners
This endpoint allows updating the ownership of a user entity.
Available after version: Ver5.2024-04-01
Endpoint:
/api/v5/entity/user/owner/updateHTTP Method: POST
Request Body:
Parameter Type Required Name Description user_idString Yes User ID The global User ID of the user entity. owner_idString Yes Owner ID The owner's ID to be updated for the entity. event_typeString Yes Event Type The type of event to perform (add or remove). corp_idString Yes Corporation ID Access to users in the organization only. Response Format & Parameters: JSON
Parameter Type Description user_idString The global User ID of the updated entity. owner_idArray List of owner IDs associated with the entity.
Bash Example with CURL:
curl -X POST
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-d '{"user_id": "12345271d0212345a8c626738985136", "owner_id": "123456789bf421c8b8e3fc642bc3821", "event_type": "add"}'
<API_SERVICE_HOST>/api/v5/entity/user/owner/update
Example Response
{
"code": 0,
"msg": "success.",
"data": {
"user_id": <USER_ID>
"owner_id": [
<OWNER1_ID>,
<OWNER2_ID>,
......
]
}
}
Update User Pool
This endpoint allows updating the pool of a user entity.
Available after version: Ver5.2024-04-01
Endpoint:
/api/v5/entity/user/pool/updateHTTP Method: POST
Request Body:
Parameter Type Required Name Description user_idString Yes User ID The global User ID of the user entity. corp_idString Yes Corporation ID Access to users in the organization only. poolString Yes Pool The pool the entity belongs to, e.g. alive, dead, public Response Format & Parameters: JSON
Parameter Type Description user_idString The global User ID of the updated entity.
Bash Example with CURL:
curl -X POST
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-d '{"user_id": <USER_ID>, "corp_id": <CORP_ID>, "pool": "dead"}'
<API_SERVICE_HOST>/api/v5/entity/user/pool/update
Example Response
{
'code': 0,
'msg': 'success.',
'data': {
'user_id': <USER_ID>
}
}
Update User's Email
This endpoint allows updating the email of a user entity.
Available after version: Ver5.2024-07-25
- Endpoint:
/api/v5/entity/user/email/update - HTTP Method: POST
- Request Body:
| Parameter | Type | Required | Name | Description |
|---|---|---|---|---|
user_id | String | Yes | User ID | The global User ID of the user entity. |
email | String | Yes | The email to be updated for the entity. | |
corp_id | String | Yes | Corporation ID | Access to users in the organization only. |
Response Format & Parameters: JSON
Parameter Type Description user_idString The global User ID of the updated entity.
Bash Example with CURL:
```bash
curl -X POST
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-d '{"user_id": "12345271d0212345a8c626738985136",
"email": "test@123.com",
"corp_id": "123456789bf421c8b8e3fc642bc3821"}'
<API_SERVICE_HOST>/api/v5/entity/user/email/update
```
Example Response
{
"code": 0,
"msg": "success.",
"data": {
"user_id": <USER_ID>
}
}
Fetch User's Email or Phone Number
This endpoint allows fetching the email or phone number of a user entity.
Available after version: Ver5.2025-04-16
- Endpoint:
/api/v5/entity/user/contact/fetch - HTTP Method: GET
- Request Parameters:
| Parameter | Type | Required | Name | Description |
|---|---|---|---|---|
user_id | String | Yes | User ID | The global User ID of the user entity. |
corp_id | String | Yes | Corporation ID | Access to users in the organization only. |
contact_type | String | Yes | Contact Type | The type of contact to fetch (mobile, email, mobile_backup). |
- Response Format & Parameters: JSON
| Parameter | Type | Description |
|---|---|---|
user_id | String | The global User ID of the updated entity. |
corp_id | String | The Corporation ID of the user entity. |
contact_type | String | The type of contact fetched (mobile, email, mobile_backup). |
value | List | The value of the fetched contact. |
Bash Example with CURL
curl -X GET
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
<API_SERVICE_HOST>/api/v5/entity/user/contact/fetch?user_id=<USER_ID>&corp_id=<CORP_ID>&contact_type=mobile
Example Response
{
"code": 0,
"msg": "success.",
"data": {
"user_id": <USER_ID>,
"corp_id": <CORP_ID>,
"contact_type": "mobile",
"value": [
"86","13888888888"
]
}
}