Directory
Add an employee
/api/v1/employeesemployees:writeAdd someone to the directory, so visitors can be invited to see them. They need no Gbàlejò account.
Request body
application/json| Name | Type | Description |
|---|---|---|
namerequired | 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). |
Responses
| Name | Type | Description |
|---|---|---|
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
| Status | Type | When |
|---|---|---|
| 401 | api-key-invalid | No key was sent, or it is mistyped or unknown. |
| 401 | api-key-revoked | The key has been revoked. |
| 401 | api-key-expired | The key has passed its expiry date. |
| 402 | plan-feature | The organisation’s plan does not include the API (feature: "api"). |
| 402 | account-read-only | A payment is overdue: the organisation can read but not change anything until it is paid. |
| 403 | organisation-suspended | Gbàlejò has suspended the organisation. |
| 403 | api-key-scope | The key does not have employees:write. |
| 409 | employee-exists | Someone in the directory already has this email address. |
| 422 | validation | A field is missing or not valid: errors lists each one with its path. |
| 422 | phone-invalid | The phone number is not a valid number. |
| 422 | site-unknown | There is no such site. |
| 422 | delegate-unavailable | A delegate is not an active employee in the directory. |
| 429 | rate-limited | The key has made its requests for this minute (Retry-After says when). |
Directory
Add an employee
/api/v1/employeesemployees:writeAdd someone to the directory, so visitors can be invited to see them. They need no Gbàlejò account.
Example request
curl -X POST https://api.gbalejo.com/api/v1/employees \
-H "Authorization: Bearer $GBALEJO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Chiamaka Eze",
"email": "chiamaka.eze@lagoonpoint.com",
"department": "Finance",
"title": "Head of Finance"
}'const response = await fetch('https://api.gbalejo.com/api/v1/employees', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GBALEJO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Chiamaka Eze',
email: 'chiamaka.eze@lagoonpoint.com',
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
201 Created{
"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"
}Request body
application/json
namerequiredstring, 1–120 characters
Their full name.
emailstring (email) or null, at most 254 characters
Their work email: one employee per address, kept in lower case. Hosts are told here.
phonestring or null, at most 40 characters
Written locally or with "+"; kept in international (E.164) form for the organisation’s country.
departmentstring or null, at most 120 characters
Their department.
titlestring or null, at most 120 characters
Their job title.
siteIdstring (uuid) or null
The site they work at.
notifyByarray of strings, at most 3 items
How they are told their visitors have arrived. EMAIL and SMS for someone new when left out.
delegateIdsarray of strings, at most 5 items
Colleagues told about their visitors too: active employees, the whole list (it replaces the one kept).
Responses
The employee added.
idstring
The employee’s id.
namestring
Their name.
emailstring or null
Their work email, in lower case.
phonestring or null
Their phone number, in international (E.164) form.
departmentstring or null
Their department.
titlestring or null
Their job title.
siteIdstring or null
The site they work at, or null.
activeboolean
Whether visitors can be invited to see them; a deactivated employee stays in the directory.
notifyByarray of strings
How they are told their visitors have arrived.
delegatesarray of objects
Colleagues told about their visitors too.
delegates[].idstring
The colleague’s employee id.
delegates[].namestring
Their name.
delegates[].titlestring or null
Their job title.
delegates[].emailstring or null
Their work email.
createdAtstring
When they were added (ISO 8601).
Errors
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.
Someone 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.
The key has made its requests for this minute (Retry-After says when).