delete_unibox_threads
Move one conversation, a batch of conversations, or one message to the trash, where retention eventually removes it for good. Select thread, threads, or message explicitly.
# 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)
## delete_unibox_threads
Move one conversation, a batch of conversations, or one message to the trash, where retention eventually removes it for good. Select thread, threads, or message explicitly.
Use only when the customer has asked for mail to be removed from the product's view.
Prefer archiving: it hides a conversation without starting a purge clock. Deletion here does not delete the copy in the mailbox provider, so it is not a way to honour an erasure request on its own.
Obtain the user's explicit authorization before invoking a write or destructive action. This is a client interaction requirement, not a server-issued approval token.
Scopes: unibox:archive
Risk: destructive; confirmation: explicit; 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": [
"thread"
]
}
]
},
"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
}
},
"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": [
"threads"
]
}
]
},
"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": [
"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"
}
},
"required": [
"workspaceId",
"action",
"messageId"
],
"patternProperties": {
"^(?!(?:workspaceId|action|messageId)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"messageId"
]
}
}
]
}
```
### 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": [
"thread"
]
}
]
},
"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
}
},
"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": [
"threads"
]
}
]
},
"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": [
"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"
}
},
"required": [
"workspaceId",
"action",
"messageId"
],
"patternProperties": {
"^(?!(?:workspaceId|action|messageId)$)[\\s\\S]*$": false
},
"additionalProperties": true,
"propertyNames": {
"type": "string",
"enum": [
"workspaceId",
"action",
"messageId"
]
}
}
]
}
```
### 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": {
"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": {
"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.delete`: `DELETE /v1/workspaces/:workspaceId/unibox/threads/:threadId`
- `uniboxThreads.batchDelete`: `POST /v1/workspaces/:workspaceId/unibox/threads/batch/delete`
- `uniboxMessages.delete`: `DELETE /v1/workspaces/:workspaceId/unibox/messages/:messageId`