## Create a draft email `client.Email.Draft(ctx, body) (*EmailDraftResponse, error)` **post** `/v1/emails/draft` Creates a draft in the connected email account that owns the `from` address. Mirrors native email-client behavior: only `from` is required — `to`, `cc`, `bcc`, `subject`, `messageBody`, and `attachments` are all optional. At least one of those optional fields must be populated; sending only `from` returns a 400. Supports idempotency via the `Idempotency-Key` header. **[Required scope](/using-the-api/scopes/):** `emails:create` **[Rate limit category](/using-the-api/rate-limits/):** Write ### Parameters - `body EmailDraftParams` - `From param.Field[string]` Bare email address (no display name). Must match a connected email account owned by the API key user. Compared case-insensitively. Mailbox where the draft is created. - `Attachments param.Field[[]string]` Optional list of file IDs (uploaded via the Files API) to attach to the draft. Maximum 5 attachments per draft, each ≤ 3MB. - `Bcc param.Field[[]string]` Bcc recipients (same shape as `to`). - `Cc param.Field[[]string]` Cc recipients (same shape as `to`). - `MessageBody param.Field[EmailDraftParamsMessageBody]` Email message body (HTML or plain text). - `Content string` Email body content. - `ContentType string` Defaults to `HTML`. - `const EmailDraftParamsMessageBodyContentTypeHTML EmailDraftParamsMessageBodyContentType = "HTML"` - `const EmailDraftParamsMessageBodyContentTypeText EmailDraftParamsMessageBodyContentType = "TEXT"` - `Subject param.Field[string]` Email subject. - `To param.Field[[]string]` Recipient email addresses (bare, no display names). Up to 500. ### Returns - `type EmailDraftResponse struct{…}` - `DraftedAt string` ISO 8601 timestamp of when the draft was created. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) emailDraftResponse, err := client.Email.Draft(context.TODO(), githubcomlightfldlightfieldgo.EmailDraftParams{ From: "sales@acme.com", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", emailDraftResponse.DraftedAt) } ``` #### Response ```json { "draftedAt": "draftedAt" } ```