Skip to content

Members & access

Base URL: https://api.gatevia.app

A member is a person in your Space. Each member can hold any number of accesses — one per gate, each with its own schedules and usage cap. The member receives a single magic link (accessUrl) that opens every gate they have access to; when they pick a language on that page it is remembered across devices.

The member object

{
"id": "665f1c2ab9d1a2c3d4e5f7a1",
"name": "Ana Popescu",
"email": "[email protected]",
"phone": null,
"note": "housekeeping",
"isAdmin": false,
"isActive": true,
"preferredLanguage": "ro",
"createdAt": "2026-07-01T08:00:00.000Z",
"accesses": [
{
"id": "665f1c2ab9d1a2c3d4e5f7b2",
"gateId": "665f1c2ab9d1a2c3d4e5f601",
"schedules": [
{ "type": "weekdays", "timeWindows": [{ "from": "09:00", "to": "18:00" }] }
],
"maxUsage": null,
"usageCount": 3,
"isActive": true,
"accessUrl": "https://app.gatevia.app/g/AB12CD34EF56…",
"lastUsedAt": "2026-07-10T10:12:00.000Z"
}
]
}

Schedules

Accesses carry an array of schedules combined with logical OR:

typeExtra fieldsMeaning
alwaysAny time
weekdaystimeWindows?Monday–Friday
weekendstimeWindows?Saturday–Sunday
customdaysOfWeek (0=Sun…6=Sat), timeWindows?Specific days
one-shotstartsAt? / expiresAt?A single absolute window

All types accept optional startsAt / expiresAt (ISO 8601) to clip the schedule to an absolute window, plus timezone (IANA, default Europe/Bucharest). timeWindows entries are { "from": "HH:mm", "to": "HH:mm" }; omit for whole-day access. { "from": "22:00", "to": "02:00" } crosses midnight.

List members

GET /api/v1/members — scope members:read

Returns { "members": [ … ] } including accesses and magic links.

Create a member

POST /api/v1/members — scope members:write

FieldTypeRequiredNotes
namestring
emailstringIf present, the invitation email is sent automatically
phonestring
notestringFree-form, visible to admins only
accessesarray[{ gateId, schedules?, maxUsage? }]; schedules defaults to [{"type":"always"}]

Returns 201 { "member": { … } }. Counts toward your plan’s monthly invitation limit.

Update a member

PATCH /api/v1/members/:memberId — scope members:write

Any subset of name, email, phone, note. Returns { "member": { … } }.

Deactivate a member

DELETE /api/v1/members/:memberId — scope members:write

Deactivates the member and revokes all their gate accesses. Returns 204.

Grant gate access

POST /api/v1/members/:memberId/accesses — scope members:write

Body: { "gateId": "…", "schedules": [ … ], "maxUsage": 10 } (schedules and maxUsage optional). Returns 201 { "access": { … } }. If the member has an email, they are notified automatically — their existing link opens the new gate too.

Update an access

PATCH /api/v1/members/:memberId/accesses/:accessId — scope members:write

Any subset of schedules, maxUsage, isActive. Returns { "access": { … } }.

Revoke an access

DELETE /api/v1/members/:memberId/accesses/:accessId — scope members:write

Removes that gate from the member. Returns 204.