> For the complete documentation index, see [llms.txt](https://mobile-calendar.gitbook.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobile-calendar.gitbook.io/v1/rest-api/account.md).

# Account

Account owner data (contact and invoicing details).

## Get account data

> Returns the account owner's contact and invoicing data (panel → My account → Account). These details are the seller on invoices and the sender in guest messages. Required scope: \`account.read\`.

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"account","description":"Account owner data (contact and invoicing details)."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"AccountResponse":{"description":"Account data with metadata","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/AccountEntry"},"meta":{"$ref":"#/components/schemas/MetaWithRuid"}},"type":"object"},"AccountEntry":{"description":"Account owner data (panel → My account → Account): contact and invoicing details used as the seller on invoices and in messages. Read-only fields: `userId`, `email` (login), `currency`, `emailConfirmed`, `registerDate`, `premiumUntil`, `countryName`.","required":["userId","email","forename","name","isCompany","companyName","taxId","phonePrefix","phoneCountry","phone","street","postalCode","city","countryId","countryName","bankAccountNumber","lang","currency","emailConfirmed","registerDate","premiumUntil"],"properties":{"userId":{"description":"Account ID.","type":"integer"},"email":{"description":"Login e-mail (read-only — changed in the panel with confirmation).","type":"string","format":"email"},"forename":{"type":"string","maxLength":100},"name":{"description":"Surname.","type":"string","maxLength":100},"isCompany":{"description":"Account belongs to a company (true) or a private person (false).","type":"boolean"},"companyName":{"description":"Company name; required when `isCompany` is true.","type":"string","maxLength":200},"taxId":{"description":"Tax ID (NIP / VAT number).","type":"string","maxLength":20},"phonePrefix":{"description":"Dialling prefix with `+`.","type":"string","maxLength":5},"phoneCountry":{"description":"ISO 3166-1 alpha-2 country code of the phone number, lowercase.","type":"string","maxLength":5},"phone":{"description":"Phone number without the prefix.","type":"string","maxLength":30},"street":{"type":"string","maxLength":200},"postalCode":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":100},"countryId":{"description":"Country ID from the mobile-calendar country list (177 = Poland, 83 = Germany); 0 = not set.","type":"integer","minimum":0},"countryName":{"description":"Country name for `countryId` (read-only).","type":"string","nullable":true},"bankAccountNumber":{"description":"Bank account (IBAN) printed on invoices and bank-transfer instructions; stored without spaces.","type":"string","maxLength":36},"lang":{"description":"Panel language (ISO 639-1 code).","type":"string"},"currency":{"description":"Account currency (read-only).","type":"string"},"emailConfirmed":{"description":"Login e-mail has been confirmed (read-only).","type":"boolean"},"registerDate":{"description":"Account creation time (UTC, read-only).","type":"string","format":"date-time","nullable":true},"premiumUntil":{"description":"Subscription valid until (UTC, read-only).","type":"string","format":"date-time","nullable":true}},"type":"object"},"MetaWithRuid":{"description":"Metadata with request tracking.","required":["ruid"],"properties":{"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem403":{"description":"Authenticated user but no access.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"403 Forbidden","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]}}},"paths":{"/account":{"get":{"tags":["account"],"summary":"Get account data","description":"Returns the account owner's contact and invoicing data (panel → My account → Account). These details are the seller on invoices and the sender in guest messages. Required scope: `account.read`.","operationId":"getAccount","responses":{"200":{"description":"Account data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem403"}}}}}}}}}
```

## Update account data (full replacement)

> Replaces the editable account fields (see AccountUpdateRequest). Omitted optional fields are cleared, so read the current data first (GET /account) and send the full object back with your changes. Rules: \`companyName\` is required when \`isCompany\` is true; \`countryId\` must be a valid country (0 = not set); \`bankAccountNumber\` is stored without spaces; omit \`lang\` to keep the panel language. Login e-mail, password, currency and subscription cannot be changed here. Required scope: \`account.update\`.

```json
{"openapi":"3.0.0","info":{"title":"Public REST API v1 – mobile-calendar.com","version":"1.0.0"},"tags":[{"name":"account","description":"Account owner data (contact and invoicing details)."}],"servers":[{"url":"https://api.mobile-calendar.com/v1/public","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","description":"Pass the token in header: Authorization: Bearer <JWT>","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"AccountUpdateRequest":{"description":"Full replacement of the editable account fields (PUT). Optional fields that are omitted are cleared. `companyName` is required when `isCompany` is true. Read-only fields from the GET response (`userId`, `email`, `currency`, …) are ignored, so a modified GET object can be sent back.","required":["forename","name","isCompany","phonePrefix","phoneCountry","phone","street","postalCode","city","countryId"],"properties":{"forename":{"description":"May be empty.","type":"string","maxLength":100},"name":{"description":"Surname; may be empty.","type":"string","maxLength":100},"isCompany":{"type":"boolean"},"companyName":{"type":"string","maxLength":200},"taxId":{"type":"string","maxLength":20},"phonePrefix":{"type":"string","pattern":"^\\+\\d{1,4}$"},"phoneCountry":{"type":"string","pattern":"^[a-z]{2}$"},"phone":{"description":"Digits, spaces and dashes; 3–30 characters, without the prefix.","type":"string","maxLength":30},"street":{"type":"string","maxLength":200},"postalCode":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":100},"countryId":{"description":"Country ID (must exist); 0 = not set.","type":"integer","minimum":0},"bankAccountNumber":{"description":"Spaces are removed before saving.","type":"string","maxLength":36},"lang":{"description":"Panel language; omit to keep the current one.","type":"string"}},"type":"object"},"AccountResponse":{"description":"Account data with metadata","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/AccountEntry"},"meta":{"$ref":"#/components/schemas/MetaWithRuid"}},"type":"object"},"AccountEntry":{"description":"Account owner data (panel → My account → Account): contact and invoicing details used as the seller on invoices and in messages. Read-only fields: `userId`, `email` (login), `currency`, `emailConfirmed`, `registerDate`, `premiumUntil`, `countryName`.","required":["userId","email","forename","name","isCompany","companyName","taxId","phonePrefix","phoneCountry","phone","street","postalCode","city","countryId","countryName","bankAccountNumber","lang","currency","emailConfirmed","registerDate","premiumUntil"],"properties":{"userId":{"description":"Account ID.","type":"integer"},"email":{"description":"Login e-mail (read-only — changed in the panel with confirmation).","type":"string","format":"email"},"forename":{"type":"string","maxLength":100},"name":{"description":"Surname.","type":"string","maxLength":100},"isCompany":{"description":"Account belongs to a company (true) or a private person (false).","type":"boolean"},"companyName":{"description":"Company name; required when `isCompany` is true.","type":"string","maxLength":200},"taxId":{"description":"Tax ID (NIP / VAT number).","type":"string","maxLength":20},"phonePrefix":{"description":"Dialling prefix with `+`.","type":"string","maxLength":5},"phoneCountry":{"description":"ISO 3166-1 alpha-2 country code of the phone number, lowercase.","type":"string","maxLength":5},"phone":{"description":"Phone number without the prefix.","type":"string","maxLength":30},"street":{"type":"string","maxLength":200},"postalCode":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":100},"countryId":{"description":"Country ID from the mobile-calendar country list (177 = Poland, 83 = Germany); 0 = not set.","type":"integer","minimum":0},"countryName":{"description":"Country name for `countryId` (read-only).","type":"string","nullable":true},"bankAccountNumber":{"description":"Bank account (IBAN) printed on invoices and bank-transfer instructions; stored without spaces.","type":"string","maxLength":36},"lang":{"description":"Panel language (ISO 639-1 code).","type":"string"},"currency":{"description":"Account currency (read-only).","type":"string"},"emailConfirmed":{"description":"Login e-mail has been confirmed (read-only).","type":"boolean"},"registerDate":{"description":"Account creation time (UTC, read-only).","type":"string","format":"date-time","nullable":true},"premiumUntil":{"description":"Subscription valid until (UTC, read-only).","type":"string","format":"date-time","nullable":true}},"type":"object"},"MetaWithRuid":{"description":"Metadata with request tracking.","required":["ruid"],"properties":{"ruid":{"description":"Request Unique ID","type":"string","format":"uuid"}},"type":"object"},"ApiProblem400":{"description":"Request syntax/format error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"400 Bad Request","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblemBase":{"description":"RFC 7807 Problem Details (base schema).","required":["type","title","status","detail","instance"],"properties":{"type":{"description":"RFC 7807 base — DO NOT use directly in endpoints.\nIn endpoints reference ApiProblem400/401/403/409/422/429/500.","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"},"ApiProblem401":{"description":"Missing authentication or invalid credentials.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"401 Unauthorized","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblem403":{"description":"Authenticated user but no access.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"403 Forbidden","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"type":"object"}]},"ApiProblem422":{"description":"Input data validation error.","allOf":[{"$ref":"#/components/schemas/ApiProblemBase"},{"properties":{"type":{"description":"422 Unprocessable Entity (validation)","type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"description":"Map: field name → error message(s)","type":"object","additionalProperties":{"$ref":"#/components/schemas/ErrorValue"}}},"type":"object"}]},"ErrorValue":{"description":"Single error message or list of messages.","oneOf":[{"description":"Error value in error map can be:\n- single string, or\n- array of strings (multiple messages for one field).","type":"string"},{"type":"array","items":{"type":"string"}}]}}},"paths":{"/account":{"put":{"tags":["account"],"summary":"Update account data (full replacement)","description":"Replaces the editable account fields (see AccountUpdateRequest). Omitted optional fields are cleared, so read the current data first (GET /account) and send the full object back with your changes. Rules: `companyName` is required when `isCompany` is true; `countryId` must be a valid country (0 = not set); `bankAccountNumber` is stored without spaces; omit `lang` to keep the panel language. Login e-mail, password, currency and subscription cannot be changed here. Required scope: `account.update`.","operationId":"updateAccount","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateRequest"}}}},"responses":{"200":{"description":"Updated account data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Bad request (malformed JSON, body is not an object, suspicious content)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem400"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem401"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem403"}}}},"422":{"description":"Validation error — e.g. missing required field, unknown `countryId`, invalid phone prefix, `isCompany` without `companyName`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProblem422"}}}}}}}}}
```
