| Method | Path | Summary |
|---|---|---|
| GET | …/me | Get the authenticated user profile |
| PATCH | …/me | Update the authenticated user profile |
| GET | …/me/permissions | Get the permissions granted to the authenticated user |
Paths start with /users. GET endpoints need users:read, the others users:write.
The User object
firestoreIdstringrequiredID of the user.
firstNamestringlastNamestringdisplayNamestringemailstringemailrequiredstatusstringrequiredStatus of the user account.
registeredThe user has signed up.
phonestringShow all 15 fieldsHide the field list
birthdatestringpositionstringPosition of the user in the company.
ceoChief executive officer.
cfoChief financial officer.
otherCLevelAnother C-level executive.
businessAdministrativeBusiness or administrative staff.
accountantAccountant.
otherAnother position.
photoUrlstringurilocalestringcreationobjectrequiredWhen and by whom the resource was created.
Show 2 child fields
creationDateTimestringdate-timerequiredDate and time when the resource was created.
createdBystringID of the user who created the resource, when recorded.
activationobjectrequiredWhether the resource is enabled, and when and by whom it was last enabled or disabled.
Show 3 child fields
enabledbooleanrequiredWhether the resource is enabled.
updateDateTimestringdate-timerequiredDate and time when enabled was last set.
updatedBystringID of the user who last set enabled, when recorded.
notificationsobjectShow 2 child fields
defaultsRecord<string, object>Show 2 child fields
emailbooleanrequiredpushbooleanrequiredworkspacesRecord<string, object>Show 2 child fields
modestringrequiredHow the user receives the notifications of the workspace.
defaultThe workspace follows the default notification settings of the user.
customThe workspace follows its own notification settings, in
custom.mutedThe user receives no notification for the workspace.
customRecord<string, object>Show 2 child fields
emailbooleanrequiredpushbooleanrequiredrelationshipsobjectrequiredShow 1 child field
lastAcceptedAgreementsRecord<string, object>requiredShow 5 child fields
firestoreIdstringrequiredID of the agreement.
userIdstringrequiredID of the user.
acceptanceDateTimestringdate-timerequiredrevisionnumberrequiredtypestringrequiredLegal document of Sway that the user accepts.
termsAndConditionsTerms and conditions of Sway.
privacyPolicyPrivacy policy of Sway.
cookiePolicyCookie policy of Sway.
{
"firestoreId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
"firstName": "string",
"lastName": "string",
"displayName": "string",
"email": "anna.meier@example.com",
"status": "registered",
"phone": "+41791234567",
"birthdate": "1990-05-14",
"position": "ceo",
"photoUrl": "https://example.com",
"locale": "string",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"notifications": {
"defaults": {
"key": {
"email": true,
"push": true
}
},
"workspaces": {
"Wk7fQ2xR9bLm4tZp8sNv": {
"mode": "default",
"custom": {
"key": {
"email": true,
"push": true
}
}
}
}
},
"relationships": {
"lastAcceptedAgreements": {
"key": {
"firestoreId": "Ag4kR8tN2wQx6zLp3vMb",
"userId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
"acceptanceDateTime": "2026-03-02T09:30:00.000Z",
"revision": 0,
"type": "termsAndConditions"
}
}
}
}/users/meGet the authenticated user profile
Scopeusers:read
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Returns
Successful response
curl 'https://api.business.swayapp.io/v1/users/me' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/users/me', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/users/me",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": {
"firestoreId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
"firstName": "string",
"lastName": "string",
"displayName": "string",
"email": "anna.meier@example.com",
"status": "registered",
"phone": "+41791234567",
"birthdate": "1990-05-14",
"position": "ceo",
"photoUrl": "https://example.com",
"locale": "string",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"notifications": {…},
"relationships": {…}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/users/meUpdate the authenticated user profile
Scopeusers:write
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request body
firstNamestringlastNamestringpositionstringPosition of the user in the company.
ceoChief executive officer.
cfoChief financial officer.
otherCLevelAnother C-level executive.
businessAdministrativeBusiness or administrative staff.
accountantAccountant.
otherAnother position.
birthdatestringphonestringlocalestringReturns
Successful response
curl -X PATCH 'https://api.business.swayapp.io/v1/users/me' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"position": "ceo",
"birthdate": "1990-05-14",
"phone": "+41791234567"
}'const response = await fetch('https://api.business.swayapp.io/v1/users/me', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"position": "ceo",
"birthdate": "1990-05-14",
"phone": "+41791234567"
}),
});
console.log(await response.json());import os
import requests
response = requests.patch(
"https://api.business.swayapp.io/v1/users/me",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"position": "ceo",
"birthdate": "1990-05-14",
"phone": "+41791234567",
},
)
print(response.json()){
"data": {
"firestoreId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
"firstName": "string",
"lastName": "string",
"displayName": "string",
"email": "anna.meier@example.com",
"status": "registered",
"phone": "+41791234567",
"birthdate": "1990-05-14",
"position": "ceo",
"photoUrl": "https://example.com",
"locale": "string",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"notifications": {…},
"relationships": {…}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/users/me/permissionsGet the permissions granted to the authenticated user
Scopeusers:read
Query parameters
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Returns
Successful response
dataUserPermissionsrequiredShow 3 child fields
vintegerrequiredwsRecord<string, string[]>requiredws.ownerOwner of the workspace, with every permission, including deleting the workspace and managing owners.
ws.adminAdministrator of the workspace, with every permission except managing owners and deleting the workspace or its files.
ws.memberMember of the workspace, who works on its transactions, invoices, payments and accounting but manages neither its bank accounts nor its members.
ws.viewerViewer of the workspace, a role that grants no permission.
ws.supportSway support access, granted when you invite the Sway bot.
ba.ownerOwner of the billing account, with every permission, including deleting it.
ba.adminAdministrator of the billing account, who reads and updates it but cannot delete it.
ba.memberMember of the billing account, who can only read it.
baRecord<string, string[]>requiredws.ownerOwner of the workspace, with every permission, including deleting the workspace and managing owners.
ws.adminAdministrator of the workspace, with every permission except managing owners and deleting the workspace or its files.
ws.memberMember of the workspace, who works on its transactions, invoices, payments and accounting but manages neither its bank accounts nor its members.
ws.viewerViewer of the workspace, a role that grants no permission.
ws.supportSway support access, granted when you invite the Sway bot.
ba.ownerOwner of the billing account, with every permission, including deleting it.
ba.adminAdministrator of the billing account, who reads and updates it but cannot delete it.
ba.memberMember of the billing account, who can only read it.
curl 'https://api.business.swayapp.io/v1/users/me/permissions' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/users/me/permissions', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/users/me/permissions",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": {
"v": 0,
"ws": {
"key": [
"ws.owner"
]
},
"ba": {
"key": [
"ws.owner"
]
}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}