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"
}Create or replace a person
Creates a new person, or fully replaces an existing one when an ID is supplied (in the route or in the body). When creating, the email address must not already be in use. Set the line manager with lineManagerId or lineManagerEmail. Team membership is replaced wholesale: supply either teams (by ID or name) or teamIds (not both) — omitting both removes the person’s manually-assigned teams.
Required scope: People.Write (Write access to people and teams)
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
OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.
Path Parameters
Optional SaaS Manager person ID (UUID) to replace. If omitted a new person is created.
Body
The details used to create or replace a person
The person's SaaS Manager ID. May be supplied here instead of in the route; must match the route id if both are given.
Team memberships by team ID. Mutually exclusive with teams.
Set the line manager by email address. Mutually exclusive with lineManager and lineManagerId.
Set the line manager by SaaS Manager person ID. Mutually exclusive with lineManager and lineManagerEmail.
A free-text employee type (e.g. full-time, part-time). Distinct from personType.
Classifies the person: Employee, Contractor, ServiceAccount or External. Distinct from the free-text employeeType.
Employee, Contractor, ServiceAccount, External Email addresses linked to this person
First name
Last name
Primary email address
Job title
A description of the user's location. A matching location is found or created when set.
Cost center. A matching cost center is found or created when set.
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.
The person's IANA time zone name, e.g. America/New_York
Employee ID
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.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
(ISO format) Date that the person joined the organization. Passing null clears the date.
(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
The person's unique ID
A free-text employee type (e.g. full-time, part-time). Distinct from personType.
Classifies the person: Employee, Contractor, ServiceAccount or External. Distinct from the free-text employeeType.
Employee, Contractor, ServiceAccount, External Email addresses linked to this person
The user's logon name (from integrations)
First name
Last name
Primary email address
Job title
The location's unique identifier (derived from location)
A description of the user's location. A matching location is found or created when set.
The user's country (derived from location)
The IANA time zone name of the user's location, e.g. America/New_York (derived from location)
The ID of the cost center (derived from costCenter)
Cost center. A matching cost center is found or created when set.
The organizational unit, sourced from directory integrations (e.g. Google Workspace, Active Directory).
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.
The person's IANA time zone name, e.g. America/New_York
Employee ID
Phone number
Status (new, terminated, etc)
New, Terminated, Active, Unknown Home address
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
Custom field values
Show child attributes
Show child attributes
(ISO format) Date that the person joined the organization. Passing null clears the date.
(ISO format) Date that the person left the organization or is due to lave. Passing null clears the date.
The user that created the person record
Show child attributes
Show child attributes
The timestamp for when the person record was created
The user that last modified the person record
Show child attributes
Show child attributes
The timestamp for when the person record was last modified
Was this page helpful?