Set domain forwarding
curl --request PUT \
--url https://api.instantly.ai/api/v2/domains/{domain}/forwarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"forwarding_domain": "mycompany.com"
}
'import requests
url = "https://api.instantly.ai/api/v2/domains/{domain}/forwarding"
payload = { "forwarding_domain": "mycompany.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({forwarding_domain: 'mycompany.com'})
};
fetch('https://api.instantly.ai/api/v2/domains/{domain}/forwarding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://api.instantly.ai/api/v2/domains/{domain}/forwarding")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"forwarding_domain\": \"mycompany.com\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/domains/{domain}/forwarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'forwarding_domain' => 'mycompany.com'
]),
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.instantly.ai/api/v2/domains/{domain}/forwarding"
payload := strings.NewReader("{\n \"forwarding_domain\": \"mycompany.com\"\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"domain": "example.com",
"forwarding_domain": "mycompany.com",
"forwarding_mode": "redirect"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "body must have required property 'name'",
"code": "FST_ERR_VALIDATION"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 409,
"error": "Conflict",
"message": "The resource already exists"
}{
"statusCode": 422,
"error": "Unprocessable Entity",
"message": "The request cannot be processed"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}{
"statusCode": 502,
"error": "Bad Gateway",
"message": "Failed to update forwarding for the domain. Please try again."
}Domain Forwarding
Set domain forwarding
Sets web forwarding on a domain ordered through Instantly. The forwarding domain must be a valid domain different from the domain itself. Returns a conflict error while the domain order is still being provisioned, and an unprocessable entity error when the requested forwarding configuration is not supported for the domain. This request has a rate limit of 10 requests per minute, or 60 requests per hour.
Requires one of the following scopes: dfy_email_account_orders:update, dfy_email_account_orders:all, all:update, all:all
PUT
/
api
/
v2
/
domains
/
{domain}
/
forwarding
Set domain forwarding
curl --request PUT \
--url https://api.instantly.ai/api/v2/domains/{domain}/forwarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"forwarding_domain": "mycompany.com"
}
'import requests
url = "https://api.instantly.ai/api/v2/domains/{domain}/forwarding"
payload = { "forwarding_domain": "mycompany.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({forwarding_domain: 'mycompany.com'})
};
fetch('https://api.instantly.ai/api/v2/domains/{domain}/forwarding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://api.instantly.ai/api/v2/domains/{domain}/forwarding")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"forwarding_domain\": \"mycompany.com\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/domains/{domain}/forwarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'forwarding_domain' => 'mycompany.com'
]),
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.instantly.ai/api/v2/domains/{domain}/forwarding"
payload := strings.NewReader("{\n \"forwarding_domain\": \"mycompany.com\"\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"domain": "example.com",
"forwarding_domain": "mycompany.com",
"forwarding_mode": "redirect"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "body must have required property 'name'",
"code": "FST_ERR_VALIDATION"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 409,
"error": "Conflict",
"message": "The resource already exists"
}{
"statusCode": 422,
"error": "Unprocessable Entity",
"message": "The request cannot be processed"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}{
"statusCode": 502,
"error": "Bad Gateway",
"message": "Failed to update forwarding for the domain. Please try again."
}Authorizations
Path Parameters
Body
application/json
Response
The requested Domain Forwarding
Web forwarding configuration for a domain ordered through Instantly