Log a new Client Communication history
1 min
POST
https://developer.digitail.io/api/v1/client-communications
Body Parameters
- bodyobjectrequired
- user_idintegerDescription
- contact_person_idintegerDescription
- patient_idsinteger[]Description
- clinic_idintegerDescription
- channelstring<phone | other>DescriptionAllowedphoneother
- subjectstringDescription
- contentstringDescription
- destinationstringDescription
- communicated_atstringDescription
- message_idstringDescription
- draft_idintegerDescription
- draft_attachment_idsinteger[]Description
Responses
201
- object
- dataobject
- typestringExample
- subjectstringExample
- subject_is_status_titlebooleanExampleDescription
- contentstringExample
- communicated_atstringExample
- failure_codestringExampleDescription
- failure_reasonstringExampleDescription
- call_statusstring<ringing | in-progress | completed | busy | no-answer | failed | canceled | >ExampleDescriptionAllowedringingin-progresscompletedbusyno-answerfailedcancelednull
- voicemail_statusstring<absent | completed | >ExampleDescriptionAllowedabsentcompletednull
- answered_bystringExampleDescription
- replied_to_idintegerExampleDescription
- last_reply_atstringExampleDescription
- is_seenbooleanExampleDescription
- unseen_replies_countintegerExampleDescription
- record_idintegerExampleDescription
- recordobjectDescription
- object
- idintegerExample
- numberintegerExampleDescription
- statusintegerExampleDescription
- datestringExample
- pet_idintegerExample
- sale_idintegerExampleDescription
- responsible_idintegerExample
- visit_typesobject[]
- idintegerExample
- namestringExample
- repliesdata[]Description
curl
curl --request POST \
--url https://developer.digitail.io/api/v1/client-communications \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://developer.digitail.io/api/v1/client-communications", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://developer.digitail.io/api/v1/client-communications")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://developer.digitail.io/api/v1/client-communications"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
// successful operation
{
"data": {
"type": "Phone",
"subject": "Subject",
"subject_is_status_title": true,
"content": "Longer content related to the communication",
"communicated_at": "2022-07-21T14:18:33.258907Z",
"failure_code": "30003",
"failure_reason": "Unreachable destination handset",
"call_status": "no-answer",
"voicemail_status": "completed",
"answered_by": "machine_start",
"replied_to_id": 123,
"last_reply_at": "2022-07-21T15:30:00.000000Z",
"is_seen": true,
"unseen_replies_count": 2,
"record_id": 77,
"record": {},
"replies": [
""
]
}
}