Account

3 endpointyTylko po angielsku

Read the signed-in account's profile

get/meexperimentalWymagana sesja

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

Odpowiedzi

  • 200Success
    PoleTypWymaganeOgraniczeniaOpis
    namestringTak--
    emailstringTakformat: "email"-
    localeUserLocaleTak-The account's UI language preference.
    signInMethodsarray of SignInMethodTak--
    Przykład
    {
      "name": "Kamil",
      "email": "kamil@example.com",
      "locale": "en",
      "signInMethods": [
        "password"
      ]
    }
  • 401Not authenticated

    Brak treści.

  • 404Not found

    Brak treści.

Przykładowe żądanie

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

Update the signed-in account's profile

patch/meexperimentalWymagana sesja

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.

Treść żądania

PoleTypWymaganeOgraniczeniaOpis
namestringNieminLength: 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
localeUserLocaleNie-The account's UI language preference.
Przykład
{
  "locale": "en"
}

Odpowiedzi

  • 200Success
    PoleTypWymaganeOgraniczeniaOpis
    namestringTak--
    emailstringTakformat: "email"-
    localeUserLocaleTak-The account's UI language preference.
    signInMethodsarray of SignInMethodTak--
    Przykład
    {
      "name": "Kamil",
      "email": "kamil@example.com",
      "locale": "en",
      "signInMethods": [
        "password"
      ]
    }
  • 400The request body does not match the schema

    Wspólna treść błędu walidacji, zobacz Błędy walidacji.

  • 401Not authenticated

    Brak treści.

  • 404Not found

    Brak treści.

Przykładowe żądanie

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-exportexperimentalWymagana sesja

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.

Odpowiedzi

  • 200Success
    PoleTypWymaganeOgraniczeniaOpis
    userAccountDataExportUserTak-The account record as stored, minus authentication method secrets.
    workshopsarray of AccountDataExportWorkshopEntryTak--
    feedbackarray of AccountDataExportFeedbackTak--
    authProvidersarray of AccountDataExportAuthProviderTak--
    Przykład
    {
      "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

    Brak treści.

  • 404Not found

    Brak treści.

Przykładowe żądanie

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