JavaScript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const response = await client.contact.backfillAnalysisData({ backfill_attributes: ['string'] });
console.log(response.status);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
response = client.contact.backfill_analysis_data(
backfill_attributes=["string"],
)
print(response.status)curl --request POST \
--url https://api.retellai.com/backfill-contact-analysis-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"backfill_attributes": [
"<string>"
],
"backfill_call_filter": {
"agent": [
{
"agent_id": "<string>",
"version": [
123
]
}
],
"start_timestamp": {
"type": "number",
"value": 123
}
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/backfill-contact-analysis-data",
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([
'backfill_attributes' => [
'<string>'
],
'backfill_call_filter' => [
'agent' => [
[
'agent_id' => '<string>',
'version' => [
123
]
]
],
'start_timestamp' => [
'type' => 'number',
'value' => 123
]
]
]),
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.retellai.com/backfill-contact-analysis-data"
payload := strings.NewReader("{\n \"backfill_attributes\": [\n \"<string>\"\n ],\n \"backfill_call_filter\": {\n \"agent\": [\n {\n \"agent_id\": \"<string>\",\n \"version\": [\n 123\n ]\n }\n ],\n \"start_timestamp\": {\n \"type\": \"number\",\n \"value\": 123\n }\n }\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.retellai.com/backfill-contact-analysis-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"backfill_attributes\": [\n \"<string>\"\n ],\n \"backfill_call_filter\": {\n \"agent\": [\n {\n \"agent_id\": \"<string>\",\n \"version\": [\n 123\n ]\n }\n ],\n \"start_timestamp\": {\n \"type\": \"number\",\n \"value\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/backfill-contact-analysis-data")
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 \"backfill_attributes\": [\n \"<string>\"\n ],\n \"backfill_call_filter\": {\n \"agent\": [\n {\n \"agent_id\": \"<string>\",\n \"version\": [\n 123\n ]\n }\n ],\n \"start_timestamp\": {\n \"type\": \"number\",\n \"value\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "queued",
"start_timestamp": 123,
"succeeded": 123,
"failed": 123,
"triggered_by": "manual"
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Contact
Backfill Contact Analysis Data
POST
/
backfill-contact-analysis-data
JavaScript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const response = await client.contact.backfillAnalysisData({ backfill_attributes: ['string'] });
console.log(response.status);import os
from retell import Retell
client = Retell(
api_key=os.environ.get("RETELL_API_KEY"), # This is the default and can be omitted
)
response = client.contact.backfill_analysis_data(
backfill_attributes=["string"],
)
print(response.status)curl --request POST \
--url https://api.retellai.com/backfill-contact-analysis-data \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"backfill_attributes": [
"<string>"
],
"backfill_call_filter": {
"agent": [
{
"agent_id": "<string>",
"version": [
123
]
}
],
"start_timestamp": {
"type": "number",
"value": 123
}
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retellai.com/backfill-contact-analysis-data",
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([
'backfill_attributes' => [
'<string>'
],
'backfill_call_filter' => [
'agent' => [
[
'agent_id' => '<string>',
'version' => [
123
]
]
],
'start_timestamp' => [
'type' => 'number',
'value' => 123
]
]
]),
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.retellai.com/backfill-contact-analysis-data"
payload := strings.NewReader("{\n \"backfill_attributes\": [\n \"<string>\"\n ],\n \"backfill_call_filter\": {\n \"agent\": [\n {\n \"agent_id\": \"<string>\",\n \"version\": [\n 123\n ]\n }\n ],\n \"start_timestamp\": {\n \"type\": \"number\",\n \"value\": 123\n }\n }\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.retellai.com/backfill-contact-analysis-data")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"backfill_attributes\": [\n \"<string>\"\n ],\n \"backfill_call_filter\": {\n \"agent\": [\n {\n \"agent_id\": \"<string>\",\n \"version\": [\n 123\n ]\n }\n ],\n \"start_timestamp\": {\n \"type\": \"number\",\n \"value\": 123\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retellai.com/backfill-contact-analysis-data")
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 \"backfill_attributes\": [\n \"<string>\"\n ],\n \"backfill_call_filter\": {\n \"agent\": [\n {\n \"agent_id\": \"<string>\",\n \"version\": [\n 123\n ]\n }\n ],\n \"start_timestamp\": {\n \"type\": \"number\",\n \"value\": 123\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "queued",
"start_timestamp": 123,
"succeeded": 123,
"failed": 123,
"triggered_by": "manual"
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "Account rate limited, please throttle your requests."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Body
application/json
Response
Backfill job started.
Available options:
queued, running, idle Epoch milliseconds when the job started.
Number of items processed successfully so far.
Number of items that errored so far.
Whether the job was started by an explicit API call (manual) or by the scheduled sync (cron).
Available options:
manual, cron Was this page helpful?
⌘I

