Optimaite

Email Outbound

3 min readUpdated May 27, 2026Auch auf Deutsch verfuegbar

The Email Outbound API lets you send emails from Optimaite, manage drafts, and generate pre-filled reply/forward envelopes.

Endpoints

MethodPathDescription
POST/api/v1/email/outbound/draftsCreate an email draft
GET/api/v1/email/outbound/draftsList drafts for current user
GET/api/v1/email/outbound/drafts/{id}Get a draft by ID
PUT/api/v1/email/outbound/drafts/{id}Update a draft (autosave)
DELETE/api/v1/email/outbound/drafts/{id}Delete a draft
POST/api/v1/email/outbound/drafts/{id}/sendSend an existing draft
POST/api/v1/email/outbound/sendSend email directly (no draft)
POST/api/v1/email/outbound/reply-envelopeGet pre-filled reply envelope
POST/api/v1/email/outbound/forward-envelopeGet pre-filled forward envelope
GET/api/v1/email/outbound/signatureGet default email signature

Required scope: inbox:write for sending and draft management.

The Draft Object

{
  "id": "draft_01ABCDEFG",
  "to": ["client@example.com"],
  "cc": [],
  "bcc": [],
  "subject": "Re: Contract Review",
  "body_html": "<p>Dear Mr. Smith,</p><p>...</p>",
  "attachments": [
    {
      "document_id": "doc_01ABCDEF",
      "filename": "contract_v2.pdf"
    }
  ],
  "case_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "draft",
  "created_at": "2026-05-20T14:00:00Z",
  "updated_at": "2026-05-20T14:05:00Z"
}

Create a Draft

POST /api/v1/email/outbound/drafts
{
  "to": ["client@example.com"],
  "subject": "Re: Contract Review",
  "body_html": "<p>Dear Mr. Smith,</p><p>Please find the updated contract attached.</p>",
  "case_id": "550e8400-e29b-41d4-a716-446655440000",
  "attachments": ["doc_01ABCDEF"]
}

Send Directly

POST /api/v1/email/outbound/send

Send an email without creating a draft first:

{
  "to": ["opposing.counsel@lawfirm.de"],
  "cc": ["partner@optimaite.eu"],
  "subject": "Response to Your Letter dated May 15",
  "body_html": "<p>Dear Colleague,</p><p>...</p>",
  "case_id": "550e8400-...",
  "attachments": ["doc_01ABCDEF"]
}

Response

Returns 200 OK with the sent correspondence record:

{
  "id": "corr_01ABCDEFG",
  "direction": "outbound",
  "status": "sent",
  "sent_at": "2026-05-20T14:10:00Z"
}

Reply / Forward Envelopes

Get a pre-filled draft envelope based on an existing correspondence item:

POST /api/v1/email/outbound/reply-envelope
{
  "correspondence_id": "corr_01INBOUND",
  "reply_all": false
}

Returns a draft object with to, subject (with "Re:"), body_html (quoted original), and case context pre-filled.

Signature

GET /api/v1/email/outbound/signature

Returns the current user's configured email signature for use in drafts.

Error Responses

StatusCodeMeaning
400VALIDATION_ERRORMissing required fields (to, subject)
403AUTH_INSUFFICIENT_SCOPEMissing inbox:write scope
404DRAFT_NOT_FOUNDDraft ID does not exist
413ATTACHMENT_TOO_LARGETotal attachment size exceeded

Next Steps

Was this helpful?