Update Current User

Update the profile of the currently authenticated user. At least one field must be provided.

PUThttps://api.marinahealth.eu/auth/me
Requires Authapplication/json

Headers

Headers

NameTypeRequiredDescription
AuthorizationstringrequiredBearer <accessToken>

Request Body

Body Parameters

NameTypeRequiredDescription
namestringoptionalDisplay name.
ship_namestringoptionalVessel name (max 255 characters).
imo_numberstringoptionalIMO vessel number (exactly 7 digits).
companystringoptionalCompany or organisation name (max 255 characters).

Example Request

cURL
curl -X PUT https://api.marinahealth.eu/auth/me \
  -H "Authorization: Bearer <accessToken>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Updated",
    "ship_name": "MV Northern Star",
    "imo_number": "9876543",
    "company": "Nordic Shipping AS"
  }'

Response

Successful
FieldTypeDescription
userobjectUpdated user object.
idstringUUID.
emailstringEmail address.
namestringDisplay name.
rolestringUser role.
ship_namestringVessel name.
imo_numberstringIMO vessel number.
companystringCompany or organisation name.
email_verifiedbooleanWhether email is verified.
mfa_enabledbooleanWhether MFA is enabled.
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last-updated timestamp.
json
{
  "user": {
    "id": "usr_abc123",
    "email": "user@example.com",
    "name": "Jane Updated",
    "role": "user",
    "ship_name": "MV Northern Star",
    "imo_number": "9876543",
    "company": "Nordic Shipping AS",
    "email_verified": true,
    "mfa_enabled": false,
    "created_at": "2024-01-15T10:30:00.000Z",
    "updated_at": "2024-06-01T08:00:00.000Z"
  }
}