Skip to main content

Reply to a message

This endpoint allows you to reply to a message retrieved from the Woodpecker inbox.

You can define the reply content, subject, recipients, and whether the original inbox message should be quoted below your reply. By default, the reply will be sent from the same mailbox that received the original message, but you can specify a different connected SMTP mailbox.

Woodpecker automatically includes standard email reply threading headers, so the reply is sent in the same conversation thread.

tip

Responding to a message automatically marks the received response as 'read' in the inbox

Request​

Endpoint​

POST https://api.woodpecker.co/rest/v2/inbox/messages/{id}/reply

Headers​

x-api-key: {YOUR_API_KEY}
Content-type: application/json

Parameters​

ParameterRequiredTypeDescription
idYesintegerPath parameter - ID of the prospect's response that will be replied to

For details on how to authenticate your requests, please see the authentication guide.

Body​

{
"mailbox_id": 123456,
"to": "recipient@gmail.com",
"cc": "cc1@gmail.com,cc2@gmail.com",
"bcc": "bcc1@gmail.com,bcc2@gmail.com",
"subject": "Re: Example subject",
"body": {
"html": "<p>Example response here</p>"
},
"quote_original_message": true,
"include_mailbox_signature": true
}

Set include_mailbox_signature to true to append the sending mailbox's configured signature below your reply. The signature can be included independently of quote_original_message; when both are enabled, the quoted original message appears below the signature.

Body schema​

FieldRequiredTypeDescription
mailbox_idNointegerDefaults to the mailbox that received the original message. When specified, identifies the SMTP ID of a mailbox used to send the reply. Use /mailboxes endpoint to fetch mailbox details
toNostringBy default, the reply will be sent to the original author of the message. If provided, this field specifies the recipient's email addresses
ccNostringComma-separated list of email addresses to include in CC
bccNostringComma-separated list of email addresses to include in BCC. If not provided, the BCC addresses configured in the mailbox settings (if any) will be used
subjectNostringSubject of the reply message. If not provided, the subject of the original message will be used, prefixed with Re: if not already present
bodyYesobjectObject containing the message content
└─ htmlYesstringContent of the response email in HTML format
quote_original_messageNobooleanWhen true, includes the original inbox message as a quotation in the sent email. Default: false
include_mailbox_signatureNobooleanWhen true, appends the sending mailbox's signature if configured in Woodpecker account settings. Default: false; when omitted or false, no signature is appended

Request samples​

Reply to a message​

The examples send a reply with the mailbox signature and the original message quoted below it. They use reply ID 123456 from the inbox response example.

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/inbox/messages/123456/reply" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"body": {
"html": "<p>Example response here</p>"
},
"quote_original_message": true,
"include_mailbox_signature": true
}'

Response​

Response examples​

Message passed to SMTP for delivery.

Status: 200
Body: none