Forward an inbound message
Sends Fwd: <subject> to to with a Gmail-style
"---------- Forwarded message ---------" block containing the message.
Starts a new thread (no In-Reply-To / References). Attachments of
the original are listed but not re-attached. Billed like POST /v1/send.
curl -X POST "https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011/forward" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"to": "user@example.com",
"body_html": "example_string",
"body_text": "example_string",
"subject": "example_string",
"ip_id": "example_string",
"headers": {},
"scheduled_at": "2024-12-25T10:00:00Z"
}'
import requests
import json
url = "https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011/forward"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"to": "user@example.com",
"body_html": "example_string",
"body_text": "example_string",
"subject": "example_string",
"ip_id": "example_string",
"headers": {},
"scheduled_at": "2024-12-25T10:00:00Z"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011/forward", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"to": "user@example.com",
"body_html": "example_string",
"body_text": "example_string",
"subject": "example_string",
"ip_id": "example_string",
"headers": {},
"scheduled_at": "2024-12-25T10:00:00Z"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"to": "user@example.com",
"body_html": "example_string",
"body_text": "example_string",
"subject": "example_string",
"ip_id": "example_string",
"headers": {},
"scheduled_at": "2024-12-25T10:00:00Z"
}`)
req, err := http.NewRequest("POST", "https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011/forward", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011/forward')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"to": "user@example.com",
"body_html": "example_string",
"body_text": "example_string",
"subject": "example_string",
"ip_id": "example_string",
"headers": {},
"scheduled_at": "2024-12-25T10:00:00Z"
}'
response = http.request(request)
puts response.body
{
"id": "example_string",
"status": "queued",
"message_id": "example_string",
"subject": "example_string",
"to": "example_string",
"scheduled_at": "2024-12-25T10:00:00Z"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
POST
/v1/inbox/messages/{id}/forwardPOST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: X-API-Key)
X-API-Keystring
RequiredAPI key in the format sk_live_<64 hex characters>
API key in the format
sk_live_<64 hex characters>path
idstring
RequiredMongoDB ObjectID
Content-Typestring
RequiredThe media type of the request body
Options: application/json
tostring
RequiredFormat: email
body_htmlstring
Optional note placed above the forwarded block
subjectstring
Override the generated Fwd: subject
scheduled_atstring
Format: date-time
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-API-Keystring
RequiredAPI Key for authentication. API key in the format sk_live_\<64 hex characters\>
Path Parameters
Body
application/json
body_htmlstring
Optional note placed above the forwarded block
subjectstring
Override the generated Fwd: subject
Responses
Was this page helpful?