Test SMTP connectivity
curl --request POST \
--url https://api.reply.io/v3/email-accounts/test/smtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "smtp.company.com",
"port": 465,
"enableSsl": true,
"userName": "user@company.com",
"password": "secret123"
}
'import requests
url = "https://api.reply.io/v3/email-accounts/test/smtp"
payload = {
"host": "smtp.company.com",
"port": 465,
"enableSsl": True,
"userName": "user@company.com",
"password": "secret123"
}
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({
host: 'smtp.company.com',
port: 465,
enableSsl: true,
userName: 'user@company.com',
password: 'secret123'
})
};
fetch('https://api.reply.io/v3/email-accounts/test/smtp', 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.reply.io/v3/email-accounts/test/smtp",
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([
'host' => 'smtp.company.com',
'port' => 465,
'enableSsl' => true,
'userName' => 'user@company.com',
'password' => 'secret123'
]),
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.reply.io/v3/email-accounts/test/smtp"
payload := strings.NewReader("{\n \"host\": \"smtp.company.com\",\n \"port\": 465,\n \"enableSsl\": true,\n \"userName\": \"user@company.com\",\n \"password\": \"secret123\"\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.reply.io/v3/email-accounts/test/smtp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"smtp.company.com\",\n \"port\": 465,\n \"enableSsl\": true,\n \"userName\": \"user@company.com\",\n \"password\": \"secret123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/email-accounts/test/smtp")
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 \"host\": \"smtp.company.com\",\n \"port\": 465,\n \"enableSsl\": true,\n \"userName\": \"user@company.com\",\n \"password\": \"secret123\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": null
}
Email Accounts
Test SMTP connectivity
Requires the
channels:operate scope (or a broader one that includes it).
Check SMTP sending credentials before you commit. Nothing is created or changed, and a failed test still returns 200.
POST
/
v3
/
email-accounts
/
test
/
smtp
Test SMTP connectivity
curl --request POST \
--url https://api.reply.io/v3/email-accounts/test/smtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "smtp.company.com",
"port": 465,
"enableSsl": true,
"userName": "user@company.com",
"password": "secret123"
}
'import requests
url = "https://api.reply.io/v3/email-accounts/test/smtp"
payload = {
"host": "smtp.company.com",
"port": 465,
"enableSsl": True,
"userName": "user@company.com",
"password": "secret123"
}
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({
host: 'smtp.company.com',
port: 465,
enableSsl: true,
userName: 'user@company.com',
password: 'secret123'
})
};
fetch('https://api.reply.io/v3/email-accounts/test/smtp', 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.reply.io/v3/email-accounts/test/smtp",
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([
'host' => 'smtp.company.com',
'port' => 465,
'enableSsl' => true,
'userName' => 'user@company.com',
'password' => 'secret123'
]),
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.reply.io/v3/email-accounts/test/smtp"
payload := strings.NewReader("{\n \"host\": \"smtp.company.com\",\n \"port\": 465,\n \"enableSsl\": true,\n \"userName\": \"user@company.com\",\n \"password\": \"secret123\"\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.reply.io/v3/email-accounts/test/smtp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"smtp.company.com\",\n \"port\": 465,\n \"enableSsl\": true,\n \"userName\": \"user@company.com\",\n \"password\": \"secret123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/email-accounts/test/smtp")
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 \"host\": \"smtp.company.com\",\n \"port\": 465,\n \"enableSsl\": true,\n \"userName\": \"user@company.com\",\n \"password\": \"secret123\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": null
}
Authorizations
Authenticate every request with a Bearer token. Pass your Reply API key in the
Authorization header:
Authorization: Bearer <your-api-key>
Get your API key from the Reply dashboard: Settings → API Key.
Body
application/json
Request body for testing SMTP or IMAP connectivity.
Hostname or IP address of the mail server
Port number of the mail server
Required range:
1 <= x <= 65535Username for authentication
Password for authentication
Whether to use SSL/TLS for the connection