Skip to main content
PUT
/
api
/
people
/
v1
/
{id}
Create or replace a person
curl --request PUT \
  --url https://app.trelica.com/api/people/v1/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamIds": [
    "65207c3ffa0d2abb07955316"
  ],
  "lineManagerEmail": "jane.smith@example.com",
  "employeeType": "Full-time",
  "personType": "Employee",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "jobTitle": "Customer Success Manager",
  "location": "London, UK",
  "costCenter": "Customer Success",
  "employeeId": "123",
  "status": "New",
  "startDate": "2021-06-01T00:00:00Z"
}
'
{
  "id": "123e4567e89b12d3a456426614174000",
  "employeeType": "Part-time",
  "personType": "Employee",
  "aliases": [
    "john.doe@example.com",
    "john@example.com",
    "j.doe@example.com",
    "johnny.d@example.com"
  ],
  "userName": "johndoe123",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "jobTitle": "Customer Success Manager",
  "organizationalUnit": "/",
  "loginName": "johndoe",
  "employeeId": "123",
  "status": "Active",
  "lineManager": {
    "id": "765e4321b98e21d3b456426614174000",
    "personType": "User",
    "name": "Jane Smith",
    "email": "jane.smith@example.com"
  },
  "teams": [
    {
      "id": "65207c3ffa0d2abb07955316",
      "name": "Customer Success"
    }
  ],
  "createdBy": {
    "userId": "321cba98-765e-4321-0d3b-456789abcdef",
    "name": "System",
    "email": "admin@example.com"
  },
  "createdDtm": "2020-03-09T06:09:26Z",
  "lastModifiedBy": {
    "userId": "321cba98-765e-4321-0d3b-456789abcdef",
    "name": "System",
    "email": "admin@example.com"
  },
  "lastModifiedDtm": "2024-05-26T01:01:43Z"
}

Authorizations

Authorization
string
header
required

OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.

Path Parameters

id
string
required

Optional SaaS Manager person ID (UUID) to replace. If omitted a new person is created.

Body

application/json

The details used to create or replace a person

id
string | null

The person's SaaS Manager ID. May be supplied here instead of in the route; must match the route id if both are given.

teamIds
string[] | null

Team memberships by team ID. Mutually exclusive with teams.

lineManagerEmail
string | null

Set the line manager by email address. Mutually exclusive with lineManager and lineManagerId.

lineManagerId
string | null

Set the line manager by SaaS Manager person ID. Mutually exclusive with lineManager and lineManagerEmail.

employeeType
string | null

A free-text employee type (e.g. full-time, part-time). Distinct from personType.

personType
enum<string>

Classifies the person: Employee, Contractor, ServiceAccount or External. Distinct from the free-text employeeType.

Available options:
Employee,
Contractor,
ServiceAccount,
External
aliases
string[] | null

Email addresses linked to this person

firstName
string | null

First name

lastName
string | null

Last name

email
string | null

Primary email address

jobTitle
string | null

Job title

location
string | null

A description of the user's location. A matching location is found or created when set.

costCenter
string | null

Cost center. A matching cost center is found or created when set.

loginName
string | null

The person's login name on the local domain. Used in conjunction with the SaaS Manager Browser Extension Helper to determine the identity of the logged in user.

timezone
string | null

The person's IANA time zone name, e.g. America/New_York

employeeId
string | null

Employee ID

lineManager
object

The person's line manager. On input, set it by the line manager's id or email (other fields are ignored); alternatively use lineManagerId or lineManagerEmail. These three forms are mutually exclusive.

teams
object[] | null

The teams the person belongs to. When creating or replacing, supply teams by ID, or by name (a team is created if the name is not found); mutually exclusive with teamIds.

startDate
string<date-time> | null

(ISO format) Date that the person joined the organization. Passing null clears the date.

leavingDate
string<date-time> | null

(ISO format) Date that the person left the organization or is due to lave. Passing null clears the date.

Response

OK

A SaaS Manager person

id
string

The person's unique ID

employeeType
string

A free-text employee type (e.g. full-time, part-time). Distinct from personType.

personType
enum<string>

Classifies the person: Employee, Contractor, ServiceAccount or External. Distinct from the free-text employeeType.

Available options:
Employee,
Contractor,
ServiceAccount,
External
aliases
string[]

Email addresses linked to this person

userName
string

The user's logon name (from integrations)

firstName
string

First name

lastName
string

Last name

email
string

Primary email address

jobTitle
string

Job title

locationId
string

The location's unique identifier (derived from location)

location
string

A description of the user's location. A matching location is found or created when set.

locationCountryCode
string

The user's country (derived from location)

locationTimezone
string

The IANA time zone name of the user's location, e.g. America/New_York (derived from location)

costCenterId
string

The ID of the cost center (derived from costCenter)

costCenter
string

Cost center. A matching cost center is found or created when set.

organizationalUnit
string

The organizational unit, sourced from directory integrations (e.g. Google Workspace, Active Directory).

loginName
string

The person's login name on the local domain. Used in conjunction with the SaaS Manager Browser Extension Helper to determine the identity of the logged in user.

timezone
string

The person's IANA time zone name, e.g. America/New_York

employeeId
string

Employee ID

phoneNumber
string

Phone number

status
enum<string>

Status (new, terminated, etc)

Available options:
New,
Terminated,
Active,
Unknown
personalAddress
object

Home address

lineManager
object

The person's line manager. On input, set it by the line manager's id or email (other fields are ignored); alternatively use lineManagerId or lineManagerEmail. These three forms are mutually exclusive.

teams
object[]

The teams the person belongs to. When creating or replacing, supply teams by ID, or by name (a team is created if the name is not found); mutually exclusive with teamIds.

customFields
object

Custom field values

startDate
string<date-time>

(ISO format) Date that the person joined the organization. Passing null clears the date.

leavingDate
string<date-time>

(ISO format) Date that the person left the organization or is due to lave. Passing null clears the date.

createdBy
object

The user that created the person record

createdDtm
string<date-time>

The timestamp for when the person record was created

lastModifiedBy
object

The user that last modified the person record

lastModifiedDtm
string<date-time>

The timestamp for when the person record was last modified