Account

3 endpointsEnglish only

Read the signed-in account's profile

get/meexperimentalSession only

Returns the caller's own name, email, locale and the sign-in methods linked to the account.

Responses

  • 200Success
    FieldTypeRequiredConstraintsDescription
    namestringYes--
    emailstringYesformat: "email"-
    localeUserLocaleYes-The account's UI language preference.
    signInMethodsarray of SignInMethodYes--
    Example
    {
      "name": "Kamil",
      "email": "kamil@example.com",
      "locale": "en",
      "signInMethods": [
        "password"
      ]
    }
  • 401Not authenticated

    No body.

  • 404Not found

    No body.

Example request

curl -X GET 'https://mercastra.cloud/api/me' \
  -H 'Cookie: session=<session cookie>'

Update the signed-in account's profile

patch/meexperimentalSession only

Updates the caller's own name and/or locale; at least one of the two fields is required. The body is strict, an unknown field is a 400.

Request body

FieldTypeRequiredConstraintsDescription
namestringNominLength: 1maxLength: 100pattern: "^[\\p{L}\\p{M}\\p{Nd} '’.,\\-&\\u200d\\ufe0f\\p{Emoji_Modifier}\\p{Extended_Pictographic}]+$"At most 100 characters; letters, marks, digits, spaces and a small set of punctuation
localeUserLocaleNo-The account's UI language preference.
Example
{
  "locale": "en"
}

Responses

  • 200Success
    FieldTypeRequiredConstraintsDescription
    namestringYes--
    emailstringYesformat: "email"-
    localeUserLocaleYes-The account's UI language preference.
    signInMethodsarray of SignInMethodYes--
    Example
    {
      "name": "Kamil",
      "email": "kamil@example.com",
      "locale": "en",
      "signInMethods": [
        "password"
      ]
    }
  • 400The request body does not match the schema

    The shared validation error body, see Validation errors.

  • 401Not authenticated

    No body.

  • 404Not found

    No body.

Example request

curl -X PATCH 'https://mercastra.cloud/api/me' \
  -H 'Cookie: session=<session cookie>' \
  -H 'X-CSRF-Token: <csrf-token cookie value>' \
  -H 'Content-Type: application/json' \
  -d '{"locale":"en"}'

Export everything stored about the account

get/me/data-exportexperimentalSession only

Returns the account record, every workshop it owns or belongs to with that workshop's grids, estimates (with revisions) and orders, every feedback or support message it submitted, its linked OAuth providers and the metadata of its API keys (never a secret). The export does not cover everything stored: an estimate's PDF exports and hand-offs are not included.

Responses

  • 200Success
    FieldTypeRequiredConstraintsDescription
    userAccountDataExportUserYes-The account record as stored, minus authentication method secrets.
    workshopsarray of AccountDataExportWorkshopEntryYes--
    feedbackarray of AccountDataExportFeedbackYes--
    authProvidersarray of AccountDataExportAuthProviderYes--
    apiTokensarray of ApiTokenYes-Every API key of the account, live, expired or revoked, as the API keys list shows it: names, the workshop, scopes and dates, never a secret.
    Example
    {
      "user": {
        "uid": "uid-1",
        "email": "kamil@example.com",
        "name": "Kamil",
        "status": "active",
        "emailVerifiedAt": "2026-07-01T00:00:00.000Z",
        "termsVersion": "2026-01-01",
        "termsAcceptedAt": "2026-07-01T00:00:00.000Z",
        "lastLoginAt": "2026-09-15T08:00:00.000Z",
        "locale": "en"
      },
      "workshops": [],
      "feedback": [],
      "authProviders": [],
      "apiTokens": []
    }
  • 401Not authenticated

    No body.

  • 404Not found

    No body.

Example request

curl -X GET 'https://mercastra.cloud/api/me/data-export' \
  -H 'Cookie: session=<session cookie>'