Person Group Operations - Create Person Group Person

Create a new person in a specified Person Group. To add face to this person, please call "Add Person Group Person Face".

Note

    • Free-tier subscription quota:
      • 1,000 persons in all Person Groups.
    • S0-tier subscription quota:
      • 10,000 persons per Person Group.
      • 1,000,000 Person Groups.
      • 100,000,000 persons in all Person Groups.
POST {endpoint}/face/{apiVersion}/persongroups/{personGroupId}/persons

URI Parameters

Name In Required Type Description
apiVersion
path True

string

API Version

endpoint
path True

string

uri

Supported Cognitive Services endpoints (protocol and hostname, for example: https://{resource-name}.cognitiveservices.azure.com).

personGroupId
path True

string

ID of the container.

Regex pattern: ^[a-z0-9-_]+$

Request Body

Name Required Type Description
name True

string

User defined name, maximum length is 128.

userData

string

Optional user defined data. Length should not exceed 16K.

Responses

Name Type Description
200 OK

CreatePersonResult

A successful call returns a new personId created.

Other Status Codes

FaceErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

Ocp-Apim-Subscription-Key

The secret key for your Azure AI Face subscription.

Type: apiKey
In: header

AADToken

The Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: accessCode
Authorization URL: https://api.example.com/oauth2/authorize
Token URL: https://api.example.com/oauth2/token

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Examples

Create Person in PersonGroup

Sample request

POST {endpoint}/face/v1.1-preview.1/persongroups/your_person_group_id/persons

{
  "name": "your_person_group_person_name",
  "userData": "your_user_data"
}

Sample response

{
  "personId": "25985303-c537-4467-b41d-bdb45cd95ca1"
}

Definitions

Name Description
CreatePersonResult

Response of create person.

FaceError

The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.

FaceErrorResponse

A response containing error details.

CreatePersonResult

Response of create person.

Name Type Description
personId

string

Person ID of the person.

FaceError

The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.

Name Type Description
code

string

One of a server-defined set of error codes.

message

string

A human-readable representation of the error.

FaceErrorResponse

A response containing error details.

Name Type Description
error

FaceError

The error object.