# Get a contact as Markdown

`GET /api/v1/vaults/{vault}/contacts/{contact}/markdown`

Retrieve everything recorded about one contact as a single Markdown document, written to be read by a person or handed to an assistant.

The body is the document itself, not JSON, with a file name attached. It is the same text the contact page downloads and copies, so an integration and the interface never disagree.

It holds the name and the other ways it is written, every field value under the page and section it sits in, the relationships by category, the life events newest first, the groups, the active reminders and the loans. A part with nothing in it is left out. Headings and labels are written in the language of the account, and what you wrote stays as you wrote it.

Values of fields marked sensitive are left out unless the token presented carries the sensitive fields scope. A token minted for everything does not reach them: that scope has to be asked for by name.

Every call is written to the account log, as an export of the contact.

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

- `vault` (string, required): The vault the contact lives in, named either by the readable name it reports as slug or by its id. Both answer.
- `contact` (string, required): The contact, named either by the readable name it reports as slug or by its id. Both answer. A readable name is rebuilt whenever the record is renamed, and the previous one stops answering, so a client that stores a reference stores the id. A name a record has released is never given to another. The contact has to be in the vault the path names: a contact of yours addressed through the wrong vault answers 404, the same as one that never existed. A contact absorbed by a merge answers 404 here, and the merge endpoints say what became of them.

## Returns

The document, as text. A contact belonging to somebody else answers 404, and so does one of your own addressed through the wrong vault.

## 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/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contacts/c4a1f7b2-8e36-4d59-b0a7-2f5c9d81e364/markdown \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contacts/c4a1f7b2-8e36-4d59-b0a7-2f5c9d81e364/markdown', {
  headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
```

```php
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contacts/c4a1f7b2-8e36-4d59-b0a7-2f5c9d81e364/markdown');
```

## Response

`200`, with no body.
