Skip to main content
POST
/
report-call-error
Report an issue with a call
curl --request POST \
  --url https://app.phonely.ai/api/report-call-error \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '
{
  "uid": "<string>",
  "agentId": "<string>",
  "callId": "<string>",
  "email": "[email protected]",
  "reason": "<string>"
}
'
import requests

url = "https://app.phonely.ai/api/report-call-error"

payload = {
"uid": "<string>",
"agentId": "<string>",
"callId": "<string>",
"email": "[email protected]",
"reason": "<string>"
}
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uid: '<string>',
agentId: '<string>',
callId: '<string>',
email: '[email protected]',
reason: '<string>'
})
};

fetch('https://app.phonely.ai/api/report-call-error', 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://app.phonely.ai/api/report-call-error",
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([
'uid' => '<string>',
'agentId' => '<string>',
'callId' => '<string>',
'email' => '[email protected]',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization: <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"
"strings"
"net/http"
"io"
)

func main() {

url := "https://app.phonely.ai/api/report-call-error"

payload := strings.NewReader("{\n \"uid\": \"<string>\",\n \"agentId\": \"<string>\",\n \"callId\": \"<string>\",\n \"email\": \"[email protected]\",\n \"reason\": \"<string>\"\n}")

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

req.Header.Add("X-Authorization", "<api-key>")
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://app.phonely.ai/api/report-call-error")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"uid\": \"<string>\",\n \"agentId\": \"<string>\",\n \"callId\": \"<string>\",\n \"email\": \"[email protected]\",\n \"reason\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.phonely.ai/api/report-call-error")

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

request = Net::HTTP::Post.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uid\": \"<string>\",\n \"agentId\": \"<string>\",\n \"callId\": \"<string>\",\n \"email\": \"[email protected]\",\n \"reason\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
Reports an error or issue with a specific call to help improve the service.

Request

Method: POST
Endpoint: /api/report-call-error
Headers:
  • X-Authorization: Your API key (required)
  • Content-Type: application/json
Request Body:
{
  "uid": "string",
  "agentId": "string",
  "callId": "string",
  "email": "string",
  "reason": "string"
}
Parameters:
  • uid (string, required): Your user ID
  • agentId (string, required): The ID of the agent that received the call
  • callId (string, required): The ID of the call with the error
  • email (string, required): Your email address for follow-up
  • reason (string, required): Description of the error or issue

Response

Success Response (200):
{
  "success": true
}
Error Responses:
  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Invalid or missing API key, or insufficient permissions
  • 404 Not Found: Call not found or invalid call ID
  • 500 Internal Server Error: Server error or problem submitting the error report

Example

curl -X POST https://app.phonely.ai/api/report-call-error \
  -H "X-Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123",
    "agentId": "agent456",
    "callId": "call789",
    "email": "[email protected]",
    "reason": "Agent did not respond properly to customer questions"
  }'

Notes

  • This endpoint helps improve the service by collecting feedback on call issues
  • The error report will be sent to the Phonely team for review
  • A link to the call history will be included in the error report

Authorizations

X-Authorization
string
header
required

Body

application/json
uid
string
required

User ID

agentId
string
required

ID of the agent involved in the call

callId
string
required

ID of the call being reported

email
string<email>
required

Email address for feedback communication

reason
string
required

Detailed explanation of the issue or feedback

Response

Error report submitted successfully

success
boolean

Indicates if the report was submitted successfully

Last modified on July 11, 2026