Skip to content
GbàlejòDocs

Directory

Add an employee

POST/api/v1/employees
Scope: employees:write

Add someone to the directory, so visitors can be invited to see them. They need no Gbàlejò account.

Example request

curl
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"
}'
JavaScript
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
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"
}

Request body

application/json

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

201 Created

The employee added.

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

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).