Contacts
Manage parent/guardian contact information linked to users.
All endpoints require
Authorization: Bearer <token>.X-SCHOOL-IDis required for listing contacts.
List Contacts
GET /contacts
Retrieve contact information filtered by user, email, or phone.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | uuid | Yes | Filter by user/owner ID |
email_address | string | No | Filter by email |
phone_number | string | No | Filter by phone |
Example
curl -X GET "https://api.vanillatots.com/contacts?user_id=user-uuid" \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID"
Response 200 OK
{
"id": "uuid",
"owner": "user-uuid",
"email_address": "parent@email.com",
"phone_number": "+2348012345678",
"physical_address": "123 Main Street, Lagos"
}
Create Contact
POST /contacts
Create a new contact record.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
owner | uuid | Yes | User ID who owns this contact |
email_address | Yes | Email address | |
phone_number | string | Yes | Phone number |
physical_address | string | Yes | Physical address |
Response 200 OK — Returns the created ContactResponse.