# Samlla > Samlla is a private Quantified Self service for observing your own data, not a coach that sets goals or judges behavior. ## Authentication Base URL: https://api.samlla.app Public API prefix: /api/v1/public Send the API key in the X-API-Key header. Every endpoint path below is relative to the Public API prefix. In Samlla, open Account menu -> API Keys -> Create API Key -> Permissions -> Read & write. New keys default to read-only; automations that create or correct data need Read & write. In the Polish interface: Klucze API -> Utwórz klucz API -> Odczyt i zapis; Prywatność -> Udziel zgody. Valid consent to processing health data is required for Public API content. Open Account menu -> Privacy -> Give consent. A missing or withdrawn consent returns 403 HEALTH_CONSENT_REQUIRED. ## Objects Tracker = {id, name, description, color, icon, is_journal_mode, category_id, metrics, last_entry_date} Metric = {id, name, metric_type, unit, is_active} Entry = {id, tracker_id, entry_time, notes, values, created_at} Entry value = {metric_id, number_value} ## Core endpoints GET /trackers -> 200, Tracker[] as a bare array with no pagination wrapper. POST /trackers -> 201, one Tracker including generated metric IDs. Minimal body: {"name":"Sent emails","icon":"✉️","metrics":[{"name":"Sent","metric_type":"number","unit":"emails"}]} GET /entries?date=YYYY-MM-DD&tracker_id=UUID&limit=100 -> 200, Entry[] as a bare array. date is required, tracker_id is optional, and limit is 1-1000. The date boundary is UTC. POST /entries -> 202, {task_id,status,message}. Minimal body: {"tracker_id":"UUID","entry_time":"2026-11-04T12:00:00+01:00","values":[{"metric_id":"UUID","number_value":17}]} GET /entries/status/{task_id} -> 200, {task_id,status,result,error}. Normal statuses are PENDING, STARTED, RETRY, SUCCESS, and FAILURE. Poll every 2 seconds for at most 60 seconds. PATCH /entries/{entry_id} -> 200, one Entry. Minimal correction body: {"values":[{"metric_id":"UUID","number_value":17}]} DELETE /entries/{entry_id} -> 204. POST /entries is asynchronous. Treat a write as complete only when status is SUCCESS and result.status is "success". A successful result is {status:"success",entry_id,duplicate}; a duplicate may also have duplicate:true. SUCCESS with result.status "error" is a failed write. SUCCESS with result.status "skipped_consent_required" means consent was withdrawn after queueing and no entry was written; restore consent and retry. A polling timeout is a retryable failure, never a silent success. ## Errors and limits Public errors use {error_code,detail}; both fields contain a stable code. - 401 API_KEY_INVALID: the key is invalid, inactive, or expired. A completely missing required X-API-Key header is 422 INVALID_INPUT. - 403 API_KEY_READ_ONLY: a read-only key called a write endpoint. - 403 HEALTH_CONSENT_REQUIRED: valid health-data consent is missing or withdrawn. - 403 tracker_limit_reached or metric_limit_reached: the account plan limit was reached. - 404: the requested user-owned resource is unavailable, or a status task belongs to another user. An unknown or expired task ID can remain 200 PENDING; stop after the polling timeout. Entries outside the plan's visible history behave as unavailable for read, update, and delete. - 422 INVALID_INPUT: a required query, header, or body field is missing or invalid. - 429 RATE_LIMIT_EXCEEDED: wait for the Retry-After header before retrying. Read and write limits use independent one-minute windows per API key: 60 reads/minute and 20 writes/minute. Task-status polling is not rate limited. Account plan limits apply to Public API. Free allows 5 trackers, 3 metrics per tracker, and 90 days of visible/editable entry history. Pro has no tracker, metric, or history limit. Do not backfill outside the account's visible history window. ## MCP Connector URL: https://api.samlla.app/mcp/ Transport: Streamable HTTP. In Claude, add the connector URL, sign in to Samlla through OAuth 2.1, and approve access. Other MCP clients that support OAuth 2.1 may work but are not tested. OAuth scopes: samlla.mcp.read is required for every request; write tools also require samlla.mcp.write. Valid consent to processing health data is checked on every MCP request. ### MCP tools - `list_trackers` — List the user's trackers, optionally including archived trackers or filtering by category. - `get_tracker` — Get one user-owned tracker and its metrics by tracker ID. - `list_categories` — List the user's tracker categories and active tracker counts. - `list_entries` — List visible entries for one tracker and date range. - `get_journal` — Get one user-local journal day with its entries and counts. - `create_entry` — Create one entry synchronously and return the saved entry. - `update_entry` — Update selected fields of one visible entry. - `delete_entry` — Permanently delete one visible entry. - `create_category` — Create a category for grouping trackers. - `update_category` — Rename, restyle, or reparent a category. - `create_tracker` — Create a tracker with optional metrics. - `update_tracker` — Rename, restyle, or re-file a tracker. - `add_metric` — Add a metric to an existing non-journal tracker. - `update_metric` — Update safe metric fields while protecting recorded data. MCP allows 60 requests per minute per credential for read and write calls combined. `create_entry` has no deduplication: retrying the same call creates a second entry. MCP uses the account's plan and health-data consent rules. On Free, creation is limited to 5 trackers, 3 metrics per tracker, and 2 categories. `list_entries`, `get_journal`, `update_entry`, and `delete_entry` apply the 90-day history window. `create_entry` does not apply that plan history window and accepts timestamps from 2020 onward, so do not use it to backfill outside visible history. MCP and the Public API are available on the Free plan. ## Daily aggregate automation Store a daily aggregate at 12:00 local time with the UTC offset. For durable idempotency, compute which UTC date contains that timestamp, GET entries for that date and tracker, then compare entry_time in the user's local timezone. If the local-day entry is missing and its values are not all zero, POST it; if its values changed and remain nonzero, PATCH it; if corrected values are all zero, DELETE it; if it matches or is missing with all-zero values, do nothing. Daily-count automations: a missing entry means 0. Do not create entries whose values are all zero; if a corrected day drops to 0, delete its entry. A source error is never 0: skip the day and report the error. entry_time must be on or after 2020-01-01 and no more than one hour in the future. Daily automations should write only completed days. Server deduplication only covers the same tracker, entry time within one minute, identical values, and entries created during the last 24 hours. It is not durable automation state; the GET/PATCH strategy is. During history backfill, wait 4 seconds between writes (15/minute, safely below 20/minute). Poll every POST until SUCCESS plus result.status "success" before continuing. Keep automation code short and readable. Do not parse OpenAPI at runtime. Integrations should observe one daily number; do not add goals, streaks, thresholds, alerts, or judgments. ## Full specification and recipes OpenAPI: https://api.samlla.app/openapi.json Recipes (English): https://samlla.app/wiki/recipes/index Przepisy (Polski): https://samlla.app/pl/wiki/przepisy/index