curl --location --request POST "https://api.trestleiq.com/1.0/phone_feedback" \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}'
const response = await fetch("https://api.trestleiq.com/1.0/phone_feedback", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
}),
});
const data = await response.json();
import axios from "axios";
const { data } = await axios.post(
"https://api.trestleiq.com/1.0/phone_feedback",
{
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
},
{
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
console.log(data);
import requests
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
}
payload = {
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": True,
}
response = requests.post(
"https://api.trestleiq.com/1.0/phone_feedback",
json=payload,
headers=headers,
timeout=30,
)
data = response.json()
print(data)
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var payload = new
{
response_id = "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone = "2069735100",
name = "Waidong Syrws",
phone_status = "Connected",
phone_right_party_contact = true
};
var response = await client.PostAsJsonAsync("https://api.trestleiq.com/1.0/phone_feedback", payload);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
jsonBody := []byte(`{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}`)
req, _ := http.NewRequest("POST", "https://api.trestleiq.com/1.0/phone_feedback", bytes.NewBuffer(jsonBody))
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
}
<?php
$payload = [
"response_id" => "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone" => "2069735100",
"name" => "Waidong Syrws",
"phone_status" => "Connected",
"phone_right_party_contact" => true
];
$curl = curl_init("https://api.trestleiq.com/1.0/phone_feedback");
curl_setopt($curl, CURLOPT_HTTPHEADER, [
"x-api-key: YOUR_API_KEY",
"Content-Type: application/json"
]);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class PhoneFeedbackExample {
public static void main(String[] args) throws Exception {
String body =
"""
{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}
""";
HttpRequest request =
HttpRequest.newBuilder()
.uri(URI.create("https://api.trestleiq.com/1.0/phone_feedback"))
.header("x-api-key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
{
"status": "success",
"error": {
"name": "InternalError",
"message": "Could not retrieve entire response"
}
}
curl --location --request POST "https://api.trestleiq.com/1.0/phone_feedback" \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}'
const response = await fetch("https://api.trestleiq.com/1.0/phone_feedback", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
}),
});
const data = await response.json();
import axios from "axios";
const { data } = await axios.post(
"https://api.trestleiq.com/1.0/phone_feedback",
{
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
},
{
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
console.log(data);
import requests
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
}
payload = {
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": True,
}
response = requests.post(
"https://api.trestleiq.com/1.0/phone_feedback",
json=payload,
headers=headers,
timeout=30,
)
data = response.json()
print(data)
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var payload = new
{
response_id = "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone = "2069735100",
name = "Waidong Syrws",
phone_status = "Connected",
phone_right_party_contact = true
};
var response = await client.PostAsJsonAsync("https://api.trestleiq.com/1.0/phone_feedback", payload);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
jsonBody := []byte(`{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}`)
req, _ := http.NewRequest("POST", "https://api.trestleiq.com/1.0/phone_feedback", bytes.NewBuffer(jsonBody))
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
}
<?php
$payload = [
"response_id" => "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone" => "2069735100",
"name" => "Waidong Syrws",
"phone_status" => "Connected",
"phone_right_party_contact" => true
];
$curl = curl_init("https://api.trestleiq.com/1.0/phone_feedback");
curl_setopt($curl, CURLOPT_HTTPHEADER, [
"x-api-key: YOUR_API_KEY",
"Content-Type: application/json"
]);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class PhoneFeedbackExample {
public static void main(String[] args) throws Exception {
String body =
"""
{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}
""";
HttpRequest request =
HttpRequest.newBuilder()
.uri(URI.create("https://api.trestleiq.com/1.0/phone_feedback"))
.header("x-api-key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
{
"status": "success",
"error": {
"name": "InternalError",
"message": "Could not retrieve entire response"
}
}
Phone Feedback API
Phone Feedback API
Phone Feedback API offers a method of providing feedback to Trestle about dialed numbers for their connected/disconnected status and confirmation of right party contact.
curl --location --request POST "https://api.trestleiq.com/1.0/phone_feedback" \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}'
const response = await fetch("https://api.trestleiq.com/1.0/phone_feedback", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
}),
});
const data = await response.json();
import axios from "axios";
const { data } = await axios.post(
"https://api.trestleiq.com/1.0/phone_feedback",
{
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
},
{
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
console.log(data);
import requests
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
}
payload = {
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": True,
}
response = requests.post(
"https://api.trestleiq.com/1.0/phone_feedback",
json=payload,
headers=headers,
timeout=30,
)
data = response.json()
print(data)
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var payload = new
{
response_id = "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone = "2069735100",
name = "Waidong Syrws",
phone_status = "Connected",
phone_right_party_contact = true
};
var response = await client.PostAsJsonAsync("https://api.trestleiq.com/1.0/phone_feedback", payload);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
jsonBody := []byte(`{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}`)
req, _ := http.NewRequest("POST", "https://api.trestleiq.com/1.0/phone_feedback", bytes.NewBuffer(jsonBody))
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
}
<?php
$payload = [
"response_id" => "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone" => "2069735100",
"name" => "Waidong Syrws",
"phone_status" => "Connected",
"phone_right_party_contact" => true
];
$curl = curl_init("https://api.trestleiq.com/1.0/phone_feedback");
curl_setopt($curl, CURLOPT_HTTPHEADER, [
"x-api-key: YOUR_API_KEY",
"Content-Type: application/json"
]);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class PhoneFeedbackExample {
public static void main(String[] args) throws Exception {
String body =
"""
{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}
""";
HttpRequest request =
HttpRequest.newBuilder()
.uri(URI.create("https://api.trestleiq.com/1.0/phone_feedback"))
.header("x-api-key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
{
"status": "success",
"error": {
"name": "InternalError",
"message": "Could not retrieve entire response"
}
}
curl --location --request POST "https://api.trestleiq.com/1.0/phone_feedback" \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}'
const response = await fetch("https://api.trestleiq.com/1.0/phone_feedback", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
}),
});
const data = await response.json();
import axios from "axios";
const { data } = await axios.post(
"https://api.trestleiq.com/1.0/phone_feedback",
{
response_id: "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone: "2069735100",
name: "Waidong Syrws",
phone_status: "Connected",
phone_right_party_contact: true,
},
{
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
console.log(data);
import requests
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
}
payload = {
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": True,
}
response = requests.post(
"https://api.trestleiq.com/1.0/phone_feedback",
json=payload,
headers=headers,
timeout=30,
)
data = response.json()
print(data)
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var payload = new
{
response_id = "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
phone = "2069735100",
name = "Waidong Syrws",
phone_status = "Connected",
phone_right_party_contact = true
};
var response = await client.PostAsJsonAsync("https://api.trestleiq.com/1.0/phone_feedback", payload);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
jsonBody := []byte(`{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}`)
req, _ := http.NewRequest("POST", "https://api.trestleiq.com/1.0/phone_feedback", bytes.NewBuffer(jsonBody))
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
}
<?php
$payload = [
"response_id" => "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone" => "2069735100",
"name" => "Waidong Syrws",
"phone_status" => "Connected",
"phone_right_party_contact" => true
];
$curl = curl_init("https://api.trestleiq.com/1.0/phone_feedback");
curl_setopt($curl, CURLOPT_HTTPHEADER, [
"x-api-key: YOUR_API_KEY",
"Content-Type: application/json"
]);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class PhoneFeedbackExample {
public static void main(String[] args) throws Exception {
String body =
"""
{
"response_id": "T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386f",
"phone": "2069735100",
"name": "Waidong Syrws",
"phone_status": "Connected",
"phone_right_party_contact": true
}
""";
HttpRequest request =
HttpRequest.newBuilder()
.uri(URI.create("https://api.trestleiq.com/1.0/phone_feedback"))
.header("x-api-key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
{
"status": "success",
"error": {
"name": "InternalError",
"message": "Could not retrieve entire response"
}
}
Phone Feedback 1.0
Phone Feedback API allows you to submit phone feedback, including phone status and whether the phone number belongs to the right party based on a live call.Headers
string
required
Your API key for authentication. Example:
{{ apiKey }}Request Body
string
required
The response ID returned from a prior Trestle API call. Example:
T_b5d031b8-e8a3-4eef-8fa8-d87d3b7e386fstring
required
The phone number in E.164 or local format. The default country calling code is
+1 (USA). Example:
2069735100string
Person or business name associated with the phone number. Example:
Waidong Syrwsstring
required
Live-call status for the phone number. Possible values:
Connected or
Disconnected. Example: Connected Enum: Connected Disconnectedboolean
required
Indicates if the call confirmed the number belongs to the right party.
Example:
trueResponse
string
Indicates whether the feedback was received successfully. Example:
successobject(PartialError)
Error Responses
400 Bad Request
The server cannot process the request due to client-side errors.Check for: Syntax errors in the request script, malformed JSON, or invalid parameters.403 Forbidden
The request is understood, but the server is refusing to fulfill it. Error responses include anerrorCode field identifying the cause:-
Invalid API Key (
INVALID_API_KEY): The key is incorrect, deactivated, or missing from the request. Check for: Trailing spaces, syntax errors, incorrect character counts, or a missingx-api-keyheader. -
API Key Disabled (Portal Issue) (
FORBIDDEN): The key is inactive. Check for: Insufficient funds in your self-serve wallet or if a Trestle Admin manually deactivated your API key. -
API Key does not have Product Access (Portal Issue) (
FORBIDDEN): The API key is active, but it is not enabled for this product or API version. Check for: Incorrect endpoint, incorrect API version, or missing product access on the key. -
API Key Expired (
FORBIDDEN): The key has reached its end-of-life (primarily affects Trial users).
429 Too Many Requests
You have sent too many requests in a given amount of time.-
Rate Limit Exceeded (
RATE_LIMIT_EXCEEDED): You have surpassed the queries-per-second (QPS) threshold for your tier. -
Quota Exceeded (Portal Issue) (
QUOTA_EXCEEDED): You have reached the total volume allowed for your current billing cycle. Upgrade your plan in the portal to resume service.
500 Internal Server Error
An unexpected error occurred on the server side. Please contact support if this persists.See Error handling for all error response bodies and codes.⌘I
