How can I add family members from an external app or custom form?
We have built a dedicated secure REST API endpoint for our family tree platform. This allows you to programmatically add family members from external automation scripts, custom database forms, or testing platforms like ReqBin.
To interact with the network, you must route your payload using a secure token handshake. Standard WordPress username and password credentials will not work.
Step-by-Step API Integration Guide
Follow these steps to configure your external integration or test the endpoint using a web-based client like ReqBin:
1. Request Your Secret API Token
To protect the privacy of our family data, all external network connections require an isolated security key.
- How to get one: Send a token request directly to me via email or drop a message in our family group chat, and I will provide the access key.
2. Configure the Connection Request
Set up your connection using the following core variables:
- HTTP Method:
POST - API Endpoint URL:
[https://family.alanparma.com/wp-json/family-tree/v1/add-member](https://family.alanparma.com/wp-json/family-tree/v1/add-member)
3. Set the Required Headers
You must supply these exact header strings in your request to pass through the site firewall:
| Header Key | Value | Description |
Content-Type | application/json | Tells the site to process structured data |
X-Family-Tree-API-Key | your_secret_token_here | Your unique assigned security key |
4. Format Your JSON Data Payload
Your data body must be written in standard JSON format.
⚠️ Required Fields: The
first_nameandlast_nameparameters are mandatory. The engine will automatically block duplicates if a record with that exact full name combination already exists in the tree.
JSON
{
"first_name": "Juan",
"last_name": "Dela Cruz",
"nickname": "John",
"gender": "male",
"birth_date": "15/06/1985",
"city_name": "Quezon City",
"country_code": "PH"
}
📌 Important Note on Relationships: This API endpoint purposefully handles baseline profile metrics only. It does not include parent or spouse relationship data parameters.
Once the profile has been successfully created via the API, simply log into the family website dashboard, open the newly created relative’s profile page, and use our manual editing tools to select their parents and spouse directly from the standard interactive dropdown list menu. This keeps our connection matrix clean and prevents structural formatting errors in the tree.
5. Verify the Server Response
Click Send. A successful execution will return a status code of 201 Created with a payload matching this layout:
JSON
{
"success": true,
"message": "Family member successfully created externally!",
"member_id": 1420,
"view_url": "https://yourdomain.com/family_member/juan-dela-cruz"
}
Once you receive this confirmation packet, the relative is instantly live, cached, and automatically linked into our interactive tree view, world map, and calendar archives!
