Skip to main content
PATCH
/
api
/
account
Update Profile
curl --request PATCH \
  --url https://app.puffle.ai/api/account \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "password": "<string>",
  "firstName": "<string>",
  "lastName": "<string>"
}
'
CLI:
puffle account update
puffle account update --email <email> --password <password> --first-name <first-name> --last-name <last-name>

Overview

Updates account-level settings for the current user. The request can change profile name fields (firstName, lastName) and, when the caller is the signed-in user acting as themselves, auth fields (email, password). Email changes send a verification email and do not take effect until the user confirms the link. Password changes complete immediately when Supabase accepts the new password.

AI agent notes

Send at least one field. Update email and password in separate requests; the route rejects a body that tries to change both at once. Only perform auth changes when the user explicitly asks for them and Get Profile returns canManageAuth: true. If the response includes pendingEmail or emailChangeSent, tell the user to confirm the verification email before assuming the login email changed.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string<email>
password
string
Minimum string length: 8
firstName
string | null
lastName
string | null

Response

Successful response.