---
title: "Add a user-face"
method: POST
path: "/user-face/"
tags: ["user-face"]
---

# Add a user-face

`POST /user-face/`

This method allows to create a user-face object.
 **User-face** is an object that contains source photo, thumbnail, etc

## Request body

- UserFaceRequest
  - `create_from` string — This field can contain one of the following references: - `detection:<detection id>`: use a `Detection` object (obtained with the `POST /detect`) to select a object on `source_photo`. (`source_photo` must contain the same image that was used for `POST /detect`) - `{face, body, or car}event:<event id>`: create new `Object` from an `Event` (`source_photo` must be empty) - `{face, body, or car}object:<object id>`: use another `Object` as a template for this object (`source_photo` must be empty)
  - `detect_id` string — *This parameter is left only for compatibility reasons. Do not use it.*
  - `mf_selector` 'biggest' | 'reject'
  - `source_photo` string, binary — Source photo (**required** when `create_from` points to a `Detection` or empty)
  - `frame_coords_left` integer — Left border of object's bounding box
  - `frame_coords_top` integer — Top border of object's bounding box
  - `frame_coords_right` integer — Right border of object's bounding box
  - `frame_coords_bottom` integer — Bottom border of object's bounding box
  - `user` integer, required — Related `User` ID

## Response `201`

- UserFaceUpdate
  - `id` string, required
  - `created_date` string, date-time, required — Object creation date
  - `modified_date` string, date-time, required — Object modification date
  - `source_photo_name` string, required — Filename supplied for `source_photo` on object creation
  - `frame_coords_left` integer — Left border of object's bounding box
  - `frame_coords_top` integer — Top border of object's bounding box
  - `frame_coords_right` integer — Right border of object's bounding box
  - `frame_coords_bottom` integer — Bottom border of object's bounding box
  - `thumbnail` string, uri, required — Object thumbnail
  - `features` object, required
  - `user` integer, required — Related `User` ID

---

[API](https://skmtc.dev/ntechlab/apis/internal-api-documentation.md) · [All operations](https://skmtc.dev/ntechlab/apis/internal-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ntechlab/internal-api-documentation/revisions/fe217a895bc7/schema)
