Skip to content
GbàlejòDocs

Directory

Change an employee

PATCH/api/v1/employees/{employeeId}
Scope: employees:write

Change someone in the directory: only the fields sent change. Send active: false to deactivate them (there is no delete), true to bring them back.

Example request

curl
curl -X PATCH https://api.gbalejo.com/api/v1/employees/9e7b3f2a-1d5c-4e8b-a4f7-3b6d2c9e1a74 \
  -H "Authorization: Bearer $GBALEJO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "department": "Finance",
  "title": "Head of Finance"
}'
JavaScript
const response = await fetch('https://api.gbalejo.com/api/v1/employees/9e7b3f2a-1d5c-4e8b-a4f7-3b6d2c9e1a74', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.GBALEJO_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    department: 'Finance',
    title: 'Head of Finance',
  }),
});
// Problems come back as application/problem+json: type, title, status, detail.
if (!response.ok) throw new Error((await response.json()).detail);
const result = await response.json();

Example response

200 OK
JSON
{
  "id": "9e7b3f2a-1d5c-4e8b-a4f7-3b6d2c9e1a74",
  "name": "Chiamaka Eze",
  "email": "chiamaka.eze@lagoonpoint.com",
  "phone": "+2348025550147",
  "department": "Finance",
  "title": "Head of Finance",
  "siteId": "1c4f6a3e-9d2b-4e7a-8f1c-5a3b7d9e2c61",
  "active": true,
  "notifyBy": [
    "EMAIL",
    "SMS"
  ],
  "delegates": [
    {
      "id": "6f1c2e0a-8d4b-4a7e-9c3f-5e2b7d1a9c16",
      "name": "Femi Johnson",
      "title": "Executive assistant",
      "email": "femi.johnson@lagoonpoint.com"
    }
  ],
  "createdAt": "2026-12-04T14:20:00.000Z"
}

Path parameters

employeeIdrequired

string (uuid)

The employee’s id.

Request body

application/json

name

string, 1–120 characters

Their full name.

email

string (email) or null, at most 254 characters

Their work email: one employee per address, kept in lower case. Hosts are told here.

phone

string or null, at most 40 characters

Written locally or with "+"; kept in international (E.164) form for the organisation’s country.

department

string or null, at most 120 characters

Their department.

title

string or null, at most 120 characters

Their job title.

siteId

string (uuid) or null

The site they work at.

notifyBy

array of strings, at most 3 items

How they are told their visitors have arrived. EMAIL and SMS for someone new when left out.

EMAILSMSWHATSAPP
delegateIds

array of strings, at most 5 items

Colleagues told about their visitors too: active employees, the whole list (it replaces the one kept).

active

boolean

false deactivates them (they stay in the directory); true brings them back.

Responses

200 OK

The employee, as changed.

id

string

The employee’s id.

name

string

Their name.

email

string or null

Their work email, in lower case.

phone

string or null

Their phone number, in international (E.164) form.

department

string or null

Their department.

title

string or null

Their job title.

siteId

string or null

The site they work at, or null.

active

boolean

Whether visitors can be invited to see them; a deactivated employee stays in the directory.

notifyBy

array of strings

How they are told their visitors have arrived.

EMAILSMSWHATSAPP
delegates

array of objects

Colleagues told about their visitors too.

delegates[].id

string

The colleague’s employee id.

delegates[].name

string

Their name.

delegates[].title

string or null

Their job title.

delegates[].email

string or null

Their work email.

createdAt

string

When they were added (ISO 8601).

Errors

The id in the path is not a UUID.

No key was sent, or it is mistyped or unknown.

The key has been revoked.

The key has passed its expiry date.

The organisation’s plan does not include the API (feature: "api").

A payment is overdue: the organisation can read but not change anything until it is paid.

Gbàlejò has suspended the organisation.

The key does not have employees:write.

There is no such employee in the directory.

Someone else in the directory already has this email address.

A field is missing or not valid: errors lists each one with its path.

The phone number is not a valid number.

There is no such site.

A delegate is not an active employee in the directory.

An employee cannot be their own delegate.

The key has made its requests for this minute (Retry-After says when).