邮件转发 API

项目的收件地址,以及转发进项目的邮件。

由群历 REST API 的 OpenAPI 契约(openapi/qunli-api.yaml,qunli-api 提交 f18e40d)生成。路径都相对于 https://qunli.co;认证见认证,响应包装、分页和错误格式见约定。字段说明是契约里的英文原文。

收件地址

GET/api/v1/accounts/{account_id}/projects/{project_id}/email_forward

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是

响应

状态说明返回
200Email forwarddata: EmailForward
401Missing or invalid authentication.ProblemDetails

PATCH/api/v1/accounts/{account_id}/projects/{project_id}/email_forward

Project admins and team owners/admins only; others get 403.

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是

请求体application/json

字段类型必填说明
regenerateboolean否
email_forwardobject否
email_forward.statusstring否

响应

状态说明返回
200Updated email forwarddata: EmailForward
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails

转发的邮件

GET/api/v1/accounts/{account_id}/projects/{project_id}/forwarded_emails

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是
content查询full | summary否full (default): rows carry their whole body. summary: rows leave out content_html, content_json, content_markdown and content_version and carry only preview_text / excerpt (documents: also preview_html); read one record for its body. Other values → 400 param_invalid.默认 full

响应

状态说明返回
200Forwarded emailsdata: ForwardedEmail[]
401Missing or invalid authentication.ProblemDetails

GET/api/v1/accounts/{account_id}/forwarded_emails/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Forwarded emaildata: ForwardedEmail
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

GET/api/v1/accounts/{account_id}/projects/{project_id}/forwarded_emails/{id}

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Forwarded emaildata: ForwardedEmail
401Missing or invalid authentication.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

DELETE/api/v1/accounts/{account_id}/projects/{project_id}/forwarded_emails/{id}

Soft-delete a forwarded email (returns the trashed recording)

参数

参数位置类型必填说明
account_id路径string是团队的数字 id,和网页地址里的相同,例如 2025。
project_id路径string是
id路径string (ref)是引用号,例如 T1042,大小写不敏感,可带前导 #。

响应

状态说明返回
200Trashed forwarded emaildata: ForwardedEmail
401Missing or invalid authentication.ProblemDetails
403Authenticated but not permitted.ProblemDetails
404Resource does not exist or has been trashed.ProblemDetails

数据结构

上面的响应用到的对象。字段的类型是另一个对象时,它也列在这里。

EmailForward

字段类型必填说明
idstring (uuid)是
project_idstring (uuid)是
email_addressstring是
statusstring是
created_atstring (date-time)是
updated_atstring (date-time)是

ForwardedEmail

字段类型必填说明
idstring (uuid)是
public_idstring | null否
legacy_idstring | null是
titlestring是
content_htmlstring | null否
content_jsonobject | null否
content_markdownstring | null否Canonical body (GFM). content_html is rendered server-side from it; null on rows not yet migrated from Tiptap JSON.
content_versioninteger否Body version for compare-and-set saves. Starts at 0 and increases by one each time content_markdown / content_html / content_json actually changes (any write path). Send it back as recording.content_version when saving a body edit.
preview_textstring否Lists only. The body as plain text (HTML tags removed, entities left encoded, e.g. "&"), cut to 80 UTF-16 units; "" without a body.
excerptstring | null否Lists only. Up to 100 characters of the body's text, images and videos shown as [图片] / [视频]; null without a body.
preview_htmlstring否Document lists only. The first 3000 characters of content_html (may end inside a tag), for thumbnails.
comments_countinteger是
typestring是
statusdraft | active | archived | trashed是
recordable_typeForwardedEmail是
app_urlstring | null是
account_idstring (uuid)是
account_public_idstring是
project_idstring (uuid)是
project_public_idstring是
creator_idstring (uuid)是
parent_idstring (uuid) | null否
parent_public_idstring | null否
ancestorsFolderCrumb[]否
created_atstring (date-time)是
updated_atstring (date-time)是Last change of the recording or of its body, whichever is later.
reactionsReaction[]是
edited_byUserRef否Comments and discussions only: the last member other than the author who edited the title or body (the author's own later edits keep it); null when only the author edited it.
trashed_byUserRef否Comments and discussions only: the member other than the author who trashed it; null otherwise (cleared by the author's own trash and on restore). A comment with status "trashed" and a trashed_by is a placeholder in GET .../recordings/:id/comments — its title and content are empty.
sender_emailstring是
sender_namestring | null是
subjectstring | null是
received_atstring (date-time)是
filesAttachedFile[]是

FolderCrumb

字段类型必填说明
idstring (uuid)是
public_idstring | null是
titlestring是

Reaction

字段类型必填说明
idstring (uuid)是
actor_idstring (uuid)是
reactable_idstring (uuid)是
reactable_typestring是
reaction_type_idstring (uuid)是
reaction_emojistring是
reaction_namestring是
created_atstring (date-time)是
updated_atstring (date-time)是

UserRef

字段类型必填说明
idstring (uuid)是User UUID.
public_idstring | null是Member ref ("U12") in this account.
namestring | null是
avatar_urlstring | null是
kindhuman | agent | null是null only for an unknown (deleted) user.

AttachedFile

字段类型必填说明
idinteger否
filenamestring否
content_typestring | null否
byte_sizeinteger否
urlstring否
imageboolean否