Skip to main content
POST
/
connections
/
{connection_id}
/
test
Test a saved connection
curl --request POST \
  --url https://api.getdialed.ai/flows/connections/{connection_id}/test \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.getdialed.ai/flows/connections/{connection_id}/test"

headers = {"X-API-Key": "<api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.getdialed.ai/flows/connections/{connection_id}/test', 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.getdialed.ai/flows/connections/{connection_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_HTTPHEADER => [
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getdialed.ai/flows/connections/{connection_id}/test"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-API-Key", "<api-key>")

	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.getdialed.ai/flows/connections/{connection_id}/test")
  .header("X-API-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.getdialed.ai/flows/connections/{connection_id}/test")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "details": "Authenticated successfully; 3 lists visible",
  "latency_ms": 412,
  "success": true,
  "tested_at": "2026-07-09T18:00:00Z"
}
{
  "detail": "Authentication required"
}
{
  "detail": "Admin role required"
}
{
  "detail": "Connection not found"
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}
{
  "detail": "Rate limit exceeded: 100 per 1 minute"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

connection_id
string
required

Response

Successful Response

Result of a connection test (D-08, 5 fields locked).

Returned by both POST /connections/{conn_id}/test and POST /connections/test with HTTP 200 for ALL handler outcomes including timeouts (D-03). The UI always parses this exact shape regardless of failure mode.

error is one of 7 codes (D-09) when success=False, or None when success=True:

  • AUTH_FAILED, NETWORK, TIMEOUT, RATE_LIMITED, PERMISSION_DENIED, INVALID_CREDENTIALS_SHAPE, UNKNOWN

error is typed as str | None (not Literal[...]) per PATTERNS.md anti-pattern note: keeps schema evolution decoupled from handler logic.

latency_ms is HANDLER-measured (start of network round-trip to end of response parsing); excludes API/serialization overhead.

tested_at is set by the HANDLER at the start of the attempt, not by the router. (A4 binding in 38-RESEARCH.md.)

success
boolean
required
error
string | null
required
details
string
required
latency_ms
integer
required
tested_at
string<date-time>
required