پرش به مستندات
API

پیش‌نویس‌ها

هر عملیات در این گروه: آنچه می‌پذیرد، آنچه برمی‌گرداند و خطاهایی که ممکن است با آن‌ها پاسخ دهد.

عملیات‌ها

GET/drafts

List drafts

محدوده‌های دسترسیdrafts:readمی‌خواند

Requires the drafts:read scope.

پارامترهای کوئری

querystring

The same search syntax as GET /threads, read against each draft's subject, sender and the first 4,000 characters of its body. Plain words match loosely and a quoted phrase has to appear as written, filler words are dropped when something else is left to search for, and a value the search cannot use is ignored rather than narrowing. Recipients are not searched, so to:, cc: and bcc: match nothing here. The drafts folder always applies, so in: and folder is: operators cannot widen the search beyond drafts, in:anywhere included. A draft saved with no subject is stored as (no subject), so subject:"no subject" finds it.

limitinteger

Drafts per page, a whole number from 1 to 100. Defaults to 25.

دست‌کم 1حداکثر 100
pageTokenstring

Opaque. Pass back what you were given, never construct one.

خروجی

200

A page of drafts.

خطاها

خطاهایی که هر عملیاتی ممکن است برگرداند400401403404422500فهرست خطاها

همچنین در دسترس در

SDK
drafts.list()drafts.listAll()drafts.iterate()
CLI
openemail drafts list
MCP
listDrafts

GET/drafts/{id}

Retrieve a draft

محدوده‌های دسترسیdrafts:readمی‌خواند

Requires the drafts:read scope.

پارامترهای مسیر

idstringالزامی

Draft id, which starts with draft-.

خروجی

200

The draft.

خطاها

خطاهایی که هر عملیاتی ممکن است برگرداند400401403404422500فهرست خطاها

همچنین در دسترس در

SDK
drafts.get()
CLI
openemail drafts get
MCP
getDraft

PATCH/drafts/{id}

Update a draft

محدوده‌های دسترسیdrafts:writeداده‌ها را تغییر می‌دهد

A partial update, not an upsert. An unknown id, or the id of a thread that is not a draft, is a 404. The draft keeps the id you passed, and the response echoes it.

Requires the drafts:write scope.

پارامترهای مسیر

idstringالزامی

Draft id, which starts with draft-.

خروجی

200

Saved.

خطاها

خطاهایی که هر عملیاتی ممکن است برگرداند400401403404422500فهرست خطاها

همچنین در دسترس در

SDK
drafts.update()
CLI
openemail drafts update
MCP
createDraftupdateDraft

DELETE/drafts/{id}

Delete a draft

محدوده‌های دسترسیdrafts:writeحذف می‌کند

Requires the drafts:write scope.

پارامترهای مسیر

idstringالزامی

Draft id, which starts with draft-.

خروجی

200

Deleted.

خطاها

خطاهایی که هر عملیاتی ممکن است برگرداند400401403404422500فهرست خطاها

همچنین در دسترس در

SDK
drafts.delete()
CLI
openemail drafts delete
MCP
deleteDraft