JavaScript
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.endpoints.test('id');
console.log(response.message);curl --request POST \
--url https://inbound.new/api/e2/endpoints/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"overrideUrl": "<string>"
}
'import requests
url = "https://inbound.new/api/e2/endpoints/{id}/test"
payload = { "overrideUrl": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inbound.new/api/e2/endpoints/{id}/test",
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([
'overrideUrl' => '<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://inbound.new/api/e2/endpoints/{id}/test"
payload := strings.NewReader("{\n \"overrideUrl\": \"<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://inbound.new/api/e2/endpoints/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"overrideUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inbound.new/api/e2/endpoints/{id}/test")
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 \"overrideUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"responseTime": 123,
"statusCode": 123,
"responseBody": "<string>",
"error": "<string>",
"testPayload": "<unknown>",
"webhookFormat": "inbound",
"urlTested": "<string>"
}{
"error": "<string>",
"validFormats": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}Endpoints
Test endpoint
Test an endpoint by sending a test payload. For webhooks, supports inbound, discord, and slack formats. For email endpoints, simulates the forwarding process.
POST
/
api
/
e2
/
endpoints
/
{id}
/
test
JavaScript
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.endpoints.test('id');
console.log(response.message);curl --request POST \
--url https://inbound.new/api/e2/endpoints/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"overrideUrl": "<string>"
}
'import requests
url = "https://inbound.new/api/e2/endpoints/{id}/test"
payload = { "overrideUrl": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inbound.new/api/e2/endpoints/{id}/test",
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([
'overrideUrl' => '<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://inbound.new/api/e2/endpoints/{id}/test"
payload := strings.NewReader("{\n \"overrideUrl\": \"<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://inbound.new/api/e2/endpoints/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"overrideUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inbound.new/api/e2/endpoints/{id}/test")
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 \"overrideUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"responseTime": 123,
"statusCode": 123,
"responseBody": "<string>",
"error": "<string>",
"testPayload": "<unknown>",
"webhookFormat": "inbound",
"urlTested": "<string>"
}{
"error": "<string>",
"validFormats": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}Authorizations
Your Inbound API key. Include it in the Authorization header as: Bearer
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Was this page helpful?
⌘I