API v1
v1
View as Markdown

Get a log

GET /api/v1/logs/{log}

Retrieve one entry of your account log.

What changed is not in here. A field somebody marked sensitive records that it changed and not what to, and until the product settles how those values may be kept, the whole column stays out of the API rather than half of it coming through.

This endpoint also answers QUERY, with the same parameters sent in the request body. How QUERY works.

Path parameters

Sent as JSON. Anything not listed here is ignored.

log integer Required

The id of the entry.

Returns

An account log entry. An entry from another account answers 404.

data object

The 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.

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/12 \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/logs/12', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/logs/12');
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"
}
}
}

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