FamilyNest API Reference

Welcome to the FamilyNest REST API. This documentation covers all available endpoints for building applications that integrate with our parenting and family support platform. The API follows standard REST conventions, uses JSON for request/response bodies, and supports Bearer token authentication.

๐Ÿ”— Base URL https://api.familynest.com/v1

Authentication

All API requests require authentication via a Bearer token in the `Authorization` header. Tokens are generated from your developer dashboard and can be scoped to specific permissions.

Header
Authorization: Bearer <YOUR_API_TOKEN>

Token Scopes

ScopeDescription
read:profileRead family and user profiles
write:trackerCreate/update pregnancy & milestone trackers
read:contentAccess articles, activities, and guides
write:communityPost to forums and community groups

Endpoints

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Families

GET /families/{family_id} Retrieve family profile

Returns detailed information about a specific family account, including members, preferences, and active trackers.

ParameterTypeDescription
family_idstringUnique family identifier required
Response 200
{
  "id": "fam_8x92k1",
  "name": "The Rodriguez Family",
  "members": 3,
  "stage": "toddler",
  "created_at": "2023-04-12T14:30:00Z",
  "preferences": {"notifications": true, "theme": "light"}
}

๐Ÿคฐ Pregnancy & Tracking

POST /pregnancy/trackers Create pregnancy tracker

Initializes a new pregnancy tracking journey for a family member. Requires `write:tracker` scope.

ParameterTypeDescription
expected_datestringISO 8601 due date required
start_datestringPregnancy start date required
notesstringInitial notes or medical details
Request Body
{
  "expected_date": "2024-11-15",
  "start_date": "2024-02-10",
  "notes": "First trimester, low risk."
}

๐ŸŽจ Kids Activities

GET /activities List age-appropriate activities

Fetches educational and creative activities filtered by child age, category, and difficulty.

ParameterTypeDescription
ageintegerChild's age in years required
categorystringcraft, learning, outdoor, sensory
limitintegerMax results (default: 20)

๐Ÿ‘ฅ Community & Forums

POST /community/forums/{forum_id}/posts Create community post

Submits a new discussion post to a moderated parenting forum. Requires `write:community` scope.

ParameterTypeDescription
forum_idstringTarget forum identifier required
titlestringPost title required
bodystringMarkdown-formatted content required

API Playground

Test endpoints directly from your browser. The playground simulates API responses locally for documentation purposes.

// Response will appear here...

Rate Limits

API requests are throttled to ensure platform stability. Limits are applied per API token.

PlanRequests / MinuteRequests / DayBurst Limit
Free1005,00015
Developer50050,00050
Enterprise2,000Unlimited200

Exceeding limits returns 429 Too Many Requests with a Retry-After header.

Error Codes

FamilyNest uses standard HTTP status codes to indicate success or failure. Error responses include a machine-readable code and human-readable message.

CodeStatusDescription
400Bad RequestInvalid syntax or missing required parameters
401UnauthorizedMissing or invalid authentication token
403ForbiddenToken lacks required scope for this resource
404Not FoundRequested resource does not exist
429Too Many RequestsRate limit exceeded
500Internal ErrorUnexpected server-side failure
Error Response
{
  "error": {
    "code": 401,
    "message": "Invalid or expired API token.",
    "docs": "https://docs.familynest.com/errors/401"
  }
}

Webhooks

Subscribe to real-time events in your family dashboard. Webhooks are delivered via HTTPS POST with HMAC signature verification.

Payload Example
{
  "event": "tracker.milestone_reached",
  "timestamp": "2024-05-20T09:14:00Z",
  "data": {
    "family_id": "fam_8x92k1",
    "milestone": "first_steps",
    "age_weeks": 11
  }
}