Cancel dfy email accounts
curl --request POST \
--url https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
"test@test.com"
]
}
'import requests
url = "https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel"
payload = { "accounts": ["test@test.com"] }
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({accounts: ['test@test.com']})
};
fetch('https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n \"test@test.com\"\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel",
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([
'accounts' => [
'test@test.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/dfy-email-account-orders/accounts/cancel"
payload := strings.NewReader("{\n \"accounts\": [\n \"test@test.com\"\n ]\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))
}{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"domain": "example.com",
"email": "user@example.com",
"email_provider": 1,
"first_name": "John",
"last_name": "Doe",
"is_pre_warmed_up": true,
"timestamp_cancelled": "2025-01-01T00:00:00.000Z",
"timestamp_created": "2025-01-01T00:00:00.000Z"
}
]
}{
"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": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}DFY Email Account Order
Cancel dfy email accounts
This endpoint will cancel the DFY email accounts based on the provided email addresses. Cancelling permanently deletes all Unibox emails and conversations associated with the cancelled accounts. This cannot be undone.
Requires one of the following scopes: dfy_email_account_orders:delete, dfy_email_account_orders:all, all:delete, all:all
POST
/
api
/
v2
/
dfy-email-account-orders
/
accounts
/
cancel
Cancel dfy email accounts
curl --request POST \
--url https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
"test@test.com"
]
}
'import requests
url = "https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel"
payload = { "accounts": ["test@test.com"] }
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({accounts: ['test@test.com']})
};
fetch('https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n \"test@test.com\"\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/dfy-email-account-orders/accounts/cancel",
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([
'accounts' => [
'test@test.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/dfy-email-account-orders/accounts/cancel"
payload := strings.NewReader("{\n \"accounts\": [\n \"test@test.com\"\n ]\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))
}{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"domain": "example.com",
"email": "user@example.com",
"email_provider": 1,
"first_name": "John",
"last_name": "Doe",
"is_pre_warmed_up": true,
"timestamp_cancelled": "2025-01-01T00:00:00.000Z",
"timestamp_created": "2025-01-01T00:00:00.000Z"
}
]
}{
"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": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
List of emails to cancel the DFY email accounts for.
Minimum array length:
1Response
Default Response
The list of cancelled email accounts.
Show child attributes
Show child attributes
⌘I