# Record a life event on a group

`POST /api/v1/vaults/{vault}/groups/{group}/life-events`

Write down something that happened to a group. It shows on the group page and goes on the timeline of everybody who was there, and the change is written to the account log.

Groups are not yet available to every account. Until they are available to yours, every endpoint here answers 404.

The ids of the custom fields come from GET /life-event-types/{lifeEventType}/fields.

A refusal names what it is about: life_event_type, happened_on, participants (missing or empty), a field under fields, or fields as a whole when a required field is left empty.

## Parameters

- `vault` (string, required): The vault the group lives in, named either by the readable name it reports as slug or by its id.
- `group` (uuid, required): The id of the group. One addressed through the wrong vault, deleted, or belonging to another account, answers 404.
- `life_event_type` (uuid, required): The id of its type, as the life event types endpoints give it. A type switched off cannot be chosen and answers 422.
- `happened_on` (string, required): The day it happened, written as a year, a month and a day.
- `participants` (array, required): The contacts who were there, in order, each named by its slug or its id, at least one. The first is the person the life event is recorded for. A contact of another vault answers 404.
- `title` (string, optional): A title, up to 255 characters. Without one, the life event is called by the name of its type.
- `narrative` (string, optional): What happened, up to 65,535 characters.
- `location` (string, optional): Where it happened, up to 255 characters.
- `duration_in_minutes` (integer, optional): How long it lasted, from 1 to 525,600 minutes (one year).
- `fields` (object, optional): The values of the custom fields its type asks for, keyed by field id, in the same way as when a life event is recorded. A file field cannot be written here and answers 422.

## Returns

The life event object that was recorded, with the group it belongs to.

- `data` (object): The 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.
- `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.
- `data.attributes.group.id` (uuid): The id of the group.
- `data.attributes.group.name` (string): What the group is called.
- `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.user_was_there` (boolean): Whether the person the key belongs to was there. A life event recorded on a group starts as true, and the life events endpoints can change it.
- `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. Null otherwise.
- `data.attributes.fields[].value` (string): The value, written as the contact page shows it. 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. A life event recorded here says group.
- `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.

## Rate limit

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

## Request

```sh
curl https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/life-events \
  -X POST \
  -H "Authorization: Bearer $MONICA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
      "life_event_type": "b2f4d6a8-1c3e-4a5b-8d7f-0e9c2b4a6d81",
      "happened_on": "2026-10-09",
      "participants": [
          "angela-martin",
          "phyllis-vance"
      ],
      "title": "Budget review",
      "narrative": "Angela went through every receipt twice.",
      "location": "Conference room",
      "duration_in_minutes": 90,
      "fields": {
          "412": "Party budget"
      }
  }'
```

```javascript
const response = await fetch('https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/life-events', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    life_event_type: 'b2f4d6a8-1c3e-4a5b-8d7f-0e9c2b4a6d81',
    happened_on: '2026-10-09',
    participants: ["angela-martin","phyllis-vance"],
    title: 'Budget review',
    narrative: 'Angela went through every receipt twice.',
    location: 'Conference room',
    duration_in_minutes: 90,
    fields: {"412":"Party budget"},
  }),
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->post('https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/life-events', [
    'life_event_type' => 'b2f4d6a8-1c3e-4a5b-8d7f-0e9c2b4a6d81',
    'happened_on' => '2026-10-09',
    'participants' => ['angela-martin', 'phyllis-vance'],
    'title' => 'Budget review',
    'narrative' => 'Angela went through every receipt twice.',
    'location' => 'Conference room',
    'duration_in_minutes' => 90,
    'fields' => ['412' => 'Party budget'],
]);
```

## Response

`201`

```json
{
    "data": {
        "type": "life_event",
        "id": "3b8e1d47-9a20-4c65-b7f3-d2a6905c8e14",
        "attributes": {
            "name": "Budget review",
            "title": "Budget review",
            "life_event_type": {
                "id": "b2f4d6a8-1c3e-4a5b-8d7f-0e9c2b4a6d81",
                "name": "Meeting"
            },
            "group": {
                "id": "5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7",
                "name": "Party planning committee"
            },
            "happened_on": "2026-10-09",
            "date_precision": "day",
            "ended_on": null,
            "happened_at_time": "12:30",
            "timezone": "America/New_York",
            "duration_in_minutes": 90,
            "narrative": "Angela went through every receipt twice.",
            "location": "Conference room",
            "user_was_there": true,
            "participants": [
                {
                    "id": "0d3f9b2e-6a41-4c7d-9e58-2b1a7c4e6f90",
                    "name": "Angela Martin",
                    "position": 0,
                    "role": null,
                    "notes": null
                },
                {
                    "id": "e5a8c1f3-7b29-4d06-8a4e-5c2d9f1b3a67",
                    "name": "Phyllis Vance",
                    "position": 1,
                    "role": null,
                    "notes": null
                }
            ],
            "entity_participants": [],
            "fields": [
                {
                    "field_id": "412",
                    "key": "agenda",
                    "label": "Agenda",
                    "type": "text",
                    "row": null,
                    "value": "Party budget",
                    "is_hidden": false
                }
            ],
            "created_from": "group",
            "deleted_at": null,
            "created_at": 1791547200,
            "updated_at": 1791547200
        },
        "links": {
            "self": "https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/life-events/3b8e1d47-9a20-4c65-b7f3-d2a6905c8e14",
            "web": "https://people.hansyeoh.com/vaults/dunder-mifflin/contacts/angela-martin"
        }
    }
}
```
