Create a workspace
const url = 'https://api.crossmart.io/api/v1/organizations/example/workspaces';const options = { method: 'POST', headers: { cookie: 'better-auth.session_token=<better-auth.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"EU store","currency":"USD","timeZone":"Europe/Berlin"}'};
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.crossmart.io/api/v1/organizations/example/workspaces \ --header 'Content-Type: application/json' \ --cookie better-auth.session_token=<better-auth.session_token> \ --data '{ "name": "EU store", "currency": "USD", "timeZone": "Europe/Berlin" }'For owners of a workspace in the organization, such as one per client or brand. You own the new workspace. Refused (402) past the plan’s workspace limit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
EU storeISO 4217 code of the catalog prices. It cannot change later.
Example
EURIANA time zone where the workspace’s day starts, for reports, such as Asia/Jerusalem
Example
Europe/BerlinResponses
Section titled “Responses”object
The name to show: the organization name while the workspace is named Default
ISO 4217 code of the catalog prices
IANA time zone that reports follow; null until set
Your role here
The workspace’s own role, when role is CUSTOM
object
What your role lets you do here. Check these, not the role, to adapt a UI.
Example
{ "currency": "USD", "timeZone": "Asia/Jerusalem", "role": "OWNER", "permissions": [ "workspace:view" ]}The organization’s plan does not allow this (ENTITLEMENTS_ENFORCED is on). code and feature say why; upgrading the plan resolves it.
object
The code of the organization’s plan
Null is unlimited
How many more the request asked for
Example
{ "statusCode": 402, "error": "Payment Required", "code": "plan_limit_reached", "message": "The Free plan includes 2 connected channels, and 2 are in use. Upgrade the plan to add more.", "feature": "active_listings", "plan": "free"}