跳转到内容
简体中文

邮件模板

PUT/v1/mailboxes/{mailbox_id}/templates/{template_id}

每个邮箱最多 100 个模板。字段为 name、subject、text 和 html;HTML 会经过清理。模板本身不会发送邮件。

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

要求

终端窗口
curl -X PUT 'https://adapt-mail.com/v1/mailboxes/<mailbox_id>/templates/<template_id>' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
--data '{"name":"<name>"}'

选项

mailbox_idpath一定

integer

template_idpath一定

integer

X-Customer-IDheader
选项 1

string

选项 2

null

请求正文 · application/json

object

name一定

string

minLength: 1

maxLength: 120

subject

string

默认: ""

maxLength: 998

text

string

默认: ""

maxLength: 20000

html

string

默认: ""

maxLength: 30000

不接受未知字段。

响应

200 成功回复

application/json

object

id一定

integer

data一定

object

name一定

string

minLength: 1

maxLength: 120

subject

string

默认: ""

maxLength: 998

text

string

默认: ""

maxLength: 20000

html

string

默认: ""

maxLength: 30000

不接受未知字段。

updated_at一定

string

UTC. 中的日期和时间 如果没有偏移,该值也代表 UTC.

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