Conversations
Replace conversations
PUT
/
api
/
conversations
/
{id}
/
Replace conversations
curl --request PUT \
--url https://api.prod.peerlogic.com/api/conversations/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resolved_by": {
"name": "<string>",
"email": "jsmith@example.com"
}
}
'import requests
url = "https://api.prod.peerlogic.com/api/conversations/{id}/"
payload = { "resolved_by": {
"name": "<string>",
"email": "jsmith@example.com"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resolved_by: {name: '<string>', email: 'jsmith@example.com'}})
};
fetch('https://api.prod.peerlogic.com/api/conversations/{id}/', 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.prod.peerlogic.com/api/conversations/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'resolved_by' => [
'name' => '<string>',
'email' => 'jsmith@example.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://api.prod.peerlogic.com/api/conversations/{id}/"
payload := strings.NewReader("{\n \"resolved_by\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.prod.peerlogic.com/api/conversations/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resolved_by\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/conversations/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resolved_by\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"action_required": true,
"caller_name": "<string>",
"current_type": "static",
"end_time": "2023-11-07T05:31:56Z",
"escalated_at": "2023-11-07T05:31:56Z",
"escalation_reason": "<string>",
"escalations": [
{
"notes": [
{
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "<string>",
"is_from_escalation": true,
"note": "<string>",
"note_type": "system"
}
],
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"escalation_type": "aimee_initiated"
}
],
"id": "<string>",
"is_action_required": "<string>",
"messages": [
{
"conversation_id": "<string>",
"created_by": "<string>",
"direction": "inbound",
"id": "<string>",
"message_time": "2023-11-07T05:31:56Z",
"origin_type": "system_static",
"is_viewed": true,
"patient_phone_number": "<string>",
"system_phone_number": "<string>",
"text": "<string>",
"is_webchat": true,
"is_voicechat": true,
"is_deleted": true,
"deleted_at": "2023-11-07T05:31:56Z",
"deleted_by": "<string>",
"media": "<string>"
}
],
"messages_stats": "<string>",
"most_recent_inbound_message_time": "2023-11-07T05:31:56Z",
"most_recent_message_time": "2023-11-07T05:31:56Z",
"notes": [
{
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "<string>",
"is_from_escalation": true,
"note": "<string>",
"note_type": "system"
}
],
"opportunity": {
"created_at": "2023-11-07T05:31:56Z",
"first_follow_up_call_id": "<string>",
"followed_up_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"is_open": true,
"modified_at": "2023-11-07T05:31:56Z",
"status": "success",
"trigger_type": "missed_call"
},
"originating_call": {
"call_connection": "missed",
"call_direction": "inbound",
"call_start_time": "2023-11-07T05:31:56Z",
"id": "<string>",
"patients": [
{
"address_line_1": "<string>",
"address_line_2": "<string>",
"date_of_birth": "2023-12-25",
"email": "jsmith@example.com",
"id": "<string>",
"is_active": true,
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"phone_fax": "<string>",
"phone_home": "<string>",
"phone_mobile": "<string>",
"phone_number": "<string>",
"phone_work": "<string>",
"placeholder": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"zip_code": "<string>"
}
],
"sip_callee_extension": "<string>",
"sip_callee_number": "<string>",
"sip_caller_extension": "<string>",
"sip_caller_number": "<string>"
},
"origination_type": "static",
"patient_phone_number": "<string>",
"patients": [
{
"address_line_1": "<string>",
"address_line_2": "<string>",
"date_of_birth": "2023-12-25",
"email": "jsmith@example.com",
"id": "<string>",
"is_active": true,
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"phone_fax": "<string>",
"phone_home": "<string>",
"phone_mobile": "<string>",
"phone_number": "<string>",
"phone_work": "<string>",
"placeholder": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"zip_code": "<string>"
}
],
"practice_id": "<string>",
"recording_url": "<string>",
"resolutions": [
{
"notes": [
{
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "<string>",
"is_from_escalation": true,
"note": "<string>",
"note_type": "system"
}
],
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"resolution_type": "booked",
"appointment": {
"id": 123,
"appointment_start_at": "2023-11-07T05:31:56Z",
"appointment_end_at": "2023-11-07T05:31:56Z",
"approximate_total_amount": "<string>",
"approximate_total_currency": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"did_patient_miss": true,
"is_active": true,
"is_new_patient": true,
"note": "<string>",
"patient_id": "<string>",
"booked_by_patient_id": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"practice": "<string>",
"procedures": "<string>",
"status": "SCHEDULED",
"appointment_type": {
"id": "<string>",
"name": "<string>",
"duration_in_minutes": 123,
"practice": "<string>",
"descriptors": [
{
"name": "<string>",
"code": "<string>",
"id": "<string>",
"active": true
}
],
"peerlogic_appointment_types": "<string>",
"mappings": "<string>",
"is_bookable_online": true,
"is_disabled_in_peerlogic": true,
"effective_is_bookable_online": "<string>",
"has_availability_schedule": true
},
"booked_peerlogic_appointment_type": {
"id": "<string>",
"name": "Consultation",
"display_name": "<string>"
},
"patient": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"date_of_birth": "2023-12-25",
"email": "jsmith@example.com",
"id": "<string>",
"is_active": true,
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"phone_fax": "<string>",
"phone_home": "<string>",
"phone_mobile": "<string>",
"phone_number": "<string>",
"phone_work": "<string>",
"placeholder": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"zip_code": "<string>"
},
"provider": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"is_active": true
},
"operatory": {
"name": "<string>",
"id": "<string>",
"display_name": "<string>"
}
},
"resolver_type": "aimee"
}
],
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com"
},
"responsive_outreach_escalation_type": "aimee_initiated",
"responsive_outreach_resolution_type": "booked",
"responsive_outreach_status": "working_aimee",
"start_time": "2023-11-07T05:31:56Z",
"status": "open",
"system_phone_number": "<string>",
"is_webchat": true,
"is_voicechat": true,
"customer_satisfaction": "<string>"
}{
"non_field_errors": [
"Invalid input."
]
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}{
"detail": "The requested resource was not found."
}Authorizations
Bearer access token issued by Peerlogic.
Path Parameters
A unique value identifying this conversation.
Body
application/json
Show child attributes
Show child attributes
Response
Successful response for replace conversations.
Available options:
static, responsive, agent Minimum string length:
1Show child attributes
Show child attributes
Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
static, responsive, agent Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
aimee_initiated, aimee_error, user_initiated, conversation_abandoned, sms_failed, insurance_not_accepted, insurance_needs_verification, prescription_refill_request, patient_messaged_resolved_conversation, user_stop_text_received, aimee_hallucinated Available options:
booked, lost, cancelled, rescheduled, confirmed, unspecified Available options:
working_aimee, working_agent, escalated, not_applicable, resolved_by_aimee, resolved_by_agent, closed Available options:
open, closed Minimum string length:
1Was this page helpful?
Replace conversations
curl --request PUT \
--url https://api.prod.peerlogic.com/api/conversations/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resolved_by": {
"name": "<string>",
"email": "jsmith@example.com"
}
}
'import requests
url = "https://api.prod.peerlogic.com/api/conversations/{id}/"
payload = { "resolved_by": {
"name": "<string>",
"email": "jsmith@example.com"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resolved_by: {name: '<string>', email: 'jsmith@example.com'}})
};
fetch('https://api.prod.peerlogic.com/api/conversations/{id}/', 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.prod.peerlogic.com/api/conversations/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'resolved_by' => [
'name' => '<string>',
'email' => 'jsmith@example.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://api.prod.peerlogic.com/api/conversations/{id}/"
payload := strings.NewReader("{\n \"resolved_by\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.prod.peerlogic.com/api/conversations/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resolved_by\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.peerlogic.com/api/conversations/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resolved_by\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"action_required": true,
"caller_name": "<string>",
"current_type": "static",
"end_time": "2023-11-07T05:31:56Z",
"escalated_at": "2023-11-07T05:31:56Z",
"escalation_reason": "<string>",
"escalations": [
{
"notes": [
{
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "<string>",
"is_from_escalation": true,
"note": "<string>",
"note_type": "system"
}
],
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"escalation_type": "aimee_initiated"
}
],
"id": "<string>",
"is_action_required": "<string>",
"messages": [
{
"conversation_id": "<string>",
"created_by": "<string>",
"direction": "inbound",
"id": "<string>",
"message_time": "2023-11-07T05:31:56Z",
"origin_type": "system_static",
"is_viewed": true,
"patient_phone_number": "<string>",
"system_phone_number": "<string>",
"text": "<string>",
"is_webchat": true,
"is_voicechat": true,
"is_deleted": true,
"deleted_at": "2023-11-07T05:31:56Z",
"deleted_by": "<string>",
"media": "<string>"
}
],
"messages_stats": "<string>",
"most_recent_inbound_message_time": "2023-11-07T05:31:56Z",
"most_recent_message_time": "2023-11-07T05:31:56Z",
"notes": [
{
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "<string>",
"is_from_escalation": true,
"note": "<string>",
"note_type": "system"
}
],
"opportunity": {
"created_at": "2023-11-07T05:31:56Z",
"first_follow_up_call_id": "<string>",
"followed_up_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"is_open": true,
"modified_at": "2023-11-07T05:31:56Z",
"status": "success",
"trigger_type": "missed_call"
},
"originating_call": {
"call_connection": "missed",
"call_direction": "inbound",
"call_start_time": "2023-11-07T05:31:56Z",
"id": "<string>",
"patients": [
{
"address_line_1": "<string>",
"address_line_2": "<string>",
"date_of_birth": "2023-12-25",
"email": "jsmith@example.com",
"id": "<string>",
"is_active": true,
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"phone_fax": "<string>",
"phone_home": "<string>",
"phone_mobile": "<string>",
"phone_number": "<string>",
"phone_work": "<string>",
"placeholder": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"zip_code": "<string>"
}
],
"sip_callee_extension": "<string>",
"sip_callee_number": "<string>",
"sip_caller_extension": "<string>",
"sip_caller_number": "<string>"
},
"origination_type": "static",
"patient_phone_number": "<string>",
"patients": [
{
"address_line_1": "<string>",
"address_line_2": "<string>",
"date_of_birth": "2023-12-25",
"email": "jsmith@example.com",
"id": "<string>",
"is_active": true,
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"phone_fax": "<string>",
"phone_home": "<string>",
"phone_mobile": "<string>",
"phone_number": "<string>",
"phone_work": "<string>",
"placeholder": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"zip_code": "<string>"
}
],
"practice_id": "<string>",
"recording_url": "<string>",
"resolutions": [
{
"notes": [
{
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "<string>",
"is_from_escalation": true,
"note": "<string>",
"note_type": "system"
}
],
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"resolution_type": "booked",
"appointment": {
"id": 123,
"appointment_start_at": "2023-11-07T05:31:56Z",
"appointment_end_at": "2023-11-07T05:31:56Z",
"approximate_total_amount": "<string>",
"approximate_total_currency": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"did_patient_miss": true,
"is_active": true,
"is_new_patient": true,
"note": "<string>",
"patient_id": "<string>",
"booked_by_patient_id": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"practice": "<string>",
"procedures": "<string>",
"status": "SCHEDULED",
"appointment_type": {
"id": "<string>",
"name": "<string>",
"duration_in_minutes": 123,
"practice": "<string>",
"descriptors": [
{
"name": "<string>",
"code": "<string>",
"id": "<string>",
"active": true
}
],
"peerlogic_appointment_types": "<string>",
"mappings": "<string>",
"is_bookable_online": true,
"is_disabled_in_peerlogic": true,
"effective_is_bookable_online": "<string>",
"has_availability_schedule": true
},
"booked_peerlogic_appointment_type": {
"id": "<string>",
"name": "Consultation",
"display_name": "<string>"
},
"patient": {
"address_line_1": "<string>",
"address_line_2": "<string>",
"date_of_birth": "2023-12-25",
"email": "jsmith@example.com",
"id": "<string>",
"is_active": true,
"name": "<string>",
"name_first": "<string>",
"name_last": "<string>",
"name_middle": "<string>",
"phone_fax": "<string>",
"phone_home": "<string>",
"phone_mobile": "<string>",
"phone_number": "<string>",
"phone_work": "<string>",
"placeholder": "<string>",
"pms_created_at": "2023-11-07T05:31:56Z",
"zip_code": "<string>"
},
"provider": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"is_active": true
},
"operatory": {
"name": "<string>",
"id": "<string>",
"display_name": "<string>"
}
},
"resolver_type": "aimee"
}
],
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": {
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com"
},
"responsive_outreach_escalation_type": "aimee_initiated",
"responsive_outreach_resolution_type": "booked",
"responsive_outreach_status": "working_aimee",
"start_time": "2023-11-07T05:31:56Z",
"status": "open",
"system_phone_number": "<string>",
"is_webchat": true,
"is_voicechat": true,
"customer_satisfaction": "<string>"
}{
"non_field_errors": [
"Invalid input."
]
}{
"detail": "'Authorization' header is required"
}{
"message": "No permissions assigned to permit access to this endpoint."
}{
"detail": "The requested resource was not found."
}