API Documentation

Integrate Family-Tree.Online into your applications. Our REST API lets you create, read, and update family tree data.

Authentication

Secure API access

API Keys

To access the API, you need an API key from your account settings. Pass the key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Getting an API Key

1. Log in to your account
2. Go to "Settings" → "API"
3. Create a new API key
4. Copy the key and store it securely

Family Trees

GET
/api/v1/trees

Get a list of all family trees for the user

limit integer optional
offset integer optional
Request example:
curl -X GET "https://api.familytreeonline.com/api/v1/trees" \ -H "Authorization: Bearer YOUR_API_KEY"
Response example:
{ "data": [ { "id": 1, "name": "Ivanov Family", "description": "Main family tree", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-20T14:45:00Z" } ], "meta": { "total": 1, "limit": 20, "offset": 0 } }
POST
/api/v1/trees

Create a new family tree

name string required
description string optional
Request example:
curl -X POST "https://api.familytreeonline.com/api/v1/trees" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Petrov Family", "description": "New family tree" }'

Family Members

GET
/api/v1/trees/{tree_id}/humans

Get a list of all family members in a tree

tree_id integer required
search string optional
Response example:
{ "data": [ { "id": 1, "firstname": "Ivan", "secondname": "Ivanov", "birthday": "1980-05-15", "gender": "male", "is_alive": true, "created_at": "2024-01-15T10:30:00Z" } ], "meta": { "total": 1, "limit": 20, "offset": 0 } }
POST
/api/v1/trees/{tree_id}/humans

Add a new family member

firstname string required
secondname string required
birthday date optional
gender string optional

Family Relationships

POST
/api/v1/humans/{human_id}/relationships

Create a relationship between relatives

related_human_id integer required
relationship_type string required

SDKs and Libraries

Ready-made libraries for popular programming languages

JavaScript/Node.js

Official library for JavaScript and Node.js. Supports browsers and server environments.

Install

Python

Python library with async request support. Easy integration with Django and Flask.

Install

PHP

PHP library with Composer support. Compatible with Laravel and Symfony.

Install

Rate Limits

Limits to ensure stable API performance

Request limits

Account type Requests per minute Requests per day
Basic 60 1,000
Premium 300 10,000
Family 1,000 50,000

Frequently Asked Questions

Ready to start integrating?

Get an API key and start integrating Family-Tree.Online into your applications