Monica
Log in
API v1
v1
View as Markdown

List contact summaries

GET QUERY /api/v1/vaults/{vault}/contact-summaries

List every person of one of your vaults with only their id, their name, whether they are partial and whether they are archived.

This is the list to read when you want everybody at once, or to check whether somebody already exists before adding them. Partial contacts and full contacts come back together, which the list above never does. It carries no columns and no search: list contacts does both.

Archived contacts are left out unless you ask for them, and deleted contacts are never listed. The order is the default order of the people screen, by name, and it ends on the id so that a page boundary never skips or repeats anybody.

A page holds a hundred contacts unless you ask for another number, and five hundred at most.

This endpoint answers GET and QUERY alike, and both return the same answer. GET sends the parameters in the address, QUERY in the request body. How QUERY works.

Parameters

Path parameters go in the address. GET sends the others in the address too, QUERY sends them as JSON in the request body. Anything not listed here is ignored.

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.

filter string Optional

partial keeps only the partial contacts, full keeps only the others. Both when left out.

archived string Optional default: excluded

included adds the archived contacts.

page integer Optional default: 1

The page to read, starting at 1.

per_page integer Optional default: 100

How many contacts a page holds, five hundred at most.

Returns

A page of contact summaries, and how many there are in all. A filter or an archived value other than the ones above answers 422, naming the parameter. A vault belonging to somebody else answers 404.

data array

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

data[] object

One contact.

data[].id uuid

The id of the contact, the one every other contact endpoint takes.

data[].name string

The name of the contact, written the way the people screen writes it. "Unnamed contact" when they have none.

data[].is_partial boolean

Whether the contact is partial: somebody mentioned in a relationship, without a record of their own.

data[].is_archived boolean

Whether the contact is archived. Always false unless archived contacts were asked for.

meta object

Where you are in the collection.

meta.page integer

The page returned, starting at 1.

meta.per_page integer

How many contacts a page holds.

meta.total integer

How many contacts there are across every page.

Status codes

Every code the API answers with, and what the body holds when it does.

Code When Body
422 Unprocessable Content With QUERY, a parameter was sent both in the address and in the body. A message, and an errors object naming each parameter sent twice.

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/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contact-summaries?filter=partial&page=2&per_page=10 \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contact-summaries?filter=partial&page=2&per_page=10', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contact-summaries?filter=partial&page=2&per_page=10');
QUERY
curl https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contact-summaries \
-X QUERY \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filter": "partial",
"page": 2,
"per_page": 10
}'
const response = await fetch('https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contact-summaries', {
method: 'QUERY',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
filter: 'partial',
page: 2,
per_page: 10,
}),
})
const data = await response.json()
$response = Http::withToken($token)->query('https://my.monicahq.com/api/v1/vaults/9d4f1c2e-7b3a-4f88-9a2d-6c1e5b0f7a31/contact-summaries', [
'filter' => 'partial',
'page' => 2,
'per_page' => 10,
]);
Response 200
{
"data": [
{
"id": "c4a1f7b2-8e36-4d59-b0a7-2f5c9d81e364",
"name": "Pam Beesly",
"is_partial": false,
"is_archived": false
},
{
"id": "7b2e9034-5c18-4af6-9d21-0e83b6c47a5f",
"name": "Dwight Kurt Schrute",
"is_partial": false,
"is_archived": false
}
],
"meta": {
"page": 1,
"per_page": 100,
"total": 2
}
}

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