Update the authenticated user
Updates the authenticated user’s profile.
POST
/v1/user/update
const url = 'https://api.shiftsync.app/v1/user/update';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"emailAddress":"user@example.com","firstName":"string","lastName":"string","firstDayOfWeek":"Monday","timezone":"string"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shiftsync.app/v1/user/update \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "emailAddress": "user@example.com", "firstName": "string", "lastName": "string", "firstDayOfWeek": "Monday", "timezone": "string" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
emailAddress
string format: email
firstName
string
lastName
string
firstDayOfWeek
string
timezone
string
Example
{ "emailAddress": "user@example.com", "firstName": "string", "lastName": "string", "firstDayOfWeek": "Monday", "timezone": "string"}Responses
Section titled “Responses”The updated user
Media typeapplication/json
object
user
required
object
id
required
integer
emailAddress
required
string format: email
firstName
required
string
lastName
string
verified
required
boolean
isFacebookAuth
boolean
isGoogleAuth
boolean
isMicrosoftAuth
boolean
hasPassword
boolean
userPlan
required
string
firstDayOfWeek
required
string
timezone
required
string
avatarUrls
object
small
required
string format: uri
medium
required
string format: uri
large
required
string format: uri
markedForDeletion
required
boolean
deletionScheduledFor
string
Example
{ "user": { "id": 0, "emailAddress": "user@example.com", "firstName": "string", "lastName": "string", "verified": true, "isFacebookAuth": true, "isGoogleAuth": true, "isMicrosoftAuth": true, "hasPassword": true, "userPlan": "free", "firstDayOfWeek": "string", "timezone": "string", "avatarUrls": { "small": "https://example.com", "medium": "https://example.com", "large": "https://example.com" }, "markedForDeletion": true, "deletionScheduledFor": "string" }}