query MyWorkspace {
myWorkspace {
id
name
publicName
isDemoWorkspace
domainName
domainNames
}
}{
"data": {
"myWorkspace": {
"id": "id",
"name": "string",
"publicName": "string",
"isDemoWorkspace": true,
"domainName": "string",
"domainNames": [
"string"
]
}
}
}myWorkspace
Returns the Workspace associated with the current API key or session. Useful for confirming which workspace a request is scoped to. Returns null if no workspace is in context. Integrations that need the user’s approval in the provider (Slack, Microsoft Teams, Discord, Linear, Jira, GitHub, Shortcut, incident.io, Rootly, HubSpot, Salesforce, Attio, Intercom, Zendesk, Freshdesk, Help Scout) can’t be connected through the API: give the user the full link https://app.plain.com/workspace/<this workspace's id>/settings/<integration>, with the real ID filled in, using the integration’s page (slack, microsoft-teams, discord, linear, jira, github, shortcut, incidentio, rootly, hubspot, salesforce, attio, intercom, zendesk, freshdesk, helpscout), or https://app.plain.com/workspace/<workspaceId>/settings/integrations for all of them. Some setup is also done by the user in the app, so give them the full link in the same way, written out from https://app.plain.com/workspace/w_… with the real ID and never shortened to …/settings/…: inviting people (settings/members/add), changing a member’s role (settings/members/<userId>), API keys (settings/machine-users/<machineUserId>/api-keys/add), a role’s permissions and thread access (settings/roles/<customRoleId>), webhooks (settings/webhooks/add) and email settings, including the support email domain (settings/email).
myWorkspace: WorkspaceReturns
The internal name of the workspace, used within Plain and not shown to customers.
The public-facing display name of the workspace shown to customers and in external communications.
Whether this workspace is a demo workspace created for evaluation purposes.
The list of email domain names associated with this workspace, used to automatically associate customers with the workspace.
The per-workspace WorkOS organization used for membership and org switching, if configured.
The shared WorkOS hub organization that holds SSO, directory sync, and domain policy, if this workspace is hub-linked.
True when this workspace or its hub has an active SSO connection.
True when this workspace or its hub has a directory (SCIM) configured. When true, members must be invited and have their roles changed in the identity provider.
query MyWorkspace {
myWorkspace {
id
name
publicName
isDemoWorkspace
domainName
domainNames
}
}{
"data": {
"myWorkspace": {
"id": "id",
"name": "string",
"publicName": "string",
"isDemoWorkspace": true,
"domainName": "string",
"domainNames": [
"string"
]
}
}
}Was this page helpful?

