Forward an email
curl --request POST \
--url https://api.emailr.dev/v1/emails/forward \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "[email protected]",
"message": "<string>"
}
'import requests
url = "https://api.emailr.dev/v1/emails/forward"
payload = {
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "[email protected]",
"message": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to: '[email protected]',
message: '<string>'
})
};
fetch('https://api.emailr.dev/v1/emails/forward', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.emailr.dev/v1/emails/forward",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to' => '[email protected]',
'message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emailr.dev/v1/emails/forward"
payload := strings.NewReader("{\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"[email protected]\",\n \"message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.emailr.dev/v1/emails/forward")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"[email protected]\",\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.emailr.dev/v1/emails/forward")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"[email protected]\",\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "123e4567-e89b-12d3-a456-426614174000",
"recipients": 1,
"scheduled_at": "2024-01-15T10:30:00Z",
"status": "sent"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}emails
Forward an email
Forward a received email to other recipients
POST
/
v1
/
emails
/
forward
Forward an email
curl --request POST \
--url https://api.emailr.dev/v1/emails/forward \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "[email protected]",
"message": "<string>"
}
'import requests
url = "https://api.emailr.dev/v1/emails/forward"
payload = {
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": "[email protected]",
"message": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to: '[email protected]',
message: '<string>'
})
};
fetch('https://api.emailr.dev/v1/emails/forward', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.emailr.dev/v1/emails/forward",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to' => '[email protected]',
'message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emailr.dev/v1/emails/forward"
payload := strings.NewReader("{\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"[email protected]\",\n \"message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.emailr.dev/v1/emails/forward")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"[email protected]\",\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.emailr.dev/v1/emails/forward")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": \"[email protected]\",\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "123e4567-e89b-12d3-a456-426614174000",
"recipients": 1,
"scheduled_at": "2024-01-15T10:30:00Z",
"status": "sent"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}Authorizations
API key authentication. Use your API key as the bearer token.
Body
application/json
Response
Email forwarded successfully
Example:
true
Example:
"123e4567-e89b-12d3-a456-426614174000"
Example:
1
Present when email is scheduled
Example:
"2024-01-15T10:30:00Z"
Email status: 'sent' for immediate emails, 'scheduled' for scheduled emails
Example:
"sent"
⌘I