Lifelog/

API Documentation

Lifelog API Reference

Integrate with Lifelog's API to record your daily activities automatically from shortcuts, custom scripts, or third-party services.

1

Authentication

All API requests must be authenticated using a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_SECRET_TOKEN
2

Endpoints

Record Activity

Creates or updates an activity record in your lifelog.

POST/api/ingest
Request Parameters (JSON)
categoryRequired

String. E.g., "Diary", "Exercise".

valueRequired

Number. Value or amount associated.

contentOptional

String. Description or diary text.

dateOptional

String. ISO date (YYYY-MM-DD). Default: today.

upsertOptional

Boolean. If true, overwrites existing entry for the same date & category.

idOptional

String. UUID for updating a specific existing record.

Example Request (cURL)
curl -X POST https://your-domain.com/api/ingest \ -H "Authorization: Bearer YOUR_API_SECRET" \ -H "Content-Type: application/json" \ -d '{"category": "Diary", "value": 1, "content": "Today was a productive day.", "date": "2026-03-02", "upsert": true}'
Success Response (201 Created)
{
  "success": true,
  "operation": "update",
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "date": "2026-03-02",
      "category": "Diary",
      "content": "Today was a productive day.",
      "value": 1,
      "created_at": "2026-03-02T12:00:00.000Z"
    }
  ]
}