API reference / Messages

Reply to a message

Reply to an email only when authorized. Preserve idempotencyKey and contents on retries.

POST/v1/inboxes/{inboxId}/messages/{messageId}/reply

Requires an API key with the messages:send scope. MCP tool: reply. CLI: goshenemail messages reply.

Request

Path parameters

NameTypeRequiredNotes
inboxIdstring (email)Yesup to 254 characters
messageIdstringYes1–998 characters

Body

FieldTypeRequiredNotes
attachmentsobject[]up to 10 items
filenamestringYes1–200 characters
contentTypestringYesup to 100 characters
contentstringYesup to 2,796,204 characters
labelsstring[]up to 50 items
textstringup to 2,000,000 characters
htmlstringup to 2,000,000 characters
replyAllbooleandefault false
tostring (email)[]at least 1 item, up to 50 items
ccstring (email)[]up to 50 items
bccstring (email)[]up to 50 items
idempotencyKeystringYes1–200 characters

Response

FieldTypeNotes
messageIdstring
threadIdstring
deduplicatedboolean

Errors return { "error": { "code", "message", "transient" } } with a 4xx or 5xx status. See Errors.

Examples

curl

curl "https://api.goshenemail.com/v1/inboxes/research%40agents.goshenemail.com/messages/%3C20260920.12345%40agents.goshenemail.com%3E/reply" \
  -H "Authorization: Bearer $GOSHENEMAIL_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, could you send the current quote?",
    "idempotencyKey": "2f7c1c1e-6d1a-4a3b-9b0e-0c9b3f5c8a11"
  }'

CLI

goshenemail messages reply --inbox-id "research@agents.goshenemail.com" --message-id "<20260920.12345@agents.goshenemail.com>" --text "Hello, could you send the current quote?" --idempotency-key "2f7c1c1e-6d1a-4a3b-9b0e-0c9b3f5c8a11"