Appearance
mailbox
14 endpoints.
GET /api/v1/mailbox/accounts
List Accounts
200 — Successful Response
json
{
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"label": {
"type": "string",
"title": "Label"
},
"address": {
"type": "string",
"title": "Address"
},
"imap_host": {
"type": "string",
"title": "Imap Host"
},
"imap_port": {
"type": "integer",
"title": "Imap Port"
},
"imap_security": {
"type": "string",
"title": "Imap Security"
},
"auth_mode": {
"type": "string",
"title": "Auth Mode"
},
"imap_user": {
"type": "string",
"title": "Imap User"
},
"folders": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folders"
},
"sent_folder": {
"type": "string",
"title": "Sent Folder"
},
"smtp_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Host"
},
"smtp_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Smtp Port"
},
"smtp_security": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Security"
},
"smtp_user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp User"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"active": {
"type": "boolean",
"title": "Active"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Synced At"
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Error"
},
"has_imap_password": {
"type": "boolean",
"title": "Has Imap Password",
"default": false
},
"has_smtp_password": {
"type": "boolean",
"title": "Has Smtp Password",
"default": false
}
},
"type": "object",
"required": [
"id",
"label",
"address",
"imap_host",
"imap_port",
"imap_security",
"auth_mode",
"imap_user",
"sent_folder",
"active"
],
"title": "AccountOut"
},
"type": "array",
"title": "Response List Accounts Api V1 Mailbox Accounts Get"
}POST /api/v1/mailbox/accounts
Create Account
Request body
json
{
"properties": {
"label": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Label"
},
"address": {
"type": "string",
"maxLength": 320,
"minLength": 3,
"title": "Address"
},
"imap_host": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Imap Host"
},
"imap_port": {
"type": "integer",
"title": "Imap Port",
"default": 993
},
"imap_security": {
"type": "string",
"title": "Imap Security",
"default": "ssl"
},
"auth_mode": {
"type": "string",
"title": "Auth Mode",
"default": "password"
},
"imap_user": {
"type": "string",
"maxLength": 320,
"minLength": 1,
"title": "Imap User"
},
"imap_password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Imap Password"
},
"folders": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folders"
},
"sent_folder": {
"type": "string",
"title": "Sent Folder",
"default": "Sent"
},
"smtp_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Host"
},
"smtp_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Smtp Port"
},
"smtp_security": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Security"
},
"smtp_user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp User"
},
"smtp_password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Password"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"active": {
"type": "boolean",
"title": "Active",
"default": true
}
},
"type": "object",
"required": [
"label",
"address",
"imap_host",
"imap_user"
],
"title": "AccountIn"
}200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"label": {
"type": "string",
"title": "Label"
},
"address": {
"type": "string",
"title": "Address"
},
"imap_host": {
"type": "string",
"title": "Imap Host"
},
"imap_port": {
"type": "integer",
"title": "Imap Port"
},
"imap_security": {
"type": "string",
"title": "Imap Security"
},
"auth_mode": {
"type": "string",
"title": "Auth Mode"
},
"imap_user": {
"type": "string",
"title": "Imap User"
},
"folders": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folders"
},
"sent_folder": {
"type": "string",
"title": "Sent Folder"
},
"smtp_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Host"
},
"smtp_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Smtp Port"
},
"smtp_security": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Security"
},
"smtp_user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp User"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"active": {
"type": "boolean",
"title": "Active"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Synced At"
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Error"
},
"has_imap_password": {
"type": "boolean",
"title": "Has Imap Password",
"default": false
},
"has_smtp_password": {
"type": "boolean",
"title": "Has Smtp Password",
"default": false
}
},
"type": "object",
"required": [
"id",
"label",
"address",
"imap_host",
"imap_port",
"imap_security",
"auth_mode",
"imap_user",
"sent_folder",
"active"
],
"title": "AccountOut"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}PUT /api/v1/mailbox/accounts/{account_id}
Update Account
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | path | yes | integer |
Request body
json
{
"properties": {
"label": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Label"
},
"address": {
"type": "string",
"maxLength": 320,
"minLength": 3,
"title": "Address"
},
"imap_host": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Imap Host"
},
"imap_port": {
"type": "integer",
"title": "Imap Port",
"default": 993
},
"imap_security": {
"type": "string",
"title": "Imap Security",
"default": "ssl"
},
"auth_mode": {
"type": "string",
"title": "Auth Mode",
"default": "password"
},
"imap_user": {
"type": "string",
"maxLength": 320,
"minLength": 1,
"title": "Imap User"
},
"imap_password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Imap Password"
},
"folders": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folders"
},
"sent_folder": {
"type": "string",
"title": "Sent Folder",
"default": "Sent"
},
"smtp_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Host"
},
"smtp_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Smtp Port"
},
"smtp_security": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Security"
},
"smtp_user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp User"
},
"smtp_password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Password"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"active": {
"type": "boolean",
"title": "Active",
"default": true
}
},
"type": "object",
"required": [
"label",
"address",
"imap_host",
"imap_user"
],
"title": "AccountIn"
}200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"label": {
"type": "string",
"title": "Label"
},
"address": {
"type": "string",
"title": "Address"
},
"imap_host": {
"type": "string",
"title": "Imap Host"
},
"imap_port": {
"type": "integer",
"title": "Imap Port"
},
"imap_security": {
"type": "string",
"title": "Imap Security"
},
"auth_mode": {
"type": "string",
"title": "Auth Mode"
},
"imap_user": {
"type": "string",
"title": "Imap User"
},
"folders": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folders"
},
"sent_folder": {
"type": "string",
"title": "Sent Folder"
},
"smtp_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Host"
},
"smtp_port": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Smtp Port"
},
"smtp_security": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp Security"
},
"smtp_user": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Smtp User"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"active": {
"type": "boolean",
"title": "Active"
},
"last_synced_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Synced At"
},
"last_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Last Error"
},
"has_imap_password": {
"type": "boolean",
"title": "Has Imap Password",
"default": false
},
"has_smtp_password": {
"type": "boolean",
"title": "Has Smtp Password",
"default": false
}
},
"type": "object",
"required": [
"id",
"label",
"address",
"imap_host",
"imap_port",
"imap_security",
"auth_mode",
"imap_user",
"sent_folder",
"active"
],
"title": "AccountOut"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}DELETE /api/v1/mailbox/accounts/{account_id}
Delete Account
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | path | yes | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/mailbox/accounts/{account_id}/test
Test Account
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | path | yes | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/mailbox/sync
Sync Now
Pull new mail now. Staff, not superuser: reading the mailbox is the job.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | query | no |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/mailbox/threads
List Threads
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | query | no | ||
status | query | no | open|waiting|resolved | |
unread | query | no | ||
starred | query | no | ||
assignee_user_id | query | no | ||
box | query | no | sent|outbox — see _box_filter | |
q | query | no | matches subject, correspondent and body | |
limit | query | no | integer | |
offset | query | no | integer |
200 — Successful Response
json
{
"type": "array",
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"account_id": {
"type": "integer",
"title": "Account Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"correspondent_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Correspondent Name"
},
"correspondent_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Correspondent Email"
},
"status": {
"type": "string",
"title": "Status"
},
"assignee_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Assignee User Id"
},
"assignee_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Assignee Name"
},
"starred": {
"type": "boolean",
"title": "Starred"
},
"unread": {
"type": "boolean",
"title": "Unread"
},
"message_count": {
"type": "integer",
"title": "Message Count"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"last_message_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Message At"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Preview"
},
"supplier_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Supplier Id"
},
"customer_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Customer Id"
}
},
"type": "object",
"required": [
"id",
"account_id",
"status",
"starred",
"unread",
"message_count",
"has_attachments"
],
"title": "ThreadOut"
},
"title": "Response List Threads Api V1 Mailbox Threads Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/mailbox/counts
Thread Counts
The rail's badges. One grouped query, not four counts.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | query | no |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/mailbox/threads/{thread_id}
Get Thread
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
thread_id | path | yes | integer |
200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"account_id": {
"type": "integer",
"title": "Account Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"correspondent_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Correspondent Name"
},
"correspondent_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Correspondent Email"
},
"status": {
"type": "string",
"title": "Status"
},
"assignee_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Assignee User Id"
},
"assignee_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Assignee Name"
},
"starred": {
"type": "boolean",
"title": "Starred"
},
"unread": {
"type": "boolean",
"title": "Unread"
},
"message_count": {
"type": "integer",
"title": "Message Count"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"last_message_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Message At"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Preview"
},
"supplier_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Supplier Id"
},
"customer_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Customer Id"
},
"messages": {
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"direction": {
"type": "string",
"title": "Direction"
},
"folder": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"from_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Email"
},
"to_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "To Addrs"
},
"cc_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cc Addrs"
},
"body_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Text"
},
"body_html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Html"
},
"sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Sent At"
},
"author_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Author User Id"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"attachments": {
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"filename": {
"type": "string",
"title": "Filename"
},
"content_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Type"
},
"size_bytes": {
"type": "integer",
"title": "Size Bytes"
},
"content_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Id"
},
"stored": {
"type": "boolean",
"title": "Stored"
}
},
"type": "object",
"required": [
"id",
"filename",
"size_bytes",
"stored"
],
"title": "AttachmentOut"
},
"type": "array",
"title": "Attachments",
"default": []
}
},
"type": "object",
"required": [
"id",
"direction",
"has_attachments"
],
"title": "MessageOut"
},
"type": "array",
"title": "Messages",
"default": []
}
},
"type": "object",
"required": [
"id",
"account_id",
"status",
"starred",
"unread",
"message_count",
"has_attachments"
],
"title": "ThreadDetail"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}PATCH /api/v1/mailbox/threads/{thread_id}
Patch Thread
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
thread_id | path | yes | integer |
Request body
json
{
"properties": {
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status"
},
"assignee_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Assignee User Id"
},
"starred": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Starred"
},
"unread": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Unread"
}
},
"type": "object",
"title": "ThreadPatch"
}200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"account_id": {
"type": "integer",
"title": "Account Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"correspondent_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Correspondent Name"
},
"correspondent_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Correspondent Email"
},
"status": {
"type": "string",
"title": "Status"
},
"assignee_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Assignee User Id"
},
"assignee_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Assignee Name"
},
"starred": {
"type": "boolean",
"title": "Starred"
},
"unread": {
"type": "boolean",
"title": "Unread"
},
"message_count": {
"type": "integer",
"title": "Message Count"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"last_message_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Last Message At"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Preview"
},
"supplier_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Supplier Id"
},
"customer_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Customer Id"
}
},
"type": "object",
"required": [
"id",
"account_id",
"status",
"starred",
"unread",
"message_count",
"has_attachments"
],
"title": "ThreadOut"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/mailbox/threads/{thread_id}/reply
Reply
Multipart, not JSON, so the reply can carry files (files, repeated).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
thread_id | path | yes | integer |
200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"direction": {
"type": "string",
"title": "Direction"
},
"folder": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"from_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Email"
},
"to_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "To Addrs"
},
"cc_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cc Addrs"
},
"body_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Text"
},
"body_html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Html"
},
"sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Sent At"
},
"author_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Author User Id"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"attachments": {
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"filename": {
"type": "string",
"title": "Filename"
},
"content_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Type"
},
"size_bytes": {
"type": "integer",
"title": "Size Bytes"
},
"content_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Id"
},
"stored": {
"type": "boolean",
"title": "Stored"
}
},
"type": "object",
"required": [
"id",
"filename",
"size_bytes",
"stored"
],
"title": "AttachmentOut"
},
"type": "array",
"title": "Attachments",
"default": []
}
},
"type": "object",
"required": [
"id",
"direction",
"has_attachments"
],
"title": "MessageOut"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/mailbox/threads/{thread_id}/forward
Forward
Forward a stored message as a new outgoing message.
The original is not threaded to the new recipients. Selected attachments are copied from the local mirror, so the forward does not depend on the original mailbox still being reachable at send time.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
thread_id | path | yes | integer |
200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"direction": {
"type": "string",
"title": "Direction"
},
"folder": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"from_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Email"
},
"to_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "To Addrs"
},
"cc_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cc Addrs"
},
"body_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Text"
},
"body_html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Html"
},
"sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Sent At"
},
"author_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Author User Id"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"attachments": {
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"filename": {
"type": "string",
"title": "Filename"
},
"content_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Type"
},
"size_bytes": {
"type": "integer",
"title": "Size Bytes"
},
"content_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Id"
},
"stored": {
"type": "boolean",
"title": "Stored"
}
},
"type": "object",
"required": [
"id",
"filename",
"size_bytes",
"stored"
],
"title": "AttachmentOut"
},
"type": "array",
"title": "Attachments",
"default": []
}
},
"type": "object",
"required": [
"id",
"direction",
"has_attachments"
],
"title": "MessageOut"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/mailbox/threads/{thread_id}/note
Add Note
An internal note. Never sent, never APPENDed — see the model docstring.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
thread_id | path | yes | integer |
Request body
json
{
"properties": {
"body": {
"type": "string",
"minLength": 1,
"title": "Body"
}
},
"type": "object",
"required": [
"body"
],
"title": "NoteIn"
}200 — Successful Response
json
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"direction": {
"type": "string",
"title": "Direction"
},
"folder": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Subject"
},
"from_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Name"
},
"from_email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "From Email"
},
"to_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "To Addrs"
},
"cc_addrs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cc Addrs"
},
"body_text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Text"
},
"body_html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Body Html"
},
"sent_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Sent At"
},
"author_user_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Author User Id"
},
"has_attachments": {
"type": "boolean",
"title": "Has Attachments"
},
"attachments": {
"items": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"filename": {
"type": "string",
"title": "Filename"
},
"content_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Type"
},
"size_bytes": {
"type": "integer",
"title": "Size Bytes"
},
"content_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Content Id"
},
"stored": {
"type": "boolean",
"title": "Stored"
}
},
"type": "object",
"required": [
"id",
"filename",
"size_bytes",
"stored"
],
"title": "AttachmentOut"
},
"type": "array",
"title": "Attachments",
"default": []
}
},
"type": "object",
"required": [
"id",
"direction",
"has_attachments"
],
"title": "MessageOut"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/mailbox/attachments/{attachment_id}
Download Attachment
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
attachment_id | path | yes | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}