Managing Baby Profiles
Baby Basics organizes all tracking data (feedings, diapers, sleep, notes) under baby profiles. Before you can log anything, you need to create at least one child profile.
How It Works
Creating a Baby Profile
Provide a name and date of birth. Future dates are allowed if the baby hasn't been born yet.
API:
curl -X POST https://your-server.com/api/v1/children \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "Baby Bretz", "date_of_birth": "2026-03-15"}'
Response (201):
{
"child": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Baby Bretz",
"date_of_birth": "2026-03-15",
"role": "owner",
"created_at": "2026-02-10T12:00:00.000Z",
"updated_at": "2026-02-10T12:00:00.000Z"
}
}
The creating user is automatically assigned the owner role.
Listing Your Children
Returns all children you have access to, including both children you created and children shared with you.
curl https://your-server.com/api/v1/children \
-H "Authorization: Bearer <token>"
Response (200):
{
"children": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Baby Bretz",
"date_of_birth": "2026-03-15",
"role": "owner",
"created_at": "2026-02-10T12:00:00.000Z",
"updated_at": "2026-02-10T12:00:00.000Z"
}
],
"count": 1
}
Each child includes your role ("owner" or "caregiver").
Updating a Profile
Both owners and caregivers can update a child's name or date of birth. Fields are optional (partial update).
curl -X PUT https://your-server.com/api/v1/children/:id \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"name": "Baby B"}'
Deleting a Profile
Only the owner can delete a child. Deletion cascades and removes all associated tracking data (feedings, diapers, sleep sessions, notes, share links, and access records).
curl -X DELETE https://your-server.com/api/v1/children/:id \
-H "Authorization: Bearer <token>"
Returns 204 No Content on success.
Deleting a child permanently removes all tracking data for that child. This cannot be undone.
API Endpoints Summary
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/children | Create a child profile |
GET | /api/v1/children | List all accessible children |
GET | /api/v1/children/:id | Get a specific child |
PUT | /api/v1/children/:id | Update a child's name or DOB |
DELETE | /api/v1/children/:id | Delete a child (owner only) |
All endpoints require authentication via Authorization: Bearer <token>.
Access Control
| Action | Owner | Caregiver |
|---|---|---|
| Create child | Yes | N/A (creator becomes owner) |
| View child | Yes | Yes |
| Update child | Yes | Yes |
| Delete child | Yes | No (403 Forbidden) |
Caregivers gain access through share links (when implemented). They can view and update the child but cannot delete the profile.
iOS App
In the iOS app, baby profiles are managed under Settings > Baby Profiles. From there you can:
- Add a new baby profile (name + date of birth)
- Edit an existing profile
- Delete a profile (owner only, with confirmation)
The first screen after onboarding prompts you to create your first baby profile.
Validation Rules
- Name: Required, 1-100 characters, automatically trimmed of leading/trailing whitespace
- Date of birth: Required for creation, format
YYYY-MM-DD, future dates allowed - Duplicate names are allowed (siblings can share names)
Error Responses
All errors follow the standard format:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request body validation failed",
"details": [
{ "field": "name", "message": "Required", "code": "required" }
]
}
}
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid or missing fields |
| 401 | UNAUTHORIZED | Missing or expired token |
| 403 | FORBIDDEN | No access, or caregiver trying to delete |
| 404 | NOT_FOUND | Child ID does not exist |
Tips
- You do not need to create multiple profiles for the same baby. One profile holds all tracking data.
- There is no limit on the number of children per account.
- Names are not unique -- you can have two children with the same name if needed.