Users

Profiles, privacy and notification preferences, and the account deletion lifecycle.

Base URL
https://api.reportauto.eu

Users

Profile, preferences and account lifecycle. Settings that belong to the signed-in account are written through the session endpoint; anything addressed by user ID goes through /api/users.

Update the signed-in user

PATCH/api/session

Updates the account behind the token. Every settings group — profile, privacy, email and notification preferences — is written through this one endpoint by sending just the keys you want to change. The full updated user is returned.

Authentication Access token

Parameters

emailstring

New email address for the account.

user_profileobject

Profile and privacy settings.

notification_preferencesobject

Per-event delivery settings. Each key takes `enabled` and a `channels` array of PUSH, EMAIL or SMS.

cURL
1curl -X PATCH "https://api.reportauto.eu/api/session" \
2  -H "Authorization: Bearer $CAROOM_ACCESS_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "user_profile": {
6      "theme": "dark",
7      "language": "en",
8      "bio": "A very dedicated user that loves cars and Caroom"
9    }
10  }'
Response
{
  "user": {
    "id": 2616,
    "name": "Jamie Rivera",
    "type": "Seller",
    "username": "jamie",
    "role": "User",
    "email": "jamie@example.com",
    "phone": null,
    "avatar": "https://d30s8rpq2bfonk.cloudfront.net/avatars/2616.png",
    "agreement": { "signed": 0, "timestamp": null },
    "public_name": null,
    "theme": "dark",
    "notification_preferences": {
      "new_dms": { "enabled": true, "channels": ["PUSH"] },
      "qr_scans": { "enabled": true, "channels": ["PUSH"] },
      "price_offers": { "enabled": true, "channels": ["PUSH", "SMS"] },
      "promotions": { "enabled": false, "channels": ["EMAIL"] },
      "weekly_digest": { "enabled": true, "channels": ["EMAIL", "PUSH"] }
    },
    "visibility": null,
    "device_model": null,
    "verified": "VERIFIED"
  }
}
Response schema
{
  "id": integer,
  "name": string,
  "email": string,
  "phone": string,
  "type": enum,
}

Retrieve a user

GET/api/users/:user_id

Returns a single user record by ID.

Authentication Access token

Path parameters

user_idintegerRequired

ID of the user to read.

cURL
1curl "https://api.reportauto.eu/api/users/2684" \
2  -H "Authorization: Bearer $CAROOM_ACCESS_TOKEN"

Update a user

PATCH/api/users/:user_id

Updates a user record by ID, including the partner the user belongs to. Used by partner and admin tooling rather than by the account holder.

Authentication Access token

Path parameters

user_idintegerRequired

ID of the user to update.

Parameters

namestring

Display name.

phonestring

Phone number.

partner_idinteger

Partner organisation the user is attached to.

cURL
1curl -X PATCH "https://api.reportauto.eu/api/users/10873" \
2  -H "Authorization: $CAROOM_ACCESS_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "Demonstrated User",
6    "phone": "0809922667",
7    "partner_id": 6
8  }'

Upload a user avatar

PATCH/api/users/:user_id/avatar

Replaces the avatar image. The request body is the raw image file, not JSON.

Authentication API key

Path parameters

user_idintegerRequired

ID of the user whose avatar is being set.

cURL
1curl -X PATCH "https://api.reportauto.eu/api/users/21/avatar" \
2  -H "Authorization: API_KEY $CAROOM_API_KEY" \
3  --data-binary "@/path/to/avatar.png"

Delete a user

DELETE/api/users/:user_id

Marks the account for deletion. The account stays recoverable until the grace period elapses — see the cancellation endpoint below.

Authentication Access token

Path parameters

user_idintegerRequired

ID of the user to delete.

Parameters

statusstring

Set to DELETED to schedule the deletion.

cURL
1curl -X DELETE "https://api.reportauto.eu/api/users/2684" \
2  -H "Authorization: Bearer $CAROOM_ACCESS_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{ "status": "DELETED" }'

Cancel a pending deletion

POST/api/users/:user_id/cancel_deletion

Restores an account that was marked for deletion but has not been purged yet. Takes no body.

Authentication Access token

Path parameters

user_idintegerRequired

ID of the user to restore.

cURL
1curl -X POST "https://api.reportauto.eu/api/users/302/cancel_deletion" \
2  -H "Authorization: Bearer $CAROOM_ACCESS_TOKEN"

List the caller’s partners

GET/api/my/partners

Returns the partner organisations the authenticated user belongs to.

Authentication API key or access token

cURL
1curl "https://api.reportauto.eu/api/my/partners" \
2  -H "Authorization: API_KEY $CAROOM_API_KEY"