# Get a relationship type

`GET /api/v1/relationship-types/{relationshipType}`

Retrieve one kind of link: how it reads from each side, and how many relationships use it.

The relationships written with the type are not in here. This is the vocabulary rather than what was said with it.

This endpoint also answers QUERY, with the same parameters sent in the request body. [How QUERY works](https://my.monicahq.com/docs/api/query-method).

## Path parameters

- `relationshipType` (uuid, required): The id of the type. A path that is not a uuid answers 404 without a query being run.

## Returns

A relationship type object. A type belonging to somebody else answers 404, which is also what a type that never existed answers, and what a deleted one answers.

- `data` (object): The 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.

## 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://my.monicahq.com/api/v1/relationship-types/3a9c5e21-7b40-4f68-8d13-6e2f0a4b9c57 \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/relationship-types/3a9c5e21-7b40-4f68-8d13-6e2f0a4b9c57', {
  headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/relationship-types/3a9c5e21-7b40-4f68-8d13-6e2f0a4b9c57');
```

## Response

`200`

```json
{
    "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"
        }
    }
}
```
