API v1
v1
View as Markdown

List logs

GET /api/v1/logs

List what has been done in your account, newest first.

The account log belongs to the account rather than to you, which matters in one case: an entry the application wrote on its own has nobody behind it, and those are exactly the entries nobody watched happen. Its author reads as the system and it carries no address.

Each entry carries both the raw name of the action, which is what a program matches on, and a sentence in the language on your account, which is what a person reads.

Nothing here can be written, changed or removed. A log that can be rewritten is worth nothing, so there is no endpoint for it.

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 entries one page holds, between 1 and 100. A number outside the range is brought back into it rather than refused.

Returns

A page of account log entries, and how many there are in all.

data array

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

data[] object

One entry.

data[].type string

Always log. 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.author string

Who did it: their name while they are still on the account, the address they had once they are not, and a translated phrase reading The system for anything the product did on its own. Worked out when you ask rather than stored, so a deleted person still reads as somebody.

data[].attributes.action string

What was done, as a key such as vault_created or contact_deleted, up to 255 characters. The keys come from a set the product keeps and adds to as it gains capabilities, and the column is a plain string rather than a fixed set, so match the ones you care about and let an unfamiliar one through rather than treating it as an error.

data[].attributes.parameters object

What the action was about, as whatever that kind of action recorded. The keys depend entirely on the action, so nothing here promises a shape: a vault creation carries the name of the vault, another action carries something else.

data[].attributes.description string

The entry as a sentence a person can read, with the parameters already put into it. Worked out when you ask, and in the language of whoever is asking.

data[].attributes.source string

Where it came from: one of web, api, mcp, import, automation, module or system. It is how a change made by a script is told from one made by hand.

data[].attributes.ip_address string

The address the request came from, up to 45 characters so that a version six address fits, or null when nothing was recorded, which is the case for anything the system did on its own.

data[].attributes.created_at timestamp

When it happened, as a count of seconds since 1970. The account log is append only, so this never moves.

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 entries 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/logs \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/logs', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/logs');
Response 200
{
"data": [
{
"type": "log",
"id": "12",
"attributes": {
"author": "Michael Scott",
"action": "api_key_created",
"parameters": {
"name": "Dundie awards bot"
},
"description": "Created the API key called Dundie awards bot",
"source": "web",
"ip_address": "192.168.1.24",
"created_at": 1756339200
},
"links": {
"self": "https://my.monicahq.com/api/v1/logs/12"
}
},
{
"type": "log",
"id": "11",
"attributes": {
"author": "The system",
"action": "account_created",
"parameters": null,
"description": "Created the account",
"source": "system",
"ip_address": null,
"created_at": 1756252800
},
"links": {
"self": "https://my.monicahq.com/api/v1/logs/11"
}
}
],
"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.