API v1
v1
View as Markdown

Delete a key

DELETE /api/v1/api-keys/{apiKey}

Revoke a key, which stops working the moment this answers.

Anything still using it stops working, immediately, with nothing to wait out. Your other keys are untouched, which is the point of naming them: an integration you no longer trust can be cut off without breaking the rest.

You may revoke the key you are calling with. This call succeeds and every later call with it answers 401.

Path parameters

Sent as JSON. Anything not listed here is ignored.

apiKey integer Required

The id of the key.

Returns

Nothing at all. A key belonging to somebody else answers 404, and keeps working.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

DELETE
curl https://my.monicahq.com/api/v1/api-keys/3 \
-X DELETE \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/api-keys/3', {
method: 'DELETE',
headers: { Authorization: `Bearer ${token}` },
})
$response = Http::withToken($token)->delete('https://my.monicahq.com/api/v1/api-keys/3');
Response 204

No content.

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