API v1
v1
View as Markdown

List relationship types

GET /api/v1/relationship-types

List every kind of link your account can put between two people, grouped order first.

A relationship type is the vocabulary your account uses about the people in it: Parent / Child, Sibling, Partner, Friend, Colleague. Every account starts with ten of them under four of the five supplied categories.

The order is the one the picker offers: the category position first, then the position inside the category. Retired types are listed with the rest, because one that is off is meant to be found again.

To read one category at a time instead, ask for the types of that category.

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 relationship 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 relationship_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.relationship_category_id uuid

The category the type is filed under. It groups the list and the picker and has no other effect: moving a type between categories never changes what the product does with it.

data[].attributes.name string

What the link is called: Parent / Child, Sibling, Colleague. A type the product supplied reads in the language you ask for, until somebody rewrites it, after which their words stand in every language. Up to 255 characters, reduced to plain text.

data[].attributes.role_a string

How the first person relates to the second. In a Parent / Child link the first person is the Parent. It is read in the same way the name is.

data[].attributes.role_b string

How the second person relates to the first. A symmetric type carries the same word here as in role_a, and rewording the two never swaps the people over: the first role stays on the first person of every relationship already written.

data[].attributes.is_symmetric boolean

Whether both people read the same word, as Friend does, rather than a different one on each side, as Parent / Child does. It is frozen once the product supplied the type or a relationship uses it, because turning it round would rewrite what people wrote years ago.

data[].attributes.system_behavior string

Either genealogy_parentage, which feeds the family tree, or romantic, which feeds romantic history, or null. It is attached to the supplied type itself rather than to its name or its category, so renaming one or moving it elsewhere changes the words on screen and nothing more. A type you invent never acquires one.

data[].attributes.position integer

Where the type sits inside its category, counting from 1. Retired types are numbered along with the rest.

data[].attributes.is_system boolean

Whether the product supplied the type with the account. A supplied type may be reworded, moved and retired, never deleted, and its direction never changes.

data[].attributes.is_active boolean

Whether the type is offered when a new relationship is written. False stops it being chosen again and touches nothing already written.

data[].attributes.relationship_count integer

How many relationships are written with this type, across every vault of your account. A relationship in the bin is not counted. It decides both whether the type may be deleted and whether its direction may still move.

data[].attributes.created_at timestamp

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

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/relationship-types \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/relationship-types', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/relationship-types');
Response 200
{
"data": [
{
"type": "relationship_type",
"id": "3a9c5e21-7b40-4f68-8d13-6e2f0a4b9c57",
"attributes": {
"relationship_category_id": "7d1f4a83-2c06-4e59-9b27-8f3a5d0e6c14",
"name": "Parent / Child",
"role_a": "Parent",
"role_b": "Child",
"is_symmetric": false,
"system_behavior": "genealogy_parentage",
"position": 1,
"is_system": true,
"is_active": true,
"relationship_count": 12,
"created_at": 1756252800,
"updated_at": 1756252800
},
"links": {
"self": "https://my.monicahq.com/api/v1/relationship-types/3a9c5e21-7b40-4f68-8d13-6e2f0a4b9c57"
}
},
{
"type": "relationship_type",
"id": "c60d8f14-9a27-4b53-8e01-2d7f5c3a6b48",
"attributes": {
"relationship_category_id": "7d1f4a83-2c06-4e59-9b27-8f3a5d0e6c14",
"name": "Godparent / Godchild",
"role_a": "Godparent",
"role_b": "Godchild",
"is_symmetric": false,
"system_behavior": null,
"position": 6,
"is_system": false,
"is_active": true,
"relationship_count": 0,
"created_at": 1756339200,
"updated_at": 1756425600
},
"links": {
"self": "https://my.monicahq.com/api/v1/relationship-types/c60d8f14-9a27-4b53-8e01-2d7f5c3a6b48"
}
}
],
"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.