Skip to main content
PATCH
/
api
/
people
/
v1
/
{id}
Update selected details of a person
curl --request PATCH \
  --url https://app.trelica.com/api/people/v1/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jobTitle": "Senior Customer Success Manager",
  "costCenter": "Customer Success",
  "lineManagerEmail": "jane.smith@example.com"
}
'
{
  "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

The person's SaaS Manager ID (UUID) or an email address.

Body

application/json

Selected person fields to update. Omitted fields are left unchanged; fields set to null are cleared.

firstName
string | null

First name

lastName
string | null

Last name

email
string | null

Primary email address

aliases
string[] | null

Additional email addresses linked to this person

employeeId
string | null

Employee ID

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
jobTitle
string | null

Job title

location
string | null

A description of the person's location. A matching location is found or created.

costCenter
string | null

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

startDate
string<date-time> | null

(ISO format) Date the person joined the organization. Pass null to clear.

leavingDate
string<date-time> | null

(ISO format) Date the person left, or is due to leave, the organization. Pass null to clear.

loginName
string | null

The person's login name on the local domain, used by the Browser Extension Helper.

teamIds
string[] | null

Replace the person's team memberships by team ID. Mutually exclusive with teams.

teams
object[] | null

Replace the person's team memberships by team (ID or name). Mutually exclusive with teamIds.

lineManagerEmail
string | null

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

lineManagerId
string | null

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

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