Workspaces

Create a workspace

Changed on

Creates a workspace. Only name is required. Omit domain to create a workspace that holds only the grants you assign to it. Those grants can have any email domain.

post/v3/workspaces

Request

  • Base URL
    https://api.us.nylas.com
  • Auth
    HTTP bearer

Request body

auto_groupboolean

When true, specifies that newly created grants in the application are automatically assigned to the workspace if their email address' domain matches the domain. Automatic grouping needs a domain, so leave this field false on a workspace without one.

domainstring

The email domain associated with the workspace, such as nylas.com. Optional. Set it when you want Nylas to group grants by domain automatically. Each domain can belong to only one workspace per application, and Nylas returns a 400 error if the domain is already in use. Domain matching for automatic grouping is exact and case-sensitive, so subdomains don't match their parent domain. You can't add, change, or remove the domain after the workspace is created.

namestring required

A short, descriptive name for the workspace.

policy_idstring

The ID of the policy to attach to the workspace.

rule_idsstring[]

The IDs of any rules to attach to the workspace.

Example request

{
  "auto_group": true,
  "domain": "nylas.com",
  "name": "The Nylas Workspace",
  "policy_id": "6dcc5d92-8a55-4ce8-85a8-2f4275f8f0a0",
  "rule_ids": [
    "3f2504e0-4f89-41d3-9a0c-0305e82c3301"
  ]
}

Response

Success. Returns new Workspace object.

request_idstring

The request ID.

Example response

{
  "request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
  "data": {
    "application_id": "ad410018-d306-43f9-8361-fa5d7b2172e0",
    "auto_group": true,
    "created_at": 1756379932,
    "domain": "nylas.com",
    "name": "The Nylas Workspace",
    "policy_id": "6dcc5d92-8a55-4ce8-85a8-2f4275f8f0a0",
    "rule_ids": [
      "3f2504e0-4f89-41d3-9a0c-0305e82c3301"
    ],
    "updated_at": 1756379932,
    "workspace_id": "abf6ff99-05ad-4c0a-aaf8-400aacf2470a"
  }
}

Changes

    • breaking

      the response property / became nullable for the status

    • info

      the request property became optional

    • info

      the request property default value changed from true to false