workspaces
CreateWorkspaceRequest
Bases: TypedDict
Class representation of a Nylas create workspace request.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The descriptive workspace name. Required. |
domain |
NotRequired[str]
|
The top-level email domain to group grants by. |
auto_group |
NotRequired[bool]
|
When true, new grants whose email domain matches |
policy_id |
NotRequired[str]
|
Inbox policy to attach to the workspace (UUID). |
rule_ids |
NotRequired[List[str]]
|
Inbox rules to attach to the workspace (list of UUIDs). |
Source code in nylas/models/workspaces.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
UpdateWorkspaceRequest
Bases: TypedDict
Class representation of a Nylas update workspace request.
At least one field must be present. The workspace's domain is immutable; sending a changed domain is rejected by the API.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
NotRequired[str]
|
A new non-empty workspace name. |
domain |
NotRequired[str]
|
The workspace domain. Validated but immutable; changing it is rejected. |
auto_group |
NotRequired[bool]
|
Whether to auto-group matching grants. Cannot be set to true on a workspace with an empty domain. |
policy_id |
NotRequired[Optional[str]]
|
Inbox policy to attach (UUID). Send |
rule_ids |
NotRequired[Optional[List[str]]]
|
Inbox rules to attach (list of UUIDs). Send a list (including |
Source code in nylas/models/workspaces.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
Workspace
dataclass
Class representing a Nylas workspace.
A workspace groups grants in a Nylas application by email domain. Grants can be auto-grouped (by matching email domain) or manually assigned/removed.
Attributes:
| Name | Type | Description |
|---|---|---|
workspace_id |
str
|
Globally unique workspace identifier (UUID). |
application_id |
str
|
The owning Nylas application UUID. |
name |
str
|
Descriptive workspace name. |
domain |
str
|
Top-level email domain. May be an empty string when the workspace was created with auto_group=false and no domain. |
auto_group |
bool
|
When true, new grants whose email domain matches |
default |
Optional[bool]
|
When true, this is the application's default workspace. |
created_at |
int
|
Creation timestamp, represented as a Unix timestamp in seconds. |
updated_at |
int
|
Last-update timestamp, represented as a Unix timestamp in seconds. |
policy_id |
Optional[str]
|
Inbox policy attached to the workspace (UUID). |
rule_ids |
Optional[List[str]]
|
Inbox rules attached to the workspace (list of UUIDs). |
Source code in nylas/models/workspaces.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
WorkspaceAutoGroupRequest
Bases: TypedDict
Class representation of a Nylas workspace auto-group request.
All fields are optional.
Attributes:
| Name | Type | Description |
|---|---|---|
after_created_at |
NotRequired[int]
|
Only group grants created at/after this Unix timestamp. |
invalid_also |
NotRequired[bool]
|
When true, includes invalid grants in the grouping pass. Defaults to false. |
specific_domain |
NotRequired[str]
|
Only group grants whose email domain matches this domain. |
Source code in nylas/models/workspaces.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
WorkspaceAutoGroupResponse
dataclass
Class representing the response from starting a workspace auto-group job.
Attributes:
| Name | Type | Description |
|---|---|---|
job_id |
str
|
The background job ID (UUID). |
message |
str
|
A human-readable message describing the started job. |
Source code in nylas/models/workspaces.py
44 45 46 47 48 49 50 51 52 53 54 55 56 | |
WorkspaceManualAssignRequest
Bases: TypedDict
Class representation of a Nylas workspace manual-assign request.
At least one of assign_grants or remove_grants must contain a grant ID.
Attributes:
| Name | Type | Description |
|---|---|---|
assign_grants |
NotRequired[List[str]]
|
Grant IDs to assign to the workspace. Max 500 entries. |
remove_grants |
NotRequired[List[str]]
|
Grant IDs to remove from the workspace. Max 500 entries. |
Source code in nylas/models/workspaces.py
145 146 147 148 149 150 151 152 153 154 155 156 157 | |
WorkspaceManualAssignResponse
dataclass
Class representing the response from manually assigning/removing grants.
Attributes:
| Name | Type | Description |
|---|---|---|
application_id |
str
|
The application owning the workspace (UUID). |
workspace_id |
str
|
The workspace that was updated (UUID). |
domain |
str
|
The workspace domain (empty string if none). |
grants_assigned |
Optional[List[str]]
|
Grant IDs that were actually assigned. Serializes as |
grants_removed |
Optional[List[str]]
|
Grant IDs that were actually removed. Serializes as |
Source code in nylas/models/workspaces.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |