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
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | required | Bearer <accessToken> |
Request Body
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | optional | Display name. |
| ship_name | string | optional | Vessel name (max 255 characters). |
| imo_number | string | optional | IMO vessel number (exactly 7 digits). |
| company | string | optional | Company 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
| Field | Type | Description |
|---|---|---|
| user | object | Updated user object. |
| ↳id | string | UUID. |
| string | Email address. | |
| ↳name | string | Display name. |
| ↳role | string | User role. |
| ↳ship_name | string | Vessel name. |
| ↳imo_number | string | IMO vessel number. |
| ↳company | string | Company or organisation name. |
| ↳email_verified | boolean | Whether email is verified. |
| ↳mfa_enabled | boolean | Whether MFA is enabled. |
| ↳created_at | string | ISO 8601 creation timestamp. |
| ↳updated_at | string | ISO 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"
}
}