Monica
Log in
API v1
v1
View as Markdown

List the life events of a vault

GET QUERY /api/v1/vaults/{vault}/life-events

List the life events of a vault, the most recent first.

Deleted life events are left out. Narrow the list to one person with contact, to one type with life_event_type, and to one slice of the timeline with slice. The slices and how many life events each holds are listed by the next endpoint.

The value of a sensitive field comes back as null, with is_hidden set to true, unless the key holds the sensitive-fields scope.

This endpoint answers GET and QUERY alike, and both return the same answer. GET sends the parameters in the address, QUERY in the request body. How QUERY works.

Parameters

Path parameters go in the address. GET sends the others in the address too, QUERY sends them as JSON in the request body. Anything not listed here is ignored.

vault string Required

The vault the life events live in, named either by the readable name it reports as slug or by its id.

contact string Optional

Only the life events this contact took part in, named by its slug or its id. A contact of another vault answers 404.

life_event_type string Optional

Only the life events of this type, named by its id. A type deleted since still narrows the list to the life events recorded as it. A type of another account answers 404.

slice string Optional

upcoming, for the life events dated today or later, the nearest first, past, for every life event before today, the most recent first, or a year such as 2024, for that year up to yesterday, the most recent first. Today is the key owner’s, in their time zone. Any other value answers 422.

page integer Optional default: 1

Which page to answer with.

per_page integer Optional default: 25

How many records one page holds, between 1 and 100. A number outside the range is brought back into it rather than refused.

Returns

A page of life event objects, and how many there are in all. A vault of another account answers 404.

data array

The life events on this page. An empty list rather than an error when there are none.

data[] object

One life event.

data[].type string

Always life_event. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.

data[].id string

The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.

data[].attributes object

Everything the record holds.

data[].attributes.name string

What the life event is called: its title, or the name of its type when it has none.

data[].attributes.title string

The title written for it, or null.

data[].attributes.life_event_type object

Its type. A type deleted since still names the life events recorded as it.

data[].attributes.life_event_type.id uuid

The id of the type, as the life event types endpoints give it.

data[].attributes.life_event_type.name string

What the type is called.

data[].attributes.group object

The group it was recorded on, as an object holding its id and its name, or null when it was not recorded on a group or the group has been deleted.

data[].attributes.happened_on string

The day it happened, written as a year, a month and a day.

data[].attributes.date_precision string

How precisely the day is known: day, month, year, decade or unknown. Below day, happened_on holds the first day of what is known.

data[].attributes.ended_on string

The day it ended, written as a year, a month and a day, or null for something that happened on one day.

data[].attributes.happened_at_time string

The time of day it happened, written as hours and minutes on a 24 hour clock, or null.

data[].attributes.timezone string

The time zone the time is written in, such as Europe/Paris, or null.

data[].attributes.duration_in_minutes integer

How long it lasted, in minutes, or null.

data[].attributes.narrative string

What was written about it, or null.

data[].attributes.location string

Where it happened, or null.

data[].attributes.participants array

The contacts who were there, in order. The first is the person the life event is recorded for.

data[].attributes.participants[] object

One contact who was there.

data[].attributes.participants[].id uuid

The id of the contact.

data[].attributes.participants[].name string

The name the contact is shown under.

data[].attributes.participants[].position integer

Where the contact stands in the list, counting from 0.

data[].attributes.participants[].role string

The part the contact took, such as best man, or null.

data[].attributes.participants[].notes string

What was written about the contact for this life event, or null.

data[].attributes.entity_participants array

The entities that were there, such as a pet or a car. Each holds its id (as the entities endpoints give it), its name, its position among everybody who was there counting from 0, its role and its notes, the last two possibly null. Empty when only contacts took part, and always empty right after a create, which takes contacts only.

data[].attributes.fields array

The values of the custom fields its type asks for. A field left empty is not listed.

data[].attributes.fields[] object

One value.

data[].attributes.fields[].field_id string

The id of the field, which is the key a value is written under when the life event is updated.

data[].attributes.fields[].key string

How the field is named in an import or an export. It is unique inside its group only.

data[].attributes.fields[].label string

What the field is called on the life event.

data[].attributes.fields[].type string

The kind of field: text, date, select, address and so on.

data[].attributes.fields[].row integer

For a field inside a repeating group, the id of the repetition it belongs to, which is the id an update keeps that repetition by. Null otherwise.

data[].attributes.fields[].value string

The value, written as the contact page shows it. A file field gives the name of the file. Null when hidden.

data[].attributes.fields[].is_hidden boolean

Whether the value was held back because the field is sensitive and the key does not hold the sensitive-fields scope.

data[].attributes.created_from string

Where it was written from: contact, dashboard, group, api, mcp, day, import or module.

data[].attributes.deleted_at timestamp

When it was deleted, as a count of seconds since 1970, or null.

data[].attributes.created_at timestamp

When it was written down, as a count of seconds since 1970.

data[].attributes.updated_at timestamp

When it last changed, as a count of seconds since 1970.

data[].links object

Where to find this record.

data[].links.self string

The absolute address this record is read from.

data[].links.web string

The page of the contact the life event is recorded for, whose timeline shows it, in the application. It is the link to give a person.

meta object

Where you are in the collection.

meta.page integer

The page this is, counting from 1.

meta.per_page integer

How many one page holds, which is the size that was asked for once it has been brought into the allowed range.

meta.total integer

How many life events there are in all, not how many are on this page.

Status codes

Every code the API answers with, and what the body holds when it does.

Code When Body
422 Unprocessable Content With QUERY, a parameter was sent both in the address and in the body. A message, and an errors object naming each parameter sent twice.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

GET
curl https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events?slice=2024&page=2&per_page=10 \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events?slice=2024&page=2&per_page=10', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events?slice=2024&page=2&per_page=10');
QUERY
curl https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events \
-X QUERY \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slice": "2024",
"page": 2,
"per_page": 10
}'
const response = await fetch('https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events', {
method: 'QUERY',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
slice: '2024',
page: 2,
per_page: 10,
}),
})
const data = await response.json()
$response = Http::withToken($token)->query('https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events', [
'slice' => '2024',
'page' => 2,
'per_page' => 10,
]);
Response 200
{
"data": [
{
"type": "life_event",
"id": "7c1e5a92-4b3d-4f80-a6e2-93d0b1c4f857",
"attributes": {
"name": "Lunch at Cugino’s",
"title": "Lunch at Cugino’s",
"life_event_type": {
"id": "b2f4d6a8-1c3e-4a5b-8d7f-0e9c2b4a6d81",
"name": "Meal"
},
"group": null,
"happened_on": "2026-10-09",
"date_precision": "day",
"ended_on": null,
"happened_at_time": "12:30",
"timezone": "America/New_York",
"duration_in_minutes": 60,
"narrative": "Michael insisted on paying, then asked for the receipt.",
"location": "Scranton",
"participants": [
{
"id": "0d3f9b2e-6a41-4c7d-9e58-2b1a7c4e6f90",
"name": "Pam Beesly",
"position": 0,
"role": null,
"notes": null
},
{
"id": "e5a8c1f3-7b29-4d06-8a4e-5c2d9f1b3a67",
"name": "Jim Halpert",
"position": 1,
"role": null,
"notes": null
}
],
"entity_participants": [],
"fields": [
{
"field_id": "412",
"key": "dish",
"label": "Dish",
"type": "text",
"row": null,
"value": "Chicken parm",
"is_hidden": false
}
],
"created_from": "api",
"deleted_at": null,
"created_at": 1791547200,
"updated_at": 1791547200
},
"links": {
"self": "https://friends.ban.is/api/v1/vaults/dunder-mifflin/life-events/7c1e5a92-4b3d-4f80-a6e2-93d0b1c4f857",
"web": "https://friends.ban.is/vaults/dunder-mifflin/contacts/pam-beesly"
}
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1
}
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.