Skip to content

Groups

Groups are user-defined categories (family, friends, work, and so on) used to organize and filter people throughout Nametag. A person can belong to any number of groups.

All endpoints require authentication and operate only on the authenticated user’s own groups.

GET /api/groups

Returns all groups with their members.

Terminal window
curl https://your-instance.example.com/api/groups \
-H "Authorization: Bearer ntag_xxx"
{
"groups": [
{ "id": "clxgroup1", "name": "Family", "color": "#FF5733", "createdAt": "2026-01-01T00:00:00.000Z" }
]
}
POST /api/groups

Request body

FieldTypeNotes
namestringRequired, 1-100 characters.
descriptionstring or nullUp to 500 characters.
colorstring or nullHex color, e.g. #FF5733.
peopleIdsstring[]Person IDs to add as initial members.
Terminal window
curl -X POST https://your-instance.example.com/api/groups \
-H "Authorization: Bearer ntag_xxx" \
-H "Content-Type: application/json" \
-d '{ "name": "Family", "color": "#FF5733", "peopleIds": ["clx1"] }'
{ "group": { "id": "clxgroup1", "name": "Family", "color": "#FF5733" } }

Returns 403 if you’ve reached your plan’s group limit.

GET /api/groups/{id}
Terminal window
curl https://your-instance.example.com/api/groups/clxgroup1 \
-H "Authorization: Bearer ntag_xxx"
{ "group": { "id": "clxgroup1", "name": "Family" } }
PUT /api/groups/{id}

Same body shape as create, minus peopleIds.

Terminal window
curl -X PUT https://your-instance.example.com/api/groups/clxgroup1 \
-H "Authorization: Bearer ntag_xxx" \
-H "Content-Type: application/json" \
-d '{ "name": "Immediate Family", "color": "#FF5733" }'
{ "group": { "id": "clxgroup1", "name": "Immediate Family" } }
DELETE /api/groups/{id}

Soft-deletes a group. Restorable within the 30-day retention period.

Query parameters

ParameterTypeDescription
deletePeoplebooleanAlso soft-delete every person currently in this group.
Terminal window
curl -X DELETE "https://your-instance.example.com/api/groups/clxgroup1?deletePeople=false" \
-H "Authorization: Bearer ntag_xxx"
{ "message": "Group deleted" }
POST /api/groups/{id}/restore
Terminal window
curl -X POST https://your-instance.example.com/api/groups/clxgroup1/restore \
-H "Authorization: Bearer ntag_xxx"
{ "group": { "id": "clxgroup1", "name": "Family", "deletedAt": null } }
POST /api/groups/{id}/members
Terminal window
curl -X POST https://your-instance.example.com/api/groups/clxgroup1/members \
-H "Authorization: Bearer ntag_xxx" \
-H "Content-Type: application/json" \
-d '{ "personId": "clx1" }'
{ "success": true }
DELETE /api/groups/{id}/members/{personId}
Terminal window
curl -X DELETE https://your-instance.example.com/api/groups/clxgroup1/members/clx1 \
-H "Authorization: Bearer ntag_xxx"
{ "success": true }

Nametag retains soft-deleted records for 30 days before permanent purge. This endpoint powers the Trash view.

GET /api/deleted

Query parameters

ParameterTypeRequiredDescription
typepeople | groups | relationships | relationshipTypes | importantDatesYesEntity type to list.
Terminal window
curl "https://your-instance.example.com/api/deleted?type=groups" \
-H "Authorization: Bearer ntag_xxx"
{
"deleted": [ { "id": "clxgroup2", "name": "Old Book Club", "deletedAt": "2026-07-10T00:00:00.000Z" } ],
"retentionDays": 30,
"cutoffDate": "2026-06-20T00:00:00.000Z"
}