Create Person

POST /people

Group: People Management › People · Operation ID: createPerson

Creates a person. The response is only the new person's id, so read the full record with GET people/:id.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: createPersonInput.

Field Type Required Description
person object yes The person's personal details.
person.firstName string yes The person's first name.
person.lastName string yes The person's last name.
person.email string yes The person's work email address.
person.startDate string yes The employment start date. Use format YYYY-MM-DD.
person.endDate string no The employment end date. Use format YYYY-MM-DD.
person.middleName string no The person's middle name.
person.gender string no The person's self-identified gender. Any string value is accepted.
person.dateOfBirth string no The person's date of birth. Use format YYYY-MM-DD.
person.nationality string no The person's nationality. Format ISO 3166-1 alpha-2, for example 'US'.
employee object yes The person's employment details.
employee.entityId string yes The identifier of the legal entity this person belongs to. See id on GET base/entities.
employee.personalEmail string no The person's personal email address.
employee.employmentCategory string no The person's employment category.
employee.holidayCalendarId string no The identifier of the holiday calendar. Required when absencePolicies is provided. There is no endpoint for it.
job object yes The person's job assignment details.
job.departmentId string yes The identifier of the department. See id on GET departments/:id.
job.positionId string no The identifier of the position. See id on GET positions/:id.
job.jobManagerId string no The identifier of the manager's job assignment, which is the manager's job id and not their person id. There is no endpoint for it.
address object no The person's home address.
address.line1 string yes The first address line: street number and name, or PO box.
address.line2 string no The second address line: apartment, suite, unit, building or floor.
address.city string yes The city or locality.
address.country string yes The country. Format ISO 3166-1 alpha-2, for example 'US'.
address.stateProvince string no The state, province or region.
address.zipCode string yes The postal or ZIP code.
absencePolicies array of object no The absence policies assigned to the person.
absencePolicies[].absencePolicyId string yes The identifier of the absence policy. There is no endpoint for it.
externalIdentifiers array of object no The external identifiers owned by other systems, as the whole initial set. At most one entry per fieldName. Two entries with the same fieldName fail with DUPLICATE_EXTERNAL_IDENTIFIER, and a fieldName with no configuration fails with UNKNOWN_EXTERNAL_IDENTIFIER, which lists every unrecognized key.
externalIdentifiers[].fieldName string yes The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the call fails with UNKNOWN_EXTERNAL_IDENTIFIER.
externalIdentifiers[].value string yes The identifier as the source system holds it.
externalIdentifiers[].externalUrl string no An absolute http(s) link to the object in the source system.

Example:

{
  "person": {
    "firstName": "<firstName>",
    "lastName": "<lastName>",
    "email": "<email>",
    "startDate": "<startDate>",
    "endDate": "<endDate>",
    "middleName": "<middleName>",
    "gender": "<gender>",
    "dateOfBirth": "<dateOfBirth>",
    "nationality": "<nationality>"
  },
  "employee": {
    "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "personalEmail": "<personalEmail>",
    "employmentCategory": "<employmentCategory>",
    "holidayCalendarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "job": {
    "departmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "positionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "jobManagerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "address": {
    "line1": "<line1>",
    "line2": "<line2>",
    "city": "<city>",
    "country": "<country>",
    "stateProvince": "<stateProvince>",
    "zipCode": "<zipCode>"
  },
  "absencePolicies": [
    {
      "absencePolicyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ],
  "externalIdentifiers": [
    {
      "fieldName": "<fieldName>",
      "value": "<value>",
      "externalUrl": "<externalUrl>"
    }
  ]
}

Response

200 Success

Under data (createPersonOutput):

Field Type Required Description
id string yes The unique identifier for the created person.

Response headers

Errors

Code Status
ENTITY_NOT_FOUND 400
DEPARTMENT_NOT_FOUND 400
POSITION_NOT_FOUND 400
MANAGER_NOT_FOUND 400
HOLIDAY_CALENDAR_NOT_FOUND 400
HOLIDAY_CALENDAR_REQUIRED 400
ABSENCE_POLICY_NOT_FOUND 400
UNKNOWN_EXTERNAL_IDENTIFIER 400
DUPLICATE_EXTERNAL_IDENTIFIER 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses