On this page

28 endpoints.

MethodPathSummary
GET/api/communities/{communityId}/family-treeGet the whole family tree
POST/api/communities/{communityId}/family-tree/{husbandId}/spousesAdd a wife
DELETE/api/communities/{communityId}/family-tree/{id}Delete a card and its descendants
GET/api/communities/{communityId}/family-tree/{id}Get one card
PATCH/api/communities/{communityId}/family-tree/{id}Edit a card
GET/api/communities/{communityId}/family-tree/{id}/delete-previewPreview a delete cascade
DELETE/api/communities/{communityId}/family-tree/{id}/edit-grantRevoke the edit grant on a card
GET/api/communities/{communityId}/family-tree/{id}/edit-grantGet the edit grant on a card
POST/api/communities/{communityId}/family-tree/{id}/edit-grantGrant one member edit access to an unlinked card
POST/api/communities/{communityId}/family-tree/{id}/fatherInsert a father above a card
POST/api/communities/{communityId}/family-tree/{id}/relatives/bulkAdd several children and wives at once
POST/api/communities/{communityId}/family-tree/{parentId}/childrenAdd a child
POST/api/communities/{communityId}/family-tree/{parentId}/reorderReorder children
GET/api/communities/{communityId}/family-tree/branchesList family branches (فخذ)
POST/api/communities/{communityId}/family-tree/branchesCreate a branch
DELETE/api/communities/{communityId}/family-tree/branches/{branchId}Delete a branch
PATCH/api/communities/{communityId}/family-tree/branches/{branchId}Update a branch
GET/api/communities/{communityId}/family-tree/linkable-membersList members that can be linked to a card
POST/api/communities/{communityId}/family-tree/me/viewedMark my own card as viewed
GET/api/communities/{communityId}/family-tree/requestsList all change requests
POST/api/communities/{communityId}/family-tree/requestsSubmit a change request
GET/api/communities/{communityId}/family-tree/requests/{id}Get one change request
POST/api/communities/{communityId}/family-tree/requests/{id}/approveApprove a change request
POST/api/communities/{communityId}/family-tree/requests/{id}/cancelCancel my pending request
POST/api/communities/{communityId}/family-tree/requests/{id}/rejectReject a change request
POST/api/communities/{communityId}/family-tree/requests/bulkSubmit several ADD_RELATIVE requests
GET/api/communities/{communityId}/family-tree/requests/mineList my change requests
POST/api/communities/{communityId}/family-tree/rootCreate the root card

Every card in the community tree, ordered by sortKey. grantedToMe marks cards the caller may edit directly. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Husband must be a male bloodline card. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
husbandIdpathyesstring (uuid)—

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
payloadstringnoJSON FamilyMemberCreate
familyPhotostring (binary)no—

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Requires ?confirmed=true (otherwise 400 CONFIRM_REQUIRED); the root cannot be deleted. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—
confirmedqueryyesenum: true—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Any member. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

With tree:manage, or an edit grant on this card (grantees cannot change the link). linkedMemberId must be an APPROVED member (400 INVALID_LINKED_MEMBER). The photo comes only from familyPhoto. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
payloadstringnoJSON partial FamilyMemberCreate
familyPhotostring (binary)no—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Lists every card that would be removed. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Idempotent. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Null when none. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

userId is the User.id of an APPROVED member. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Request body (required) — application/json

FieldTypeRequiredDescription
userIdstringyes—

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—
409CARD_ALREADY_LINKED—

Payload { father, includeSiblingIds }. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
payloadstringnoJSON father, includeSiblingIds
familyPhotostring (binary)no—

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

JSON only, no photos. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Request body (required) — application/json

Type: FamilyRelativesBulk

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Parent must be a male bloodline card. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
parentIdpathyesstring (uuid)—

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
payloadstringnoJSON FamilyMemberCreate; gender is REQUIRED for a child, motherId optional
familyPhotostring (binary)no—

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Body must list exactly the current bloodline children. Allowed with tree:manage or an edit grant on the parent card. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
parentIdpathyesstring (uuid)—

Request body (required) — application/json

Type: FamilyTreeReorder

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Any member. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Creates a فخذ tag. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Request body (required) — application/json

Type: FamilyBranchCreate

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
409BRANCH_NAME_TAKEN—

Cards in it are untagged. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
branchIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Rename or recolour. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
branchIdpathyesstring (uuid)—

Request body (required) — application/json

Type: FamilyBranchWrite

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—
409BRANCH_NAME_TAKEN—

APPROVED members not yet linked to any card. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
excludeFamilyMemberIdquerynostring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Idempotent; suppresses the follow-up nudge. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Filters: status, requestType, userId, familyMemberId, page, limit. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
statusquerynoenum: PENDING, APPROVED, REJECTED, CANCELLED—
requestTypequerynoenum: EDIT_SELF, ADD_RELATIVE, DELETE_SELF, EDIT_CHILD, DELETE_CHILD—
userIdquerynostring—
familyMemberIdquerynostring (uuid)—
pagequerynointeger—
limitquerynointeger—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Linked members request EDIT_SELF, ADD_RELATIVE, DELETE_SELF, EDIT_CHILD or DELETE_CHILD. Only the photo in familyPhoto is kept; linkedMemberId and photoKey inside the payload are ignored. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
payloadstringnoJSON FamilyTreeRequestCreate
familyPhotostring (binary)no—

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
409PENDING_REQUEST_EXISTS — data.existingRequestId names the open request—

Owner, or a holder of tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—

Atomic; a second approve returns 409 REQUEST_NOT_PENDING. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—
409REQUEST_NOT_PENDING (data.currentStatus), or TARGET_NO_LONGER_ELIGIBLE — card relinked or moved; the request is auto-rejected—

Owner only; anyone else gets 403 REQUEST_NOT_OWNED. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—
409REQUEST_NOT_PENDING (data.currentStatus)—

Optional rejectionReason. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——
idpathyesstring (uuid)—

Request body — application/json

FieldTypeRequiredDescription
rejectionReasonstringno—

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
404Not found—
409REQUEST_NOT_PENDING (data.currentStatus)—

Under the caller's own linked card, JSON only. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Request body (required) — application/json

Type: FamilyTreeBulkRequest

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Always scoped to the caller. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Responses

StatusDescriptionBody
200Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—

Only one root per community. Requires tree:manage. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
——no——

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
payloadstringnoJSON FamilyMemberCreate
familyPhotostring (binary)no—

Responses

StatusDescriptionBody
201Success—
400Validation error with a stable code (e.g. INVALID_PAYLOAD_JSON, BAD_JSON)—
401Missing or invalid token—
403Not a member, missing permission, or FEATURE_NOT_AVAILABLE—
409ROOT_EXISTS—