API v1
v1
View as Markdown

Authentication

GET /api/v1/me

Every request outside the status endpoint carries a token, as a bearer token in the Authorization header. Get one by registering or logging in through the API, or make one by hand in security settings.

A key acts as you, with exactly the access you have. Make one per integration, so you can revoke it alone.

Tokens do not expire. They are revoked rather than refreshed, either by logging out or from the security screen.

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

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/me \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/me', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/me');
Response 200
{
"data": {
"type": "user",
"id": "1",
"attributes": {
"first_name": "Michael",
"last_name": "Scott",
"email": "[email protected]"
},
"links": {
"self": "https://my.monicahq.com/api/v1/me"
}
}
}

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