Skip to main content

Contacts

Manage parent/guardian contact information linked to users.

All endpoints require Authorization: Bearer <token>. X-SCHOOL-ID is required for listing contacts.


List Contacts

GET /contacts

Retrieve contact information filtered by user, email, or phone.

Query Parameters

ParameterTypeRequiredDescription
user_iduuidYesFilter by user/owner ID
email_addressstringNoFilter by email
phone_numberstringNoFilter 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

FieldTypeRequiredDescription
owneruuidYesUser ID who owns this contact
email_addressemailYesEmail address
phone_numberstringYesPhone number
physical_addressstringYesPhysical address

Response 200 OK — Returns the created ContactResponse.