Skip to main content

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/create

  • HTTP Method: POST

  • Request Parameters:

    ParameterTypeRequiredNameDescription
    area_codeStringYArea codeArea code without "+" from ITU E.164 (http://www.itu.int/dms_pub/itu-t/opb/sp/T-SP-E.164C-2011-PDF-E.pdf)
    mobileStringYmobile phone number
    corp_idStringYCorporation IDAccess to users in the organization only
  • Response Format & Parameters: JSON

    ParameterTypeDescription
    user_idStringThe user's global User ID
    is_user_existsBoolenFlag 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/create

  • HTTP Method: POST

  • Request Parameters:

    ParameterTypeRequiredNameDescription
    emailStringYuser email
    corp_idStringYCorporation IDAccess to users in the organization only
  • Response Format & Parameters: JSON

    ParameterTypeDescription
    user_idStringThe user's global User ID
    is_user_existsBoolenFlag 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/fetch

  • HTTP Method: GET

  • Request Parameters:

    ParameterTypeRequiredNameDescription
    corp_idStringYOrganization IDAccess to users in the organization only
    user_idStringYUser ID
  • Response Format & Parameters: JSON

    ParameterTypeDescription
    user_idString
    corp_idStringAccess to users in the organization only
    nameString
    last_nameStringSome users can't display last_name due to historical version, please use name
    first_nameStringSome 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/update

  • HTTP Method: POST

  • Request Body:

    ParameterTypeRequiredNameDescription
    user_idStringYesUser IDThe global User ID of the user entity.
    owner_idStringYesOwner IDThe owner's ID to be updated for the entity.
    event_typeStringYesEvent TypeThe type of event to perform (add or remove).
    corp_idStringYesCorporation IDAccess to users in the organization only.
  • Response Format & Parameters: JSON

    ParameterTypeDescription
    user_idStringThe global User ID of the updated entity.
    owner_idArrayList 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/update

  • HTTP Method: POST

  • Request Body:

    ParameterTypeRequiredNameDescription
    user_idStringYesUser IDThe global User ID of the user entity.
    corp_idStringYesCorporation IDAccess to users in the organization only.
    poolStringYesPoolThe pool the entity belongs to, e.g. alive, dead, public
  • Response Format & Parameters: JSON

    ParameterTypeDescription
    user_idStringThe 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:
ParameterTypeRequiredNameDescription
user_idStringYesUser IDThe global User ID of the user entity.
emailStringYesEmailThe email to be updated for the entity.
corp_idStringYesCorporation IDAccess to users in the organization only.
  • Response Format & Parameters: JSON

    ParameterTypeDescription
    user_idStringThe 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:
ParameterTypeRequiredNameDescription
user_idStringYesUser IDThe global User ID of the user entity.
corp_idStringYesCorporation IDAccess to users in the organization only.
contact_typeStringYesContact TypeThe type of contact to fetch (mobile, email, mobile_backup).
  • Response Format & Parameters: JSON
ParameterTypeDescription
user_idStringThe global User ID of the updated entity.
corp_idStringThe Corporation ID of the user entity.
contact_typeStringThe type of contact fetched (mobile, email, mobile_backup).
valueListThe 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"
]
}
}