Mowlog Developer API v1
A tiny REST API for logging mows and firmware changes from Home Assistant, scripts, and one-off importers. Token-authenticated. No OAuth in v1.
Early access
The API contract is stable in shape (additive-only changes within v1). Mowlog is still in early access, and stored data may be reset. Entries are not yet a durable archive. See the full disclaimer before building an integration.
Get a token
Sign in and open Profile, then click "Manage API tokens" under API & integrations. Click "New token", give it a name, pick scopes, and optionally restrict it to one mower. Copy the token immediately, you cannot see it again.
Hello world
curl https://www.mowlog.com/api/public/v1/me \ -H "Authorization: Bearer mowlog_pat_..."
Home Assistant quick start
Gotcha: the Home Assistant secret mowlog_token must include the word Bearer. Its value is Bearer mowlog_pat_.... Pasting the bare token yields 401.
1. Store the token in secrets.yaml:
# secrets.yaml mowlog_token: "Bearer mowlog_pat_YOUR_TOKEN_HERE"
2. Declare the REST command:
# configuration.yaml
rest_command:
mowlog_log_mow:
url: "https://www.mowlog.com/api/public/v1/entries"
method: POST
headers:
Authorization: !secret mowlog_token
Content-Type: application/json
payload: >
{"mower_id":"YOUR_MOWER_ID","type":"auto_mow",
"occurred_at":"{{ states('input_datetime.mow_started') }}",
"ended_at":"{{ now().isoformat() }}",
"status":"success",
"source":{"kind":"home_assistant","client":"rest_command"},
"idempotency_key":"ha-{{ states('input_datetime.mow_started') }}"}3. An input_datetime helper to remember when the mower left the dock:
# configuration.yaml
input_datetime:
mow_started:
name: Last mow started at
has_date: true
has_time: true4. Two automations, one to store the start time when the mower undocks, one to fire the log call when it docks:
# automations.yaml
- alias: "Mowlog: remember mow start"
trigger:
- platform: state
entity_id: binary_sensor.mower_docked
from: "on"
to: "off"
action:
- service: input_datetime.set_datetime
target: { entity_id: input_datetime.mow_started }
data: { datetime: "{{ now().isoformat() }}" }
- alias: "Mowlog: log mow on return"
trigger:
- platform: state
entity_id: binary_sensor.mower_docked
from: "off"
to: "on"
action:
- service: rest_command.mowlog_log_mowRate limits
120 requests per hour per token, 1000 per day per user. Responses over the limit return 429 with a Retry-After header.
Full reference
The OpenAPI spec at /openapi.yaml is the contract. Interactive reference: