# Upload a facial reference image
Invoke this API to upload a facial reference image to the Feishu backend to be used when comparing images.
Passive face comparison access needs to apply for a whitelist, please contact Feishu open platform staff before accessing, email: open-platform@bytedance.com.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/face_verify/v1/upload_face_image
HTTP Method | POST

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value Format**: "Bearer `access_token`"<br>**Example Value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "multipart/form-data"

### Query parameters
Use either open_id or employee_id. If open_id is passed, it must correspond to the app and tenant for the tenant_access_token. If employee_id is passed, it must correspond to the tenant for the tenant_access_token.
|Parameter|Type|Mandatory|Description|
|--|-----|--|----|
|open_id|string|No|User’s app ID; use this or the employee_id|
|employee_id|string|No|User's ID under the tenant; use this or the open_id|
How to obtain `open_id` and `employee_id` (known as `user_id`) can be found in the document: [How to get ID](https://open.feishu.cn/document/home/user-identity-introduction/open-id)

### Request body
|Parameter|Type|Mandatory|Description|
|--|-----|--|----|
|image|file|Yes|The facial image file containing the user’s face|

## Response

### Response body
|Parameter|Description|
|--|----|
|code|Response code, anything but 0 indicates failure|
|msg|Response information, response code description|
|data|Service data|
|&emsp;∟face_uid |The user UID for the facial image to be returned to the gadget. This UID is used as a parameter when the gadget invokes the facial recognition API.|

### Response body example
```json
{ 
    "code": 0, 
    "msg": "ok", 
    "data": {
        "face_uid": "ou_3a85bc15f186865bf03d9fa522878a53"
    }
}
```

### Error code
|Error code|Description|Troubleshooting suggestions|
|--|-----|--|
|10100|invalid request|check if the request parameter is empty|
|10101|internal error|please retry|