跳转到内容
简体中文

带字母的动作

POST/v1/mailboxes/{mailbox_id}/messages/actions

对一个文件夹中选定的邮件应用一项操作。将它们的 ID 传递给 uids,将文件夹名称传递给 folder 及其 uidvalidity. 对于 action=move,还将目标文件夹指定为 destination.

授权和访问区域 · 错误和重复

要求

终端窗口
curl -X POST 'https://adapt-mail.com/v1/mailboxes/<mailbox_id>/messages/actions' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
--data '{"folder":"INBOX","uidvalidity":1,"uids":[1],"action":"read"}'

选项

mailbox_idpath一定

integer

X-Customer-IDheader
选项 1

string

选项 2

null

请求正文 · application/json

object

folder一定

string

文件夹列表中的文件夹名称,例如 INBOX.

minLength: 1

maxLength: 255

uidvalidity一定

integer

该值是来自此文件夹的响应 API 的 uidvalidity 。

exclusiveMinimum: 0

uids一定

array

从一个文件夹中选定的字母的标识符。

minItems: 1

maxItems: 100

数组元素

integer

action一定

string

有效值: "read" "unread" "star" "unstar" "move" "delete"

destination

目标文件夹名称。 action=move. 所需

选项 1

string

maxLength: 255

选项 2

null

不接受未知字段。

响应

200 成功回复

application/json

object

updated

boolean

401 需要登录

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

403 无法访问

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

404 找不到资源

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

409 国家冲突

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object

422 验证错误

application/json

object

detail

array

数组元素

object

loc一定

array

数组元素
选项 1

string

选项 2

integer

msg一定

string

type一定

string

503 暂时无法使用

application/json

object

detail
选项 1

string

选项 2

object

code

string

message

string

选项 3

array

数组元素

object