curl --request POST \
--url https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Approved. Please pay the $85.00 invoice.",
"requester_email": "paralegal@yourfirm.com"
}
'import requests
url = "https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response"
payload = {
"message": "Approved. Please pay the $85.00 invoice.",
"requester_email": "paralegal@yourfirm.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: 'Approved. Please pay the $85.00 invoice.',
requester_email: 'paralegal@yourfirm.com'
})
};
fetch('https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response', 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://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response",
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([
'message' => 'Approved. Please pay the $85.00 invoice.',
'requester_email' => 'paralegal@yourfirm.com'
]),
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://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response"
payload := strings.NewReader("{\n \"message\": \"Approved. Please pay the $85.00 invoice.\",\n \"requester_email\": \"paralegal@yourfirm.com\"\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://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Approved. Please pay the $85.00 invoice.\",\n \"requester_email\": \"paralegal@yourfirm.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response")
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 \"message\": \"Approved. Please pay the $85.00 invoice.\",\n \"requester_email\": \"paralegal@yourfirm.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "car_abc123",
"retrieval_request_id": "rr_abc123",
"status": "responded",
"responded_at": "2025-02-03T16:05:00Z"
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}Respond to action request
Answer the retrieval request’s open client action request (the request is action_required and pending_action_request is set). A request has at most one open action request at a time; this endpoint always answers that one. Send a text message, and optionally attach one file uploaded with Request presigned upload URL. Some action requests require an attachment: a missing HIPAA authorization must be answered with a signed PDF. A rejected response returns 400 and leaves the action request open so you can retry. See Responding to action requests.
curl --request POST \
--url https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Approved. Please pay the $85.00 invoice.",
"requester_email": "paralegal@yourfirm.com"
}
'import requests
url = "https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response"
payload = {
"message": "Approved. Please pay the $85.00 invoice.",
"requester_email": "paralegal@yourfirm.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: 'Approved. Please pay the $85.00 invoice.',
requester_email: 'paralegal@yourfirm.com'
})
};
fetch('https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response', 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://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response",
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([
'message' => 'Approved. Please pay the $85.00 invoice.',
'requester_email' => 'paralegal@yourfirm.com'
]),
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://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response"
payload := strings.NewReader("{\n \"message\": \"Approved. Please pay the $85.00 invoice.\",\n \"requester_email\": \"paralegal@yourfirm.com\"\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://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Approved. Please pay the $85.00 invoice.\",\n \"requester_email\": \"paralegal@yourfirm.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise.tavrn.ai/v2/retrieval-requests/{retrieval_request_id}/action-response")
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 \"message\": \"Approved. Please pay the $85.00 invoice.\",\n \"requester_email\": \"paralegal@yourfirm.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "car_abc123",
"retrieval_request_id": "rr_abc123",
"status": "responded",
"responded_at": "2025-02-03T16:05:00Z"
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}{
"error": {
"code": "validation_error",
"message": "The patient.date_of_birth field is required"
}
}Authorizations
API key authentication. Use format: Authorization: Bearer tavrn_sk_live_...
Path Parameters
Retrieval request ID
Body
Your answer to the action request. Leading and trailing whitespace is trimmed; must not be empty.
1 - 10000"Approved. Please pay the $85.00 invoice."
Email of the person at your firm who answered. Recorded as the responder; defaults to the API key.
"paralegal@yourfirm.com"
A file to send with the response, uploaded under the retrieval request's case.
Show child attributes
Show child attributes
Response
Response recorded
ID of the action request that was answered (matches pending_action_request.id)
"car_abc123"
"rr_abc123"
responded "responded"
"2025-02-03T16:05:00Z"