API v1
v1
View as Markdown

Offer or retire a life event category

PUT /api/v1/life-event-categories/{lifeEventCategory}/activation

Say whether a category, and every nature under it, may still be chosen when a life event is recorded.

Retiring a category takes it out of the choice offered when somebody records a life event. It is the answer wherever deletion is refused, and it works on a category the product supplied as readily as on your own.

Nothing already written is touched. Every life event keeps its nature and reads as it did, and the category keeps the place it had, so offering it again puts it back where it was rather than at the end.

Retiring a category retires the choice of every nature under it, and offering it again brings them all back, each still holding whether it is offered in its own right.

Send the state you want rather than asking for a toggle, so sending the same value twice confirms it instead of inverting it.

Parameters

Sent as JSON. Anything not listed here is ignored.

lifeEventCategory uuid Required

The id of the category. A path that is not a uuid answers 404 without a query being run.

is_active boolean Required

True to offer the category again, false to retire it.

Returns

The life event category object in the state you asked for.

data object

The category.

data.type string

Always life_event_category. 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 category is called. A category the product supplied reads in the language you ask for, until somebody renames it, after which their words stand in every language. Up to 255 characters, reduced to plain text, so no markup survives here.

data.attributes.position integer

Where the category sits in the settings, the pickers and the journal filters, counting from 1. Retired categories are numbered along with the rest, so one switched back on finds the place it had.

data.attributes.is_system boolean

Whether the product supplied the category with the account. It governs one thing and one thing only: a supplied category cannot be deleted. It may be renamed, moved and retired like any other.

data.attributes.is_active boolean

Whether the category and the natures under it are offered when a life event is recorded. False removes the whole category from that choice and touches nothing already written.

data.attributes.life_event_type_count integer

How many life event natures are filed under the category, retired ones counted. It is what decides whether the category may be deleted.

data.attributes.created_at timestamp

When the category was added, as a count of seconds since 1970 rather than a written date.

data.attributes.updated_at timestamp

When it last changed, as a count of seconds. Equal to created_at until it first changes.

data.links object

Where to find this record.

data.links.self string

The absolute address this record is read from.

Rate limit

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

PUT
curl https://my.monicahq.com/api/v1/life-event-categories/a71d6e04-2b58-4c39-9f80-3e5c1a7b2d46/activation \
-X PUT \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"is_active": "false"
}'
const response = await fetch('https://my.monicahq.com/api/v1/life-event-categories/a71d6e04-2b58-4c39-9f80-3e5c1a7b2d46/activation', {
method: 'PUT',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
is_active: 'false',
}),
})
const data = await response.json()
$response = Http::withToken($token)->put('https://my.monicahq.com/api/v1/life-event-categories/a71d6e04-2b58-4c39-9f80-3e5c1a7b2d46/activation', [
'is_active' => 'false',
]);
Response 200
{
"data": {
"type": "life_event_category",
"id": "5f8b3c21-9d07-4a64-8e12-7b0a4d6c3e95",
"attributes": {
"name": "Relationships and family",
"position": 1,
"is_system": true,
"is_active": true,
"life_event_type_count": 0,
"created_at": 1756252800,
"updated_at": 1756252800
},
"links": {
"self": "https://my.monicahq.com/api/v1/life-event-categories/5f8b3c21-9d07-4a64-8e12-7b0a4d6c3e95"
}
}
}

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