Documentation

Contacts API

List, save and update the people a user has met, and record each time they meet again.

This page shows you how to read and manage the signed-in user's contacts. You need a user access token with contact:read, plus contact:write to change anything.

A contact is somebody the user saved after meeting them, typically by tapping a card. Each contact holds visits, one per encounter, so the list records how often and where the user met each person.

List contacts

curl "https://api.davi.social/api/v1/contacts?detail=summary&sort_by=last_visited" \
  -H "Authorization: Bearer ACCESS_TOKEN"

GET /contacts (scope contact:read) is paginated with the standard parameters and takes these filters:

ParameterValuesEffect
detailfull, summaryComplete profile data, or basic info
activity_uuidUUIDOnly contacts met at that activity
typesaved, droppedFilter by contact type
visited_afterISO 8601 datetimeOnly contacts visited since then
sort_bycreated_at, last_visitedDefault created_at
sort_orderasc, descDefault desc

detail changes the response shape: use summary for a list view and full for a detail view.

For a "recently met" view, sort by last_visited. created_at orders by when the contact was first saved.

Read, update, remove

EndpointScopeDoes
POST /contactscontact:writeSave a contact
GET /contacts/{contact_uuid}contact:readRead one
PATCH /contacts/{contact_uuid}contact:writeUpdate it
DELETE /contacts/{contact_uuid}contact:writeRemove it

Visits

When the user meets a saved contact again, add a visit instead of saving the contact a second time. last_visited and visited_after are computed from visits.

curl -X POST "https://api.davi.social/api/v1/contacts/CONTACT_UUID/visits" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json"

POST /contacts/{contact_uuid}/visits and DELETE /contacts/{contact_uuid}/visits/{visit_uuid} both take contact:write.

Where contacts were met

curl "https://api.davi.social/api/v1/contacts/activities" \
  -H "Authorization: Bearer ACCESS_TOKEN"

GET /contacts/activities (scope contact:read) lists the activities where the user has met contacts, with a count for each. To list the contacts from one of them, pass its UUID as activity_uuid to GET /contacts.

Next