DevelopersHow to connect an assistantKeys
Reference/Profile/Read

Get the profile

GEThttps://api.getwerk.ai/api/v1/account/profile

The key's person: their name, photo, email, language, time zone, daily brief and mail choices.

What a key reaches is this person's: every route acts as them.

Authorization

AuthorizationheaderRequired

Authorization: Bearer <key> Authentication

Headers

Werk-Localestring

The language tag Werk writes the answer's own words in, such as step names and history lines, matched to a language it serves; a card's text stays as written. At a project's paths, the reads of its cards and steps, of a card, its update photos, a file and its reminders, and of follow and reminder invitations, and a document's read-now and consent, take the language of the person's chat with Werk in that project first, while it has one. Without either, the language Werk uses with the person the key or the connection acts for.

Response

200 The profile.

personIdstring, uuid

The key's person's id.

namestring

Their name, as they set it.

From 1 to 128 characters
photoobject or null

Their photo, or null.

Show properties of photoHide properties of photo
personIdstring, uuid

The person whose photo it is.

versioninteger

The photo's version, which changes with the photo; its read takes it to fetch the current one.

At least 1
emailstring, email or null

Their verified email, or null.

briefTimestring

The time of day their daily brief comes, as HH:MM in their time zone.

briefOnboolean

True when they get the daily brief.

pauseResumeDatestring, date or null

The day a paused brief starts again, or null.

timeZonestring or null

Their time zone, or null when not known.

deviceLocalestring or null

The language of the device they last used, or null.

localestring or null

The language they chose for Werk, or null to follow their device.

emailDueNoticesboolean

True when due notices also come by email.

emailOwnRemindersboolean

True when their reminders, shared ones included, also come by email.

emailInvitationsboolean

True when invitations also come by email.

translateCardsboolean

True when Werk translates cards written in other languages into theirs.

translateOfferenum

open while Werk may offer to translate, never once they declined for good.

Allowed valuesopennever
googleCalendarobject or null

Their Google Calendar connection, or null when Werk offers no Google Calendar connection.

Show properties of googleCalendarHide properties of googleCalendar
stateenum

not_connected, connecting while it is being set up, connected, no_access once Werk lost access, or disconnected.

Allowed valuesnot_connectedconnectingconnectedno_accessdisconnected
accountstring, email or null

The Google account connected, or null.

matchedAtstring, date-time or null

When the Werk calendar last held the whole agenda, or null.

reasonenum or null

Why the connection stopped: access withdrawn, the calendar removed, or an error of Werk's; null otherwise.

Allowed valuesaccess_withdrawncalendar_removedwerk_error

Errors

400invalid_queryThe query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).
401session_revokedThe request carries no session the server holds, or its session has ended.
401session_expiredThe session has expired.
409session_changedThe session changed while the request was in flight.
rate_limitedMore requests of this kind were sent than Werk takes within the time it counts them over.
500server_errorThe server could not complete the request, and it is not known whether a write it holds was made.
curl
curl "https://api.getwerk.ai/api/v1/account/profile" \
  -H "Authorization: Bearer wk_key_..."
TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/account/profile", {
  headers: {
    Authorization: "Bearer wk_key_...",
  },
});
const answer = await res.json();
200JSON
{
  "personId": "5d1f3a2e-8c4b-4e7a-9f21-3b6c8d0e1a42",
  "name": "Maya Chen",
  "photo": {
    "personId": "5d1f3a2e-8c4b-4e7a-9f21-3b6c8d0e1a42",
    "version": 1
  },
  "email": "maya@harborstreet.example",
  "briefTime": "07:30",
  "briefOn": true,
  "pauseResumeDate": null,
  "timeZone": "America/New_York",
  "deviceLocale": "en-US",
  "locale": null,
  "emailDueNotices": true,
  "emailOwnReminders": false,
  "emailInvitations": true,
  "translateCards": true,
  "translateOffer": "open",
  "googleCalendar": {
    "state": "not_connected",
    "account": null,
    "matchedAt": null,
    "reason": null
  }
}