triage_unibox_threads
Organize conversations: star, mark read, archive, unarchive, restore, relabel, and flag a message — singly or for up to a hundred threads at once. Select an explicit action and provide the identifiers and values it needs.
# MCP tool reference
1 callable tools.
Use tools/call at https://mcp.schedulerzero.com/mcp with the exact tool name and arguments below. The /tools/ paths in this view are documentation identifiers, not HTTP endpoints. Request execution is disabled for this reference.
Inputs are shown for personal API keys (bound) and for OAuth/delegated agents. Output schemas describe MCP structuredContent: native objects pass through; arrays, scalars and null use a data wrapper. Text content retains the native JSON result.
[Connect a client](/mcp/connect) · [Authentication and authorization](/authentication) · [Generated auth guide](/auth.md) · [Download tool catalog](/mcp-catalog.json) · [Agent documentation](/llms.txt)
## triage_unibox_threads
Organize conversations: star, mark read, archive, unarchive, restore, relabel, and flag a message — singly or for up to a hundred threads at once. Select an explicit action and provide the identifiers and values it needs.
Use to work an inbox down. Every action is reversible and setting a state a thread already holds succeeds, so a retry is safe.
None of this touches the mailbox at the provider: archiving here does not archive in Gmail. Applying a reply label can start label-driven automation, so it is not a neutral annotation.
Scopes: unibox:read, unibox:archive, unibox:label
Risk: write; confirmation: none; idempotency: supported.
### Input schema (personal API key)
```json
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"anyOf": [
{
"type": "string",
"enum": [
"set_state"
]
}
]
},
"threadIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"minItems": 1,
"maxItems": 100
},
"starred": {
"type": "boolean"
},
"read": {
"type": "boolean"
}
},
"required": [
"workspaceId",
"action",
"threadIds"
],
"patternProperties": {
"^(?!(?:workspaceId|action|threadIds|starred|read)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"threadIds",
"starred",
"read"
]
}
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"type": "string",
"enum": [
"archive",
"unarchive",
"restore"
]
},
"threadIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"workspaceId",
"action",
"threadIds"
],
"patternProperties": {
"^(?!(?:workspaceId|action|threadIds)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"threadIds"
]
}
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"anyOf": [
{
"type": "string",
"enum": [
"set_labels"
]
}
]
},
"threadIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"minItems": 1,
"maxItems": 1
},
"labels": {
"type": "object",
"properties": {
"add": {
"type": "array",
"items": {
"$ref": "#/$defs/ThreadLabelId"
},
"maxItems": 20
},
"remove": {
"type": "array",
"items": {
"$ref": "#/$defs/ThreadLabelId"
},
"maxItems": 20
}
},
"required": [
"add",
"remove"
],
"patternProperties": {
"^(?!(?:add|remove)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"add",
"remove"
]
}
}
},
"required": [
"workspaceId",
"action",
"threadIds",
"labels"
],
"patternProperties": {
"^(?!(?:workspaceId|action|threadIds|labels)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"threadIds",
"labels"
]
}
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"anyOf": [
{
"type": "string",
"enum": [
"flag_message"
]
}
]
},
"messageId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"flagged": {
"type": "boolean"
}
},
"required": [
"workspaceId",
"action",
"messageId",
"flagged"
],
"patternProperties": {
"^(?!(?:workspaceId|action|messageId|flagged)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"messageId",
"flagged"
]
}
}
],
"$defs": {
"ThreadLabelId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
}
}
}
```
### Input schema (OAuth / delegated agent)
```json
{
"type": "object",
"anyOf": [
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"anyOf": [
{
"type": "string",
"enum": [
"set_state"
]
}
]
},
"threadIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"minItems": 1,
"maxItems": 100
},
"starred": {
"type": "boolean"
},
"read": {
"type": "boolean"
}
},
"required": [
"workspaceId",
"action",
"threadIds"
],
"patternProperties": {
"^(?!(?:workspaceId|action|threadIds|starred|read)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"threadIds",
"starred",
"read"
]
}
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"type": "string",
"enum": [
"archive",
"unarchive",
"restore"
]
},
"threadIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"workspaceId",
"action",
"threadIds"
],
"patternProperties": {
"^(?!(?:workspaceId|action|threadIds)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"threadIds"
]
}
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"anyOf": [
{
"type": "string",
"enum": [
"set_labels"
]
}
]
},
"threadIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"minItems": 1,
"maxItems": 1
},
"labels": {
"type": "object",
"properties": {
"add": {
"type": "array",
"items": {
"$ref": "#/$defs/ThreadLabelId"
},
"maxItems": 20
},
"remove": {
"type": "array",
"items": {
"$ref": "#/$defs/ThreadLabelId"
},
"maxItems": 20
}
},
"required": [
"add",
"remove"
],
"patternProperties": {
"^(?!(?:add|remove)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"add",
"remove"
]
}
}
},
"required": [
"workspaceId",
"action",
"threadIds",
"labels"
],
"patternProperties": {
"^(?!(?:workspaceId|action|threadIds|labels)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"threadIds",
"labels"
]
}
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"action": {
"anyOf": [
{
"type": "string",
"enum": [
"flag_message"
]
}
]
},
"messageId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"flagged": {
"type": "boolean"
}
},
"required": [
"workspaceId",
"action",
"messageId",
"flagged"
],
"patternProperties": {
"^(?!(?:workspaceId|action|messageId|flagged)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"messageId",
"flagged"
]
}
}
],
"$defs": {
"ThreadLabelId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
}
}
}
```
### Output schema (structuredContent)
```json
{
"$defs": {
"LeadStoredText": {
"type": "string",
"maxLength": 65536
},
"EmailAddress": {
"type": "string",
"minLength": 3,
"maxLength": 320,
"pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
},
"OpaqueId": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"UtcDateTimeEncoded": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
},
"ThreadLabelId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"ShortText": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"HttpUrl": {
"type": "string",
"minLength": 1,
"maxLength": 2048,
"pattern": "^https?:\\/\\/[^\\s/$.?#][^\\s]*$"
},
"NonEmptyString": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"AttachmentId": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"type": "object",
"anyOf": [
{
"allOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"inboxId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"organizationId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"snippet": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"contact": {
"type": "object",
"properties": {
"emailAddress": {
"$ref": "#/$defs/EmailAddress"
},
"name": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"leadId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"emailAddress",
"name",
"leadId"
],
"patternProperties": {
"^(?!(?:emailAddress|name|leadId)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"emailAddress",
"name",
"leadId"
]
}
},
"providerThreadId": {
"$ref": "#/$defs/OpaqueId"
},
"provider": {
"type": "string",
"enum": [
"google_workspace",
"microsoft_365",
"other"
]
},
"lastMessageAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"messageCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"labels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/ThreadLabelId"
},
"name": {
"$ref": "#/$defs/ShortText"
},
"hexColor": {
"$ref": "#/$defs/ShortText"
},
"sentiment": {
"anyOf": [
{
"type": "string",
"enum": [
"positive",
"negative",
"neutral"
]
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"custom",
"default"
]
}
},
"required": [
"id",
"name",
"hexColor",
"sentiment",
"type"
],
"patternProperties": {
"^(?!(?:id|name|hexColor|sentiment|type)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"name",
"hexColor",
"sentiment",
"type"
]
}
}
},
"assignees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"name": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"email": {
"$ref": "#/$defs/EmailAddress"
},
"image": {
"anyOf": [
{
"$ref": "#/$defs/HttpUrl"
},
{
"type": "null"
}
]
},
"isFormerMember": {
"type": "boolean"
}
},
"required": [
"userId",
"name",
"email",
"image",
"isFormerMember"
],
"patternProperties": {
"^(?!(?:userId|name|email|image|isFormerMember)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"userId",
"name",
"email",
"image",
"isFormerMember"
]
}
}
},
"campaignId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"campaignContactId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"isRead": {
"type": "boolean"
},
"starredAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"archivedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"deletedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"folders": {
"type": "array",
"items": {
"type": "string",
"enum": [
"inbox",
"sent",
"archived",
"starred",
"warmup",
"trash"
]
}
},
"recentMessages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"providerInternalMessageId": {
"$ref": "#/$defs/OpaqueId"
},
"from": {
"$ref": "#/$defs/NonEmptyString"
},
"to": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"cc": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"snippet": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"receivedAt": {
"$ref": "#/$defs/UtcDateTimeEncoded"
},
"isRead": {
"type": "boolean"
},
"isFromInboxSender": {
"type": "boolean"
}
},
"required": [
"id",
"providerInternalMessageId",
"from",
"to",
"cc",
"subject",
"snippet",
"receivedAt",
"isRead",
"isFromInboxSender"
],
"patternProperties": {
"^(?!(?:id|providerInternalMessageId|from|to|cc|subject|snippet|receivedAt|isRead|isFromInboxSender)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"providerInternalMessageId",
"from",
"to",
"cc",
"subject",
"snippet",
"receivedAt",
"isRead",
"isFromInboxSender"
]
}
},
"maxItems": 20
}
},
"required": [
"id",
"inboxId",
"organizationId",
"subject",
"snippet",
"contact",
"providerThreadId",
"provider",
"lastMessageAt",
"messageCount",
"labels",
"assignees",
"campaignId",
"campaignContactId",
"isRead",
"starredAt",
"archivedAt",
"deletedAt",
"folders"
],
"patternProperties": {
"^(?!(?:id|inboxId|organizationId|subject|snippet|contact|providerThreadId|provider|lastMessageAt|messageCount|labels|assignees|campaignId|campaignContactId|isRead|starredAt|archivedAt|deletedAt|folders|recentMessages)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"inboxId",
"organizationId",
"subject",
"snippet",
"contact",
"providerThreadId",
"provider",
"lastMessageAt",
"messageCount",
"labels",
"assignees",
"campaignId",
"campaignContactId",
"isRead",
"starredAt",
"archivedAt",
"deletedAt",
"folders",
"recentMessages"
]
}
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"threadId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"inboxId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"organizationId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"providerInternalMessageId": {
"$ref": "#/$defs/OpaqueId"
},
"rfc2822MessageId": {
"anyOf": [
{
"$ref": "#/$defs/NonEmptyString"
},
{
"type": "null"
}
]
},
"provider": {
"type": "string",
"enum": [
"google_workspace",
"microsoft_365",
"other"
]
},
"from": {
"$ref": "#/$defs/NonEmptyString"
},
"to": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"cc": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"bcc": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"snippet": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"receivedAt": {
"$ref": "#/$defs/UtcDateTimeEncoded"
},
"direction": {
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
"isFromInboxSender": {
"type": "boolean"
},
"sentFromUnibox": {
"type": "boolean"
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/AttachmentId"
},
"filename": {
"$ref": "#/$defs/ShortText"
},
"contentType": {
"$ref": "#/$defs/ShortText"
},
"size": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"inline": {
"type": "boolean"
}
},
"required": [
"id",
"filename",
"contentType",
"size",
"inline"
],
"patternProperties": {
"^(?!(?:id|filename|contentType|size|inline)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"filename",
"contentType",
"size",
"inline"
]
}
}
},
"bodyState": {
"type": "string",
"enum": [
"available",
"pending"
]
},
"isRead": {
"type": "boolean"
},
"flaggedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"deletedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string",
"maxLength": 16384
}
},
"authoredByWorkflowRunId": {
"anyOf": [
{
"$ref": "#/$defs/OpaqueId"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"threadId",
"inboxId",
"organizationId",
"providerInternalMessageId",
"rfc2822MessageId",
"provider",
"from",
"to",
"cc",
"bcc",
"subject",
"snippet",
"receivedAt",
"direction",
"isFromInboxSender",
"sentFromUnibox",
"attachments",
"bodyState",
"isRead",
"flaggedAt",
"deletedAt"
],
"patternProperties": {
"^(?!(?:id|threadId|inboxId|organizationId|providerInternalMessageId|rfc2822MessageId|provider|from|to|cc|bcc|subject|snippet|receivedAt|direction|isFromInboxSender|sentFromUnibox|attachments|bodyState|isRead|flaggedAt|deletedAt|headers|authoredByWorkflowRunId)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"threadId",
"inboxId",
"organizationId",
"providerInternalMessageId",
"rfc2822MessageId",
"provider",
"from",
"to",
"cc",
"bcc",
"subject",
"snippet",
"receivedAt",
"direction",
"isFromInboxSender",
"sentFromUnibox",
"attachments",
"bodyState",
"isRead",
"flaggedAt",
"deletedAt",
"headers",
"authoredByWorkflowRunId"
]
}
},
{
"type": "object",
"properties": {
"threadId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"labels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/ThreadLabelId"
},
"name": {
"$ref": "#/$defs/ShortText"
},
"hexColor": {
"$ref": "#/$defs/ShortText"
},
"sentiment": {
"anyOf": [
{
"type": "string",
"enum": [
"positive",
"negative",
"neutral"
]
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"custom",
"default"
]
}
},
"required": [
"id",
"name",
"hexColor",
"sentiment",
"type"
],
"patternProperties": {
"^(?!(?:id|name|hexColor|sentiment|type)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"name",
"hexColor",
"sentiment",
"type"
]
}
}
}
},
"required": [
"threadId",
"labels"
],
"patternProperties": {
"^(?!(?:threadId|labels)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"threadId",
"labels"
]
}
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"threadId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"ok": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/ShortText"
},
{
"type": "null"
}
]
}
},
"required": [
"threadId",
"ok",
"error"
],
"patternProperties": {
"^(?!(?:threadId|ok|error)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"threadId",
"ok",
"error"
]
}
},
"maxItems": 100
},
"succeeded": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"failed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"items",
"succeeded",
"failed"
],
"patternProperties": {
"^(?!(?:items|succeeded|failed)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"items",
"succeeded",
"failed"
]
}
}
]
},
{
"type": "object"
}
]
},
{
"type": "object",
"properties": {
"data": {
"allOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"inboxId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"organizationId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"snippet": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"contact": {
"type": "object",
"properties": {
"emailAddress": {
"$ref": "#/$defs/EmailAddress"
},
"name": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"leadId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"emailAddress",
"name",
"leadId"
],
"patternProperties": {
"^(?!(?:emailAddress|name|leadId)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"emailAddress",
"name",
"leadId"
]
}
},
"providerThreadId": {
"$ref": "#/$defs/OpaqueId"
},
"provider": {
"type": "string",
"enum": [
"google_workspace",
"microsoft_365",
"other"
]
},
"lastMessageAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"messageCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"labels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/ThreadLabelId"
},
"name": {
"$ref": "#/$defs/ShortText"
},
"hexColor": {
"$ref": "#/$defs/ShortText"
},
"sentiment": {
"anyOf": [
{
"type": "string",
"enum": [
"positive",
"negative",
"neutral"
]
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"custom",
"default"
]
}
},
"required": [
"id",
"name",
"hexColor",
"sentiment",
"type"
],
"patternProperties": {
"^(?!(?:id|name|hexColor|sentiment|type)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"name",
"hexColor",
"sentiment",
"type"
]
}
}
},
"assignees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"name": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"email": {
"$ref": "#/$defs/EmailAddress"
},
"image": {
"anyOf": [
{
"$ref": "#/$defs/HttpUrl"
},
{
"type": "null"
}
]
},
"isFormerMember": {
"type": "boolean"
}
},
"required": [
"userId",
"name",
"email",
"image",
"isFormerMember"
],
"patternProperties": {
"^(?!(?:userId|name|email|image|isFormerMember)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"userId",
"name",
"email",
"image",
"isFormerMember"
]
}
}
},
"campaignId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"campaignContactId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"isRead": {
"type": "boolean"
},
"starredAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"archivedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"deletedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"folders": {
"type": "array",
"items": {
"type": "string",
"enum": [
"inbox",
"sent",
"archived",
"starred",
"warmup",
"trash"
]
}
},
"recentMessages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"providerInternalMessageId": {
"$ref": "#/$defs/OpaqueId"
},
"from": {
"$ref": "#/$defs/NonEmptyString"
},
"to": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"cc": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"snippet": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"receivedAt": {
"$ref": "#/$defs/UtcDateTimeEncoded"
},
"isRead": {
"type": "boolean"
},
"isFromInboxSender": {
"type": "boolean"
}
},
"required": [
"id",
"providerInternalMessageId",
"from",
"to",
"cc",
"subject",
"snippet",
"receivedAt",
"isRead",
"isFromInboxSender"
],
"patternProperties": {
"^(?!(?:id|providerInternalMessageId|from|to|cc|subject|snippet|receivedAt|isRead|isFromInboxSender)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"providerInternalMessageId",
"from",
"to",
"cc",
"subject",
"snippet",
"receivedAt",
"isRead",
"isFromInboxSender"
]
}
},
"maxItems": 20
}
},
"required": [
"id",
"inboxId",
"organizationId",
"subject",
"snippet",
"contact",
"providerThreadId",
"provider",
"lastMessageAt",
"messageCount",
"labels",
"assignees",
"campaignId",
"campaignContactId",
"isRead",
"starredAt",
"archivedAt",
"deletedAt",
"folders"
],
"patternProperties": {
"^(?!(?:id|inboxId|organizationId|subject|snippet|contact|providerThreadId|provider|lastMessageAt|messageCount|labels|assignees|campaignId|campaignContactId|isRead|starredAt|archivedAt|deletedAt|folders|recentMessages)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"inboxId",
"organizationId",
"subject",
"snippet",
"contact",
"providerThreadId",
"provider",
"lastMessageAt",
"messageCount",
"labels",
"assignees",
"campaignId",
"campaignContactId",
"isRead",
"starredAt",
"archivedAt",
"deletedAt",
"folders",
"recentMessages"
]
}
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"threadId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"inboxId": {
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
{
"type": "null"
}
]
},
"organizationId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"providerInternalMessageId": {
"$ref": "#/$defs/OpaqueId"
},
"rfc2822MessageId": {
"anyOf": [
{
"$ref": "#/$defs/NonEmptyString"
},
{
"type": "null"
}
]
},
"provider": {
"type": "string",
"enum": [
"google_workspace",
"microsoft_365",
"other"
]
},
"from": {
"$ref": "#/$defs/NonEmptyString"
},
"to": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"cc": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"bcc": {
"type": "array",
"items": {
"$ref": "#/$defs/NonEmptyString"
}
},
"subject": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"snippet": {
"anyOf": [
{
"$ref": "#/$defs/LeadStoredText"
},
{
"type": "null"
}
]
},
"receivedAt": {
"$ref": "#/$defs/UtcDateTimeEncoded"
},
"direction": {
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
"isFromInboxSender": {
"type": "boolean"
},
"sentFromUnibox": {
"type": "boolean"
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/AttachmentId"
},
"filename": {
"$ref": "#/$defs/ShortText"
},
"contentType": {
"$ref": "#/$defs/ShortText"
},
"size": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"inline": {
"type": "boolean"
}
},
"required": [
"id",
"filename",
"contentType",
"size",
"inline"
],
"patternProperties": {
"^(?!(?:id|filename|contentType|size|inline)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"filename",
"contentType",
"size",
"inline"
]
}
}
},
"bodyState": {
"type": "string",
"enum": [
"available",
"pending"
]
},
"isRead": {
"type": "boolean"
},
"flaggedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"deletedAt": {
"anyOf": [
{
"$ref": "#/$defs/UtcDateTimeEncoded"
},
{
"type": "null"
}
]
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string",
"maxLength": 16384
}
},
"authoredByWorkflowRunId": {
"anyOf": [
{
"$ref": "#/$defs/OpaqueId"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"threadId",
"inboxId",
"organizationId",
"providerInternalMessageId",
"rfc2822MessageId",
"provider",
"from",
"to",
"cc",
"bcc",
"subject",
"snippet",
"receivedAt",
"direction",
"isFromInboxSender",
"sentFromUnibox",
"attachments",
"bodyState",
"isRead",
"flaggedAt",
"deletedAt"
],
"patternProperties": {
"^(?!(?:id|threadId|inboxId|organizationId|providerInternalMessageId|rfc2822MessageId|provider|from|to|cc|bcc|subject|snippet|receivedAt|direction|isFromInboxSender|sentFromUnibox|attachments|bodyState|isRead|flaggedAt|deletedAt|headers|authoredByWorkflowRunId)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"threadId",
"inboxId",
"organizationId",
"providerInternalMessageId",
"rfc2822MessageId",
"provider",
"from",
"to",
"cc",
"bcc",
"subject",
"snippet",
"receivedAt",
"direction",
"isFromInboxSender",
"sentFromUnibox",
"attachments",
"bodyState",
"isRead",
"flaggedAt",
"deletedAt",
"headers",
"authoredByWorkflowRunId"
]
}
},
{
"type": "object",
"properties": {
"threadId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"labels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "#/$defs/ThreadLabelId"
},
"name": {
"$ref": "#/$defs/ShortText"
},
"hexColor": {
"$ref": "#/$defs/ShortText"
},
"sentiment": {
"anyOf": [
{
"type": "string",
"enum": [
"positive",
"negative",
"neutral"
]
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"custom",
"default"
]
}
},
"required": [
"id",
"name",
"hexColor",
"sentiment",
"type"
],
"patternProperties": {
"^(?!(?:id|name|hexColor|sentiment|type)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"id",
"name",
"hexColor",
"sentiment",
"type"
]
}
}
}
},
"required": [
"threadId",
"labels"
],
"patternProperties": {
"^(?!(?:threadId|labels)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"threadId",
"labels"
]
}
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"threadId": {
"type": "string",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
"format": "uuid"
},
"ok": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"$ref": "#/$defs/ShortText"
},
{
"type": "null"
}
]
}
},
"required": [
"threadId",
"ok",
"error"
],
"patternProperties": {
"^(?!(?:threadId|ok|error)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"threadId",
"ok",
"error"
]
}
},
"maxItems": 100
},
"succeeded": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"failed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"items",
"succeeded",
"failed"
],
"patternProperties": {
"^(?!(?:items|succeeded|failed)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"items",
"succeeded",
"failed"
]
}
}
]
},
{
"not": {
"type": "object"
}
}
]
}
},
"required": [
"data"
],
"additionalProperties": false
}
]
}
```
### Underlying API operations
- `uniboxThreads.update`: `PATCH /v1/workspaces/:workspaceId/unibox/threads/:threadId`
- `uniboxThreads.archive`: `POST /v1/workspaces/:workspaceId/unibox/threads/:threadId/archive`
- `uniboxThreads.unarchive`: `POST /v1/workspaces/:workspaceId/unibox/threads/:threadId/unarchive`
- `uniboxThreads.restore`: `POST /v1/workspaces/:workspaceId/unibox/threads/:threadId/restore`
- `uniboxThreads.setLabels`: `PUT /v1/workspaces/:workspaceId/unibox/threads/:threadId/labels`
- `uniboxThreads.batchStar`: `POST /v1/workspaces/:workspaceId/unibox/threads/batch/star`
- `uniboxThreads.batchArchive`: `POST /v1/workspaces/:workspaceId/unibox/threads/batch/archive`
- `uniboxThreads.batchMarkRead`: `POST /v1/workspaces/:workspaceId/unibox/threads/batch/read`
- `uniboxThreads.batchRestore`: `POST /v1/workspaces/:workspaceId/unibox/threads/batch/restore`
- `uniboxMessages.update`: `PATCH /v1/workspaces/:workspaceId/unibox/messages/:messageId`