People
Units, members, learners and guardian consent.
/v1/people/{id}/membershipsGive a person another place
A role at a unit, or at the organisation level. The same place again is returned as it is (200). ageBand: "18+" marks an adult learner, where the organisation marks adult learners (409 conflict otherwise). The API never gives, changes, switches off or removes an owner's place, and only a full-access key gives, changes, switches off or removes an ADMIN, AVATAR_BUILDER or WORKSPACE_ADMIN place (403 forbidden otherwise): people:write alone manages learners, leaders and observers.
Path parameters
idstringrequiredPerson id (
usr_…); the id without its prefix is accepted too.
Body
role"OWNER" | "ADMIN" | "AVATAR_BUILDER" | "WORKSPACE_ADMIN" | "LEADER" | "LEARNER" | "OBSERVER"requiredOWNER (never given or changed through the API), ADMIN, AVATAR_BUILDER, WORKSPACE_ADMIN (these four at the organisation level only), LEADER, LEARNER, OBSERVER.
unitIdstring | nullworkspaceIdstring | nullgradeBandstring | nullageBand"18+" | null
Returns
201 The place. data is Membership.
Fields of data
idstringrequiredMembership id (
mbr_…).pattern `^mbr_.*`
personIdstringrequiredPerson id (
usr_…).pattern `^usr_.*`
rolestringrequiredOne of the member roles.
unitIdstring | nullrequiredThe unit it is held at; null at the organisation level.
workspaceIdstring | nullrequiredA workspace admin's subject (
sub_…; bare for keys on 2026-07-08).statusstringrequiredactive, waiting_consent (a child's place waiting for a parent's consent) or disabled.
gradeBandstring | nullrequiredageBand"18+" | nullrequired"18+": an adult learner, who starts without a parent's or guardian's consent.consentAtstring (date-time) | nullrequiredconsentBy"organisation" | "guardian" | "teacher" | nullrequiredWho gave a learner's consent: the organisation, a guardian or a teacher (never their details).
consentWithdrawnbooleanrequiredA guardian's consent was withdrawn from this place (
DELETE …/guardian-consent): it waits for a new consent, and nothing else switches it on.createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictidempotency_conflictidempotency_in_progressrate_limitedserver_error
Events
Request
curl -X POST "https://app.zentiqai.com/v1/people/usr_123/memberships" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role": "OWNER"
}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.addMembership("usr_123", {
role: "OWNER",
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.add_membership("usr_123", {
"role": "OWNER",
})Response
{
"data": {
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/peopleList people
Everyone in the organisation (members, learners, parents) with their places here, newest first. updatedAfter lists those whose account or places changed since: for keeping your system in step.
Query parameters
limitintegerPage size, 1-200 (default 50).
cursorstringThe
nextCursorof the previous page.unitIdstringPeople with a place at this unit.
subtree"true" | "false"With unitId: the unit and every unit below it.
role"OWNER" | "ADMIN" | "AVATAR_BUILDER" | "WORKSPACE_ADMIN" | "LEADER" | "LEARNER" | "OBSERVER"People holding this role here.
status"active" | "waiting_consent" | "disabled"People with a place in this status.
externalIdstringThe person you know by this id.
emailstringupdatedAfterstringChanged since (the account or one of its places): for syncing.
Returns
200 A page of people. A page: data is a list of Person, and nextCursor fetches the next page.
Fields of data
idstringrequiredPerson id (
usr_…).pattern `^usr_.*`
externalIdstring | nullrequiredYour own id for the person (the sync key), when you gave one.
namestringrequiredemailstring | nullrequiredNull for a login card or a person known only by your id.
loginNamestring | nullrequiredA login card's sign-in name (
<organisation code>/<username>).lastSignInAtstring (date-time) | nullrequireddisabledbooleanrequiredSwitched off: no sign-in anywhere; their places keep their own status.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requiredrate_limitedserver_error
Request
curl "https://app.zentiqai.com/v1/people?limit=20" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const page = await zentiq.listPeople({
limit: 20,
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
page = zentiq.list_people(limit=20)Response
{
"data": [
{
"id": "usr_cmfq2b7x10000abcd1234",
"externalId": "…",
"name": "Zoe",
"email": "sam@example.com",
"loginName": "…",
"memberships": [
{
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
}
]
}
],
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d",
"nextCursor": null
}/v1/peopleAdd a person (or find them) and give them a place
By externalId (your own id, the sync key: a repeat returns the same person, 200), else by email, else a login card for a learner without an email. A new learner's place waits for a parent's consent where the organisation's rules say so (status: waiting_consent); never an adult learner's (ageBand: "18+", where the organisation marks adult learners). A new login card's PIN is in this answer only (Cache-Control: no-store): a retry never gets it again. No email is sent. The API never gives, changes, switches off or removes an owner's place, and only a full-access key gives, changes, switches off or removes an ADMIN, AVATAR_BUILDER or WORKSPACE_ADMIN place (403 forbidden otherwise): people:write alone manages learners, leaders and observers.
Body
externalIdstring | nullYour own id for the person: the sync key. A repeat with it returns the same person.
emailstring (email) | nullWithout an externalId, the person is found or added by email. An email another account already has is refused (409).
namestring | nullrole"OWNER" | "ADMIN" | "AVATAR_BUILDER" | "WORKSPACE_ADMIN" | "LEADER" | "LEARNER" | "OBSERVER"requiredOWNER (never given or changed through the API), ADMIN, AVATAR_BUILDER, WORKSPACE_ADMIN (these four at the organisation level only), LEADER, LEARNER, OBSERVER.
unitIdstring | nullworkspaceIdstring | nullA workspace admin's subject.
gradeBandstring | nullageBand"18+" | nullloginCardboolean | nullA learner without an email gets a login card (needs accounts without email switched on).
Returns
201 The person (201 when a person or a place was made, 200 when both existed). data is PersonCreated.
Fields of data
idstringrequiredPerson id (
usr_…).pattern `^usr_.*`
externalIdstring | nullrequiredYour own id for the person (the sync key), when you gave one.
namestringrequiredemailstring | nullrequiredNull for a login card or a person known only by your id.
loginNamestring | nullrequiredA login card's sign-in name (
<organisation code>/<username>).lastSignInAtstring (date-time) | nullrequireddisabledbooleanrequiredSwitched off: no sign-in anywhere; their places keep their own status.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
loginCardLoginCard | nullrequiredOnly on the answer that made the card; never replayed.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictidempotency_conflictidempotency_in_progressrate_limitedserver_error
Events
Request
curl -X POST "https://app.zentiqai.com/v1/people" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role": "OWNER"
}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.createPerson({
role: "OWNER",
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.create_person({
"role": "OWNER",
})Response
{
"data": {
"id": "usr_cmfq2b7x10000abcd1234",
"externalId": "…",
"name": "Zoe",
"email": "sam@example.com",
"loginName": "…",
"memberships": [
{
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
}
]
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/unitsList units
The organisation's classes, teams and groups, in tree order, with their counts.
Query parameters
limitintegerPage size, 1-200 (default 50).
cursorstringThe
nextCursorof the previous page.parentIdstringOnly the units directly under this one.
includeDisabled"true" | "false"Include switched-off units (default true).
Returns
200 A page of units. A page: data is a list of Unit, and nextCursor fetches the next page.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
parentIdstring | nullrequiredThe unit above it; null at the top level.
namestringrequiredkindstringrequiredclass, team, group, department, region, school or club.
gradeBandstring | nullrequiredA class's year or grade: the default for learners who join with its code.
disabledbooleanrequiredSwitched off (itself or a unit above it): it grants nothing until switched on.
joinCodestring | nullrequiredThe code learners join with, where joining by code is on.
sortOrderintegerrequiredcountsobjectrequiredmembersintegerrequiredlearnersintegerrequiredleadersintegerrequiredwaitingintegerrequiredLearners whose place waits for a parent's consent.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requiredrate_limitedserver_error
Request
curl "https://app.zentiqai.com/v1/units?limit=20" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const page = await zentiq.listUnits({
limit: 20,
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
page = zentiq.list_units(limit=20)Response
{
"data": [
{
"id": "unit_cmfq2b7x10000abcd1234",
"parentId": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"kind": "team",
"gradeBand": "…",
"disabled": true
}
],
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d",
"nextCursor": null
}/v1/unitsAdd a unit (a class, team or group)
Under another unit (parentId) or at the top level. A second unit with the same name at the same level is allowed and flagged (duplicateName). A leader named by email is invited and counts as a staff member (403 upgrade_required when the plan has no room for another). An email another account already uses is 409 conflict (details.reason: email_in_use), checked before anything is made.
Body
namestringrequired1-80 characters
parentIdstring | nullkindstring | nullclass, team, group, department, region, school or club (default: the organisation's).
gradeBandstring | nullleaderobject | nullInvites the unit's leader by email (counts as a staff member).
emailstring (email)required
Returns
201 The new unit. data is UnitWritten.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
parentIdstring | nullrequiredThe unit above it; null at the top level.
namestringrequiredkindstringrequiredclass, team, group, department, region, school or club.
gradeBandstring | nullrequiredA class's year or grade: the default for learners who join with its code.
disabledbooleanrequiredSwitched off (itself or a unit above it): it grants nothing until switched on.
joinCodestring | nullrequiredThe code learners join with, where joining by code is on.
sortOrderintegerrequiredcountsobjectrequiredmembersintegerrequiredlearnersintegerrequiredleadersintegerrequiredwaitingintegerrequiredLearners whose place waits for a parent's consent.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
duplicateNameobject | nullrequiredAnother unit at the same level already has this name (allowed, flagged).
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
namestringrequired
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictidempotency_conflictidempotency_in_progressrate_limitedserver_error
Events
Request
curl -X POST "https://app.zentiqai.com/v1/units" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Zoe"
}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.createUnit({
name: "Zoe",
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.create_unit({
"name": "Zoe",
})Response
{
"data": {
"id": "unit_cmfq2b7x10000abcd1234",
"parentId": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"kind": "team",
"gradeBand": "…",
"disabled": true
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/memberships/{id}Change a place
Its role, unit, year or grade, whether it is an adult learner's, or switch it off or on. A place waiting for a parent's consent turns active only through guardian consent, or when it is marked as an adult learner's (ageBand: "18+", where the organisation marks adult learners: 409 conflict otherwise). The API never gives, changes, switches off or removes an owner's place, and only a full-access key gives, changes, switches off or removes an ADMIN, AVATAR_BUILDER or WORKSPACE_ADMIN place (403 forbidden otherwise): people:write alone manages learners, leaders and observers.
Path parameters
idstringrequiredMembership id (
mbr_…); the id without its prefix is accepted too.
Body
role"OWNER" | "ADMIN" | "AVATAR_BUILDER" | "WORKSPACE_ADMIN" | "LEADER" | "LEARNER" | "OBSERVER"OWNER (never given or changed through the API), ADMIN, AVATAR_BUILDER, WORKSPACE_ADMIN (these four at the organisation level only), LEADER, LEARNER, OBSERVER.
unitIdstring | nullgradeBandstring | nullageBand"18+" | null"18+"marks an adult learner (a place waiting for consent is switched on); null clears it.status"active" | "disabled"Switch this place off or on. A place waiting for consent turns active only through guardian consent.
Returns
200 The place. data is Membership.
Fields of data
idstringrequiredMembership id (
mbr_…).pattern `^mbr_.*`
personIdstringrequiredPerson id (
usr_…).pattern `^usr_.*`
rolestringrequiredOne of the member roles.
unitIdstring | nullrequiredThe unit it is held at; null at the organisation level.
workspaceIdstring | nullrequiredA workspace admin's subject (
sub_…; bare for keys on 2026-07-08).statusstringrequiredactive, waiting_consent (a child's place waiting for a parent's consent) or disabled.
gradeBandstring | nullrequiredageBand"18+" | nullrequired"18+": an adult learner, who starts without a parent's or guardian's consent.consentAtstring (date-time) | nullrequiredconsentBy"organisation" | "guardian" | "teacher" | nullrequiredWho gave a learner's consent: the organisation, a guardian or a teacher (never their details).
consentWithdrawnbooleanrequiredA guardian's consent was withdrawn from this place (
DELETE …/guardian-consent): it waits for a new consent, and nothing else switches it on.createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictrate_limitedserver_error
Events
member.updatedmember.disabledmember.enabled
Request
curl -X PATCH "https://app.zentiqai.com/v1/memberships/mbr_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.updateMembership("mbr_123", {});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.update_membership("mbr_123", {})Response
{
"data": {
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/memberships/{id}Remove a place
The account stays. Someone's only organisation-level owner or admin place can't be removed this way, nor the last place of an owner or admin invited in the console (409 conflict: without a place their account would count as an owner; an owner or admin removes them from the organisation in the console). The API never gives, changes, switches off or removes an owner's place, and only a full-access key gives, changes, switches off or removes an ADMIN, AVATAR_BUILDER or WORKSPACE_ADMIN place (403 forbidden otherwise): people:write alone manages learners, leaders and observers.
Path parameters
idstringrequiredMembership id (
mbr_…); the id without its prefix is accepted too.
Returns
200 Removed. data is object.
Fields of data
removedtruerequiredidstringrequiredMembership id (
mbr_…).pattern `^mbr_.*`
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictrate_limitedserver_error
Events
Request
curl -X DELETE "https://app.zentiqai.com/v1/memberships/mbr_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.deleteMembership("mbr_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.delete_membership("mbr_123")Response
{
"data": {
"removed": true,
"id": "mbr_cmfq2b7x10000abcd1234"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/units/{id}Get a unit
Path parameters
idstringrequiredUnit id (
unit_…); the id without its prefix is accepted too.
Returns
200 The unit. data is Unit.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
parentIdstring | nullrequiredThe unit above it; null at the top level.
namestringrequiredkindstringrequiredclass, team, group, department, region, school or club.
gradeBandstring | nullrequiredA class's year or grade: the default for learners who join with its code.
disabledbooleanrequiredSwitched off (itself or a unit above it): it grants nothing until switched on.
joinCodestring | nullrequiredThe code learners join with, where joining by code is on.
sortOrderintegerrequiredcountsobjectrequiredmembersintegerrequiredlearnersintegerrequiredleadersintegerrequiredwaitingintegerrequiredLearners whose place waits for a parent's consent.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundrate_limitedserver_error
Request
curl "https://app.zentiqai.com/v1/units/unit_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.getUnit("unit_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.get_unit("unit_123")Response
{
"data": {
"id": "unit_cmfq2b7x10000abcd1234",
"parentId": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"kind": "team",
"gradeBand": "…",
"disabled": true
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/units/{id}Rename, move or switch off a unit
Switching a unit off switches off everything below it: nothing is deleted, and it grants nothing until switched on. A unit can't move under itself.
Path parameters
idstringrequiredUnit id (
unit_…); the id without its prefix is accepted too.
Body
namestring1-80 characters
parentIdstring | nullMove it under another unit; null moves it to the top level.
sortOrderintegergradeBandstring | nullnull clears it.
disabledbooleanSwitch it (and everything below it) off or on. Nothing is deleted.
Returns
200 The unit. data is UnitWritten.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
parentIdstring | nullrequiredThe unit above it; null at the top level.
namestringrequiredkindstringrequiredclass, team, group, department, region, school or club.
gradeBandstring | nullrequiredA class's year or grade: the default for learners who join with its code.
disabledbooleanrequiredSwitched off (itself or a unit above it): it grants nothing until switched on.
joinCodestring | nullrequiredThe code learners join with, where joining by code is on.
sortOrderintegerrequiredcountsobjectrequiredmembersintegerrequiredlearnersintegerrequiredleadersintegerrequiredwaitingintegerrequiredLearners whose place waits for a parent's consent.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
duplicateNameobject | nullrequiredAnother unit at the same level already has this name (allowed, flagged).
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
namestringrequired
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundrate_limitedserver_error
Events
unit.renamedunit.updatedunit.disabledunit.enabled
Request
curl -X PATCH "https://app.zentiqai.com/v1/units/unit_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.updateUnit("unit_123", {});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.update_unit("unit_123", {})Response
{
"data": {
"id": "unit_cmfq2b7x10000abcd1234",
"parentId": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"kind": "team",
"gradeBand": "…",
"disabled": true
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/units/{id}Delete a unit
Its sub-units move up to its parent (or the top level) with everything below them, and the portals, subjects and assignments attached to it move with them. The places held on it are removed; the people's accounts and other places stay. Sessions, results and reports are never deleted. To keep everything, switch the unit off instead (PATCH /units/{id} with disabled: true). A unit holding an owner's place is never deleted through the API, and one holding an admin-level place only with a full-access key (403 forbidden). Preview it with GET /units/{id}/deletion-preview.
Path parameters
idstringrequiredUnit id (
unit_…); the id without its prefix is accepted too.
Returns
200 Deleted, and what moved. data is UnitDeleted.
Fields of data
deletedtruerequiredidstringrequiredUnit id (
unit_…).pattern `^unit_.*`
namestringrequiredmovedTostring | nullrequiredWhere its sub-units, portals, subjects and assignments moved: its parent, or the top level (null).
subUnitsMovedintegerrequiredportalsMovedintegerrequiredsubjectsMovedintegerrequiredassignmentsMovedintegerrequiredmembershipsRemovedintegerrequiredPlaces held on the unit, removed (the people's accounts and other places stay).
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictrate_limitedserver_error
Events
Request
curl -X DELETE "https://app.zentiqai.com/v1/units/unit_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.deleteUnit("unit_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.delete_unit("unit_123")Response
{
"data": {
"deleted": true,
"id": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"movedTo": "unit_cmfq2b7x10000abcd1234",
"subUnitsMoved": 1,
"portalsMoved": 1
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/units/{id}/join-codeCreate or replace a unit's join code
Learners join the unit with this code. Each call makes a new code and the old one stops working. Making a code allows joining by code: where your organization has switched joining by code off for this unit, it is switched on for it (setting.changed); where the switch is locked above the unit, it is refused (409 conflict, details.reason: "join_by_code_off").
Path parameters
idstringrequiredUnit id (
unit_…); the id without its prefix is accepted too.
Returns
200 The unit, with its new `joinCode`. data is Unit.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
parentIdstring | nullrequiredThe unit above it; null at the top level.
namestringrequiredkindstringrequiredclass, team, group, department, region, school or club.
gradeBandstring | nullrequiredA class's year or grade: the default for learners who join with its code.
disabledbooleanrequiredSwitched off (itself or a unit above it): it grants nothing until switched on.
joinCodestring | nullrequiredThe code learners join with, where joining by code is on.
sortOrderintegerrequiredcountsobjectrequiredmembersintegerrequiredlearnersintegerrequiredleadersintegerrequiredwaitingintegerrequiredLearners whose place waits for a parent's consent.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictidempotency_conflictidempotency_in_progressrate_limitedserver_error
Events
Request
curl -X POST "https://app.zentiqai.com/v1/units/unit_123/join-code" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.rotateUnitJoinCode("unit_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.rotate_unit_join_code("unit_123")Response
{
"data": {
"id": "unit_cmfq2b7x10000abcd1234",
"parentId": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"kind": "team",
"gradeBand": "…",
"disabled": true
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/units/{id}/join-codeRemove a unit's join code
The code stops working at once; people who already joined keep their places. Removing a code that isn't there returns the unit as it is. Where joining by code is switched off for the unit, it is refused (409 conflict).
Path parameters
idstringrequiredUnit id (
unit_…); the id without its prefix is accepted too.
Returns
200 The unit, with `joinCode: null`. data is Unit.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
parentIdstring | nullrequiredThe unit above it; null at the top level.
namestringrequiredkindstringrequiredclass, team, group, department, region, school or club.
gradeBandstring | nullrequiredA class's year or grade: the default for learners who join with its code.
disabledbooleanrequiredSwitched off (itself or a unit above it): it grants nothing until switched on.
joinCodestring | nullrequiredThe code learners join with, where joining by code is on.
sortOrderintegerrequiredcountsobjectrequiredmembersintegerrequiredlearnersintegerrequiredleadersintegerrequiredwaitingintegerrequiredLearners whose place waits for a parent's consent.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictrate_limitedserver_error
Events
Request
curl -X DELETE "https://app.zentiqai.com/v1/units/unit_123/join-code" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.deleteUnitJoinCode("unit_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.delete_unit_join_code("unit_123")Response
{
"data": {
"id": "unit_cmfq2b7x10000abcd1234",
"parentId": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"kind": "team",
"gradeBand": "…",
"disabled": true
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/people/{id}Get a person
Path parameters
idstringrequiredPerson id (
usr_…); the id without its prefix is accepted too.
Returns
200 The person. data is Person.
Fields of data
idstringrequiredPerson id (
usr_…).pattern `^usr_.*`
externalIdstring | nullrequiredYour own id for the person (the sync key), when you gave one.
namestringrequiredemailstring | nullrequiredNull for a login card or a person known only by your id.
loginNamestring | nullrequiredA login card's sign-in name (
<organisation code>/<username>).lastSignInAtstring (date-time) | nullrequireddisabledbooleanrequiredSwitched off: no sign-in anywhere; their places keep their own status.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundrate_limitedserver_error
Request
curl "https://app.zentiqai.com/v1/people/usr_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.getPerson("usr_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.get_person("usr_123")Response
{
"data": {
"id": "usr_cmfq2b7x10000abcd1234",
"externalId": "…",
"name": "Zoe",
"email": "sam@example.com",
"loginName": "…",
"memberships": [
{
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
}
]
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/people/{id}Switch a person's account off or on
Off: no sign-in anywhere, they stop counting as a staff member, any conversation they are in now ends, and every record is kept; their places keep their own status. On: someone holding a staff role counts as a staff member again (403 upgrade_required when the plan has no room for another). Never the organization's last active owner, a person removed from the organization (add them again instead), or an account that belongs to another organization (409 conflict; switch off their places here instead). The API never switches an owner's account off or on, and only a full-access key switches off or on someone holding an ADMIN, AVATAR_BUILDER or WORKSPACE_ADMIN place (403 forbidden).
Path parameters
idstringrequiredPerson id (
usr_…); the id without its prefix is accepted too.
Body
disabledbooleanrequiredSwitch the whole account off (true) or back on (false).
Returns
200 The person. data is Person.
Fields of data
idstringrequiredPerson id (
usr_…).pattern `^usr_.*`
externalIdstring | nullrequiredYour own id for the person (the sync key), when you gave one.
namestringrequiredemailstring | nullrequiredNull for a login card or a person known only by your id.
loginNamestring | nullrequiredA login card's sign-in name (
<organisation code>/<username>).lastSignInAtstring (date-time) | nullrequireddisabledbooleanrequiredSwitched off: no sign-in anywhere; their places keep their own status.
createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictrate_limitedserver_error
Events
Request
curl -X PATCH "https://app.zentiqai.com/v1/people/usr_123" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"disabled": true
}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.updatePerson("usr_123", {
disabled: true,
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.update_person("usr_123", {
"disabled": True,
})Response
{
"data": {
"id": "usr_cmfq2b7x10000abcd1234",
"externalId": "…",
"name": "Zoe",
"email": "sam@example.com",
"loginName": "…",
"memberships": [
{
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
}
]
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/units/{id}/deletion-previewPreview deleting a unit
What DELETE /units/{id} would move and remove, in numbers. Nothing changes.
Path parameters
idstringrequiredUnit id (
unit_…); the id without its prefix is accepted too.
Returns
200 What deleting it would do. data is UnitDeletionPreview.
Fields of data
idstringrequiredUnit id (
unit_…).pattern `^unit_.*`
namestringrequiredmovedTostring | nullrequiredWhere its sub-units, portals, subjects and assignments would move: its parent, or the top level (null).
movedToNamestring | nullrequiredsubUnitsintegerrequiredUnits directly under it, which would move up (with everything below them).
unitsBelowintegerrequiredEvery unit below it, at any depth.
nameClashesstring[]requiredSub-units that would share a name with a unit already at the level they move to (allowed, flagged).
peopleintegerrequiredPeople with a place on it (their places there would be removed).
leadersintegerrequiredpeopleLeftWithoutPlaceintegerrequiredPeople whose only place in the organization is on this unit.
portalsintegerrequiredPortals attached to it, which would move.
subjectsintegerrequiredassignmentsintegerrequired
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundrate_limitedserver_error
Request
curl "https://app.zentiqai.com/v1/units/unit_123/deletion-preview" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.getUnitDeletionPreview("unit_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.get_unit_deletion_preview("unit_123")Response
{
"data": {
"id": "unit_cmfq2b7x10000abcd1234",
"name": "Zoe",
"movedTo": "unit_cmfq2b7x10000abcd1234",
"movedToName": "…",
"subUnits": 1,
"unitsBelow": 1
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/people/importImport learners
Up to 500 learners at once into a class or team (or the organization level), as the console's class-list import does. Each row gets its own result, in order, and one row failing never stops the others. A row with an email is invited by email (someone already holding this place is left as it is, created: false); a row without one gets a login card, only where accounts without email are switched on. A child's place waits for a parent's consent where your organization's rules say so (status: "waiting_consent"). A row with no year or grade takes the unit's own. No email is sent. New login cards' PINs are in this answer (Cache-Control: no-store); send an Idempotency-Key so a retry gets the same answer instead of new cards.
Body
unitIdstring | nullThe class or team they join; none: the organization level.
at most 500 items
Returns
201 Every row's outcome (201 when a place was made, 200 when none was). data is ImportPeopleResult.
Fields of data
addedintegerrequiredNew places made.
failedintegerrequiredresultsobject[]requiredOne per row, in order.
rowintegerrequiredThe row's position in
rows, from 0.namestringrequiredokbooleanrequiredcreatedbooleanrequiredA new place was made (false: they already held it, or the row failed).
personIdstring | nullrequiredmembershipIdstring | nullrequiredstatusstring | nullrequiredThe place's status: active, or waiting_consent for a child's place that waits for a parent's consent.
loginCardLoginCard | nullrequiredA new login card, its PIN in this answer only.
errorstring | nullrequiredWhy the row failed, in plain English.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundidempotency_conflictidempotency_in_progressrate_limitedserver_error
Events
Request
curl -X POST "https://app.zentiqai.com/v1/people/import" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"rows": [
{
"name": "Zoe"
}
]
}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.importPeople({
rows: [{
name: "Zoe",
}],
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.import_people({
"rows": [{
"name": "Zoe",
}],
})Response
{
"data": {
"added": 1,
"failed": 1,
"results": [
{
"row": 1,
"name": "Zoe",
"ok": true,
"created": true,
"personId": "usr_cmfq2b7x10000abcd1234",
"membershipId": "mbr_cmfq2b7x10000abcd1234"
}
]
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/memberships/{id}/guardian-consentRecord a parent's or guardian's consent
On a learner's place that waits for it: the place turns active. A place that already has consent is returned as it is; a place switched off is refused (409). consent.recorded says who gave it, never the guardian's address.
Path parameters
idstringrequiredMembership id (
mbr_…); the id without its prefix is accepted too.
Body
by"organisation" | "guardian" | "teacher"requiredWho gave it: the organisation attests, a guardian gave it, a teacher recorded it on file.
guardianEmailstring (email) | nullKept on the place as evidence; never sent in any event or webhook.
methodstringrequiredHow it was given: school_form, in_person, email, …
1-40 characters
evidenceRefstring | nullYour own reference to the evidence.
Returns
200 The place. data is Membership.
Fields of data
idstringrequiredMembership id (
mbr_…).pattern `^mbr_.*`
personIdstringrequiredPerson id (
usr_…).pattern `^usr_.*`
rolestringrequiredOne of the member roles.
unitIdstring | nullrequiredThe unit it is held at; null at the organisation level.
workspaceIdstring | nullrequiredA workspace admin's subject (
sub_…; bare for keys on 2026-07-08).statusstringrequiredactive, waiting_consent (a child's place waiting for a parent's consent) or disabled.
gradeBandstring | nullrequiredageBand"18+" | nullrequired"18+": an adult learner, who starts without a parent's or guardian's consent.consentAtstring (date-time) | nullrequiredconsentBy"organisation" | "guardian" | "teacher" | nullrequiredWho gave a learner's consent: the organisation, a guardian or a teacher (never their details).
consentWithdrawnbooleanrequiredA guardian's consent was withdrawn from this place (
DELETE …/guardian-consent): it waits for a new consent, and nothing else switches it on.createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictidempotency_conflictidempotency_in_progressrate_limitedserver_error
Events
Request
curl -X POST "https://app.zentiqai.com/v1/memberships/mbr_123/guardian-consent" \
-H "Authorization: Bearer $ZENTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"by": "organisation",
"method": "school_form"
}'import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.recordGuardianConsent("mbr_123", {
by: "organisation",
method: "school_form",
});import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.record_guardian_consent("mbr_123", {
"by": "organisation",
"method": "school_form",
})Response
{
"data": {
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}/v1/memberships/{id}/guardian-consentWithdraw a parent's or guardian's consent
The learner's place waits for consent again, and any conversation the learner is in now ends. Nothing switches it back on (not the organisation's attestation, not earlier sessions) until consent is recorded again with POST. Withdrawing twice returns the place unchanged. consent.withdrawn says who withdrew it, never why.
Path parameters
idstringrequiredMembership id (
mbr_…); the id without its prefix is accepted too.
Returns
200 The place. data is Membership.
Fields of data
idstringrequiredMembership id (
mbr_…).pattern `^mbr_.*`
personIdstringrequiredPerson id (
usr_…).pattern `^usr_.*`
rolestringrequiredOne of the member roles.
unitIdstring | nullrequiredThe unit it is held at; null at the organisation level.
workspaceIdstring | nullrequiredA workspace admin's subject (
sub_…; bare for keys on 2026-07-08).statusstringrequiredactive, waiting_consent (a child's place waiting for a parent's consent) or disabled.
gradeBandstring | nullrequiredageBand"18+" | nullrequired"18+": an adult learner, who starts without a parent's or guardian's consent.consentAtstring (date-time) | nullrequiredconsentBy"organisation" | "guardian" | "teacher" | nullrequiredWho gave a learner's consent: the organisation, a guardian or a teacher (never their details).
consentWithdrawnbooleanrequiredA guardian's consent was withdrawn from this place (
DELETE …/guardian-consent): it waits for a new consent, and nothing else switches it on.createdAtstring (date-time)requiredISO 8601 UTC timestamp.
updatedAtstring (date-time)requiredISO 8601 UTC timestamp.
Errors
invalid_requestunauthorizedforbiddenupgrade_requirednot_foundconflictrate_limitedserver_error
Events
Request
curl -X DELETE "https://app.zentiqai.com/v1/memberships/mbr_123/guardian-consent" \
-H "Authorization: Bearer $ZENTIQ_API_KEY"import { Zentiq } from "@zentiq/node";
const zentiq = new Zentiq({ apiKey: process.env.ZENTIQ_API_KEY });
const result = await zentiq.withdrawGuardianConsent("mbr_123");import os
from zentiq import Zentiq
zentiq = Zentiq(api_key=os.environ["ZENTIQ_API_KEY"])
result = zentiq.withdraw_guardian_consent("mbr_123")Response
{
"data": {
"id": "mbr_cmfq2b7x10000abcd1234",
"personId": "usr_cmfq2b7x10000abcd1234",
"role": "…",
"unitId": "unit_cmfq2b7x10000abcd1234",
"workspaceId": "sub_cmfq2b7x10000abcd1234",
"status": "active"
},
"error": null,
"requestId": "req_4f1c2e9a7b3d5e6f7a8b9c0d"
}