---
title: "Automatically group grants into workspace"
method: POST
path: "/v3/workspaces/auto-group"
tags: ["Workspaces"]
---

# Automatically group grants into workspace

`POST /v3/workspaces/auto-group`

Configures automatic grouping settings for new or existing workspaces, depending on the filters
set. If you don't set any filters, Nylas considers all grants.

## Request body

- object
  - `after_created_at` number — Applies automatic grouping settings to grants created at or after the specified time, in seconds using the Unix timestamp format.
  - `invalid_also` boolean — When `true`, applies automatic grouping settings to both invalid and valid grants. When `false`, applies settings to valid grants only.
  - `specific_domain` string — Applies automatic grouping settings to grants with the specified email domain only.

## Response `200`

Success. Returns a information about automatic grouping job.

- object
  - `request_id` string — The request ID.
  - `data` object
    - `job_id` string — The ID of the automatic grouping job.
    - `message` string — Information about the background automatic grouping job.

## Other responses

- `401` — Error: Not authenticated
- `404` — Error: Not found

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
