Skip to content

User

These two endpoints cover your own profile: the display name and timezone the rest of the app works with. Both need an API key or a signed-in session — see API keys. Requests without one get 401 Unauthorized; error responses carry an error message.

Returns your profile.

GET /api/user

It takes no parameters.

200 OK with your details.

{
"id": "b1d4e7a0-2c5f-4b8e-9a1d-6c3f0e2b5a78",
"email": "you@example.com",
"displayName": "Alex Planner",
"timezone": "Australia/Sydney",
"isAdmin": false
}

isAdmin is true when you’re an admin of this instance. It comes from your account’s role, set by an admin in Settings.

  • 404 Not Found — the account behind the key has no profile yet; the error message is User not found.
  • 401 Unauthorized — no valid API key or session.

Changes your display name or timezone.

PATCH /api/user

Every body field is optional, but the body must contain at least one of them.

Name Type Required Description
displayName string No How your name shows across the app
timezone string No IANA zone such as Australia/Sydney; the planner and morning summaries use it

200 OK with the updated profile in the same shape as the Get your profile response.

{
"id": "b1d4e7a0-2c5f-4b8e-9a1d-6c3f0e2b5a78",
"email": "you@example.com",
"displayName": "Alex Planner",
"timezone": "Australia/Melbourne",
"isAdmin": false
}

Only displayName and timezone are read from the body; any other fields are ignored.

  • 400 Bad Request — the body is not valid JSON; the error message is Invalid JSON.
  • 400 Bad Request — timezone is not an IANA zone; the error message is timezone must be an IANA zone, e.g. Australia/Sydney.
  • 400 Bad Request — the body has neither displayName nor timezone; the error message is No valid fields to update.
  • 401 Unauthorized — no valid API key or session.

Move the profile to Melbourne time.

Terminal window
curl -X PATCH https://tasks.example.com/api/user \
-H "Authorization: Bearer dp_change-me" \
-H "Content-Type: application/json" \
-d '{"timezone":"Australia/Melbourne"}'

The response is 200 OK with the updated profile; the planner plans in this zone from the next run.