Ir a la documentación
API

Borradores

Cada operación de este grupo: lo que acepta, lo que devuelve y los errores con los que puede responder.

Operaciones

GET/drafts

List drafts

Alcancesdrafts:readLee

Requires the drafts:read scope.

Parámetros de consulta

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.

Al menos 1Como máximo 100
pageTokenstring

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

Devuelve

200

A page of drafts.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

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

GET/drafts/{id}

Retrieve a draft

Alcancesdrafts:readLee

Requires the drafts:read scope.

Parámetros de ruta

idstringObligatorio

Draft id, which starts with draft-.

Devuelve

200

The draft.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

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

PATCH/drafts/{id}

Update a draft

Alcancesdrafts:writeCambia datos

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.

Parámetros de ruta

idstringObligatorio

Draft id, which starts with draft-.

Devuelve

200

Saved.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

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

DELETE/drafts/{id}

Delete a draft

Alcancesdrafts:writeElimina

Requires the drafts:write scope.

Parámetros de ruta

idstringObligatorio

Draft id, which starts with draft-.

Devuelve

200

Deleted.

Errores

Los errores que puede devolver cualquier operación400401403404422500Catálogo de errores

También disponible en

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