Account

3 endpointsEnglish only

Read the signed-in account's profile

get/meexperimentalSession required

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 required

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}]+
quot;
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 required

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, and its linked OAuth providers. Documents what the export contains today, not what it should; MR-44 tracks what it omits.

Responses

  • 200Success
    FieldTypeRequiredConstraintsDescription
    userAccountDataExportUserYes-The account record as stored, minus authentication method secrets.
    workshopsarray of AccountDataExportWorkshopEntryYes--
    feedbackarray of AccountDataExportFeedbackYes--
    authProvidersarray of AccountDataExportAuthProviderYes--
    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": []
    }
  • 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>'