Workspaces

Auto-group grants

Starts a background job that sorts grants into workspaces by email domain, depending on the filters set. The job considers only grants that aren't in a workspace yet. If you don't set any filters, Nylas considers all unassigned grants in the application.

If no workspace exists for a grant's domain, the job creates one with auto_group set to true and a generated name.

post/v3/workspaces/auto-group

Request

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

Request body

after_created_atnumber

Applies automatic grouping settings to grants created at or after the specified time, in seconds using the Unix timestamp format.

invalid_alsoboolean

When true, applies automatic grouping settings to both invalid and valid grants. When false, applies settings to valid grants only.

specific_domainstring

Applies automatic grouping settings to grants with the specified email domain only.

Example request

{
  "after_created_at": 1622548800,
  "specific_domain": "nylas.com"
}

Response

Success. Returns a information about automatic grouping job.

request_idstring

The request ID.

Example response

{
  "request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
  "data": {
    "job_id": "52e61713-ab00-4d70-8974-73cf541c5db9",
    "message": "Auto-grouping started successfully under JobID '52e61713-ab00-4d70-8974-73cf541c5db9', please wait for the process to complete. It may take some time."
  }
}

Changes

No recorded changes to this operation across all 16 revisions of this API.