API v1
v1
View as Markdown

List entity types

GET /api/v1/entity-types

List the kinds of object your account invented, in the order you arranged them.

A type is the noun you reached for when nothing the product ships with fits: Animal, Company, Recipe, Wine bottle. It belongs to your account rather than to one vault, so a type declared once is visible in every vault you hold.

The order is the one you gave them, which is the order they are listed in down the side of a vault. It is not the order they were declared in. Types that may no longer be filed under are listed with the rest, because one that is off is meant to be found again and switched back on.

A deleted type is never listed. An account that invented nothing answers with an empty list rather than an error, since that is the state every account starts in.

This endpoint also answers QUERY, with the same parameters sent in the request body. How QUERY works.

Query parameters

Sent as JSON. Anything not listed here is ignored.

page integer Optional default: 1

Which page to answer with.

per_page integer Optional default: 25

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

Returns

A page of entity type objects, and how many there are in all.

data array

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

data[] object

One type.

data[].type string

Always entity_type. 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.slug string

How the type is addressed in the application itself, in lower case letters, numbers and dashes. It is settled when the type is declared and never rebuilt, so a link that already went out keeps working through any rename. Use it to build a browser link; use the id for every call here.

data[].attributes.name_singular string

What one of these is called: Animal, Company, Recipe. Up to 255 characters. Reduced to plain text when it was written down, so no markup survives here.

data[].attributes.name_plural string

What several of them are called. Stored rather than derived from the singular, because a plural derived in English is wrong in most other languages.

data[].attributes.description string

What the type is for, up to 65535 characters, or null when nobody said.

data[].attributes.icon string

One of profile, logs, security, preferences, key, device, info, life event, mail, sun, moon or check. It is a name rather than a drawing, so the picture lives in the application and the type stores a word.

data[].attributes.colour string

Exactly one of #3f5fd0, #4f8a49, #9a6a24, #9a3f2b, #5d5f96 or #1d1d20, written in lower case. It is how types are told apart at a glance in the navigation, and it is decoration: nothing depends on it.

data[].attributes.position integer

Where the type sits in the vault navigation, counting from 1. It is the order you arranged, and it is the order the list endpoint answers in. Types that may no longer be filed under are numbered along with the rest, so one switched back on finds the place it had.

data[].attributes.is_active boolean

Whether new records may still be filed under the type. False stops the button that adds another and touches nothing already filed: every record stays readable and stays editable.

data[].attributes.entity_count integer

How many records of this kind exist, across every vault of your account. It is a running count kept as records are written down and deleted, rather than something counted when you ask, and it is what decides whether the type may be deleted.

data[].attributes.created_at timestamp

When the type was declared, 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.

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 types there are in all, not how many are on this page.

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://my.monicahq.com/api/v1/entity-types \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/entity-types', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/entity-types');
Response 200
{
"data": [
{
"type": "entity_type",
"id": "4c2b9f10-5e37-4a6d-8b91-0f7c3d2a8e64",
"attributes": {
"slug": "animal",
"name_singular": "Animal",
"name_plural": "Animals",
"description": "Every creature the family keeps.",
"icon": "profile",
"colour": "#4f8a49",
"position": 1,
"is_active": true,
"entity_count": 12,
"created_at": 1756252800,
"updated_at": 1756339200
},
"links": {
"self": "https://my.monicahq.com/api/v1/entity-types/4c2b9f10-5e37-4a6d-8b91-0f7c3d2a8e64"
}
},
{
"type": "entity_type",
"id": "e8a51d73-9c04-4b28-a6f5-31b7e0c4d925",
"attributes": {
"slug": "wine-bottle",
"name_singular": "Wine bottle",
"name_plural": "Wine bottles",
"description": null,
"icon": "key",
"colour": "#9a6a24",
"position": 2,
"is_active": false,
"entity_count": 0,
"created_at": 1756166400,
"updated_at": 1756166400
},
"links": {
"self": "https://my.monicahq.com/api/v1/entity-types/e8a51d73-9c04-4b28-a6f5-31b7e0c4d925"
}
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 2
}
}

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