Users
Update name
Update the authenticated user's name.
PUT /users/me/name
Updates the user's name and returns the updated profile.
Breaking change. This route used to take a single
name. It now takes firstName and
lastName, and both are required. To store a whole name, we had to guess where it splits, and
the guess was often wrong: "Ana B Cruz" lost the middle initial, "van der Berg" lost the middle,
and "RAJESH KUMAR" came back re-cased. Send the two parts so that nothing is guessed.Authentication: Bearer token · Permission:
account:write · Rate limit: default (120 / 60s)Request body
firstName
string required
The new first name. 1 to 64 characters. It must start with a letter, and it can contain letters, spaces, hyphens, apostrophes and full stops.
lastName
string required
The new last name. 1 to 64 characters, with the same character rules as
firstName.name is not an input. It is returned on the response as the two parts joined.
{ "firstName": "Ada", "lastName": "Lovelace" }
Request
curl -X PUT https://api.twominutereports.com/v1/users/me/name \
-H "Authorization: Bearer tmrc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "firstName": "Ada", "lastName": "Lovelace" }'
Response
Returns the full user object.
{
"success": true,
"data": {
"id": "0190f8a1-2b3c-7d4e-8f90-1a2b3c4d5e6f",
"name": "Ada Lovelace",
"firstName": "Ada",
"lastName": "Lovelace",
"email": "[email protected]",
"avatarUrl": null,
"preferences": {
"appearance": "light",
"notifications": {
"email": { "productUpdates": true, "promotional": false }
}
},
"createdAt": "2026-01-12T08:15:00.000Z"
}
}
{
"success": false,
"error": { "code": "BAD_REQUEST", "message": "Validation error: Enter a first name. at \"firstName\"" }
}
{
"success": false,
"error": { "code": "UNAUTHORIZED", "message": "Invalid or expired session" }
}