Rerun Session Analysis
curl --request POST \
--url https://api.fish.audio/v1/agent/sessions/<session-id>/analysis/rerun \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun', 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.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "queued",
"summary": "<string>",
"data": [
{
"name": "<string>",
"type": "boolean",
"value": true,
"rationale": ""
}
],
"criteria_results": [
{
"name": "<string>",
"result": "success",
"rationale": ""
}
],
"error": "<string>",
"transcript_incomplete": false,
"finished_at": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}Sessions
Rerun Voice Agent Session Analysis
Run a session’s post-call analysis again when the first run did not give you a usable result
POST
/
v1
/
agent
/
sessions
/
{session_id}
/
analysis
/
rerun
Rerun Session Analysis
curl --request POST \
--url https://api.fish.audio/v1/agent/sessions/<session-id>/analysis/rerun \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun', 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.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/agent/sessions/{session_id}/analysis/rerun")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "queued",
"summary": "<string>",
"data": [
{
"name": "<string>",
"type": "boolean",
"value": true,
"rationale": ""
}
],
"criteria_results": [
{
"name": "<string>",
"result": "success",
"rationale": ""
}
],
"error": "<string>",
"transcript_incomplete": false,
"finished_at": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}There is no request body. You can rerun an analysis that:
- ended in
errororskipped, - finished on a transcript that was still incomplete, or
- is stuck:
queuedfor more than 5 minutes, orrunningfor more than 15 minutes.
409. A session whose content has been deleted under the data retention policy returns 410. A session with no analysis record returns 404.
The rerun uses the analysis settings pinned when the session started, so changing the agent’s analysis settings afterwards doesn’t change what it produces.
The call returns 201 with the analysis as it stands after it was queued: status is usually queued and the results are empty. The run finishes in the background, so poll Get Voice Agent Session and read its analysis for the outcome. When the rerun finishes, Fish sends the call.analyzed webhook again; see Webhooks.
Each team can make 30 calls per minute to this endpoint. The 31st call within the same minute returns 429, and the count starts again in the next minute.
For what the analysis contains, see Post-call analysis.Authorizations
Response
The rerun was queued. The body is the session's analysis as it stands right now: status is usually queued and the results are empty. Poll GET /v1/agent/sessions/{session_id} and read its analysis for the outcome.
The post-call analysis of the session.
Was this page helpful?

