The signed-in user and the workspaces they belong to
GET
/api/v1/me
const url = 'https://api.crossmart.io/api/v1/me';const options = { method: 'GET', headers: {cookie: 'better-auth.session_token=<better-auth.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.crossmart.io/api/v1/me \ --cookie better-auth.session_token=<better-auth.session_token>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string format: uuid
name
required
string
email
required
string
workspaces
required
Array<object>
object
id
required
string format: uuid
organizationId
required
string format: uuid
name
required
string
displayName
required
The name to show: the organization name while the workspace is named Default
string
slug
required
string
currency
required
ISO 4217 code of the catalog prices
string
timeZone
required
IANA time zone that reports follow; null until set
string
role
required
Your role here
string
customRole
required
The workspace’s own role, when role is CUSTOM
object
id
required
string format: uuid
name
required
string
permissions
required
What your role lets you do here. Check these, not the role, to adapt a UI.
Array<string>
Example
{ "workspaces": [ { "currency": "USD", "timeZone": "Asia/Jerusalem", "role": "OWNER", "permissions": [ "workspace:view" ] } ]}