Message Threads
Update Message Thread
Replace an existing message thread.
PUT
/
api
/
2.0
/
message_threads
/
{id}
/
Update Message Thread
curl --request PUT \
--url https://sandbox.elationemr.com/api/2.0/message_threads/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"patient": 123,
"practice": 123,
"delivery_date": "2023-11-07T05:31:56Z",
"is_urgent": false,
"members": [
{
"ack_time": "2023-11-07T05:31:56Z",
"group": 123,
"thread": 123,
"user": 123
}
],
"messages": [
{
"body": "<string>",
"send_date": "2023-11-07T05:31:56Z",
"sender": 123,
"thread": 123
}
],
"signed_by": 123,
"signed_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/message_threads/{id}/"
payload = {
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"patient": 123,
"practice": 123,
"delivery_date": "2023-11-07T05:31:56Z",
"is_urgent": False,
"members": [
{
"ack_time": "2023-11-07T05:31:56Z",
"group": 123,
"thread": 123,
"user": 123
}
],
"messages": [
{
"body": "<string>",
"send_date": "2023-11-07T05:31:56Z",
"sender": 123,
"thread": 123
}
],
"signed_by": 123,
"signed_date": "2023-11-07T05:31:56Z"
}
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({
chart_date: '2023-11-07T05:31:56Z',
document_date: '2023-11-07T05:31:56Z',
patient: 123,
practice: 123,
delivery_date: '2023-11-07T05:31:56Z',
is_urgent: false,
members: [{ack_time: '2023-11-07T05:31:56Z', group: 123, thread: 123, user: 123}],
messages: [
{
body: JSON.stringify('<string>'),
send_date: '2023-11-07T05:31:56Z',
sender: 123,
thread: 123
}
],
signed_by: 123,
signed_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://sandbox.elationemr.com/api/2.0/message_threads/{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://sandbox.elationemr.com/api/2.0/message_threads/{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([
'chart_date' => '2023-11-07T05:31:56Z',
'document_date' => '2023-11-07T05:31:56Z',
'patient' => 123,
'practice' => 123,
'delivery_date' => '2023-11-07T05:31:56Z',
'is_urgent' => false,
'members' => [
[
'ack_time' => '2023-11-07T05:31:56Z',
'group' => 123,
'thread' => 123,
'user' => 123
]
],
'messages' => [
[
'body' => '<string>',
'send_date' => '2023-11-07T05:31:56Z',
'sender' => 123,
'thread' => 123
]
],
'signed_by' => 123,
'signed_date' => '2023-11-07T05:31:56Z'
]),
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://sandbox.elationemr.com/api/2.0/message_threads/{id}/"
payload := strings.NewReader("{\n \"chart_date\": \"2023-11-07T05:31:56Z\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"patient\": 123,\n \"practice\": 123,\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"is_urgent\": false,\n \"members\": [\n {\n \"ack_time\": \"2023-11-07T05:31:56Z\",\n \"group\": 123,\n \"thread\": 123,\n \"user\": 123\n }\n ],\n \"messages\": [\n {\n \"body\": \"<string>\",\n \"send_date\": \"2023-11-07T05:31:56Z\",\n \"sender\": 123,\n \"thread\": 123\n }\n ],\n \"signed_by\": 123,\n \"signed_date\": \"2023-11-07T05:31:56Z\"\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://sandbox.elationemr.com/api/2.0/message_threads/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chart_date\": \"2023-11-07T05:31:56Z\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"patient\": 123,\n \"practice\": 123,\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"is_urgent\": false,\n \"members\": [\n {\n \"ack_time\": \"2023-11-07T05:31:56Z\",\n \"group\": 123,\n \"thread\": 123,\n \"user\": 123\n }\n ],\n \"messages\": [\n {\n \"body\": \"<string>\",\n \"send_date\": \"2023-11-07T05:31:56Z\",\n \"sender\": 123,\n \"thread\": 123\n }\n ],\n \"signed_by\": 123,\n \"signed_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/message_threads/{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 \"chart_date\": \"2023-11-07T05:31:56Z\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"patient\": 123,\n \"practice\": 123,\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"is_urgent\": false,\n \"members\": [\n {\n \"ack_time\": \"2023-11-07T05:31:56Z\",\n \"group\": 123,\n \"thread\": 123,\n \"user\": 123\n }\n ],\n \"messages\": [\n {\n \"body\": \"<string>\",\n \"send_date\": \"2023-11-07T05:31:56Z\",\n \"sender\": 123,\n \"thread\": 123\n }\n ],\n \"signed_by\": 123,\n \"signed_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"patient": 123,
"practice": 123,
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"delivery_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_urgent": false,
"members": [
{
"status": "Addressed",
"ack_time": "2023-11-07T05:31:56Z",
"group": 123,
"id": 123,
"thread": 123,
"user": 123
}
],
"messages": [
{
"body": "<string>",
"send_date": "2023-11-07T05:31:56Z",
"sender": 123,
"id": 123,
"patient": 123,
"practice": 123,
"thread": 123,
"to_document": {
"authoring_practice": 123,
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"id": 123,
"patient": 123,
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"document_type": 123,
"last_modified": "2023-11-07T05:31:56Z",
"sign_date": "2023-11-07T05:31:56Z",
"signed_by": 123
}
}
],
"signed_by": 123,
"signed_date": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
Response
200 - application/json
Was this page helpful?
⌘I
Update Message Thread
curl --request PUT \
--url https://sandbox.elationemr.com/api/2.0/message_threads/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"patient": 123,
"practice": 123,
"delivery_date": "2023-11-07T05:31:56Z",
"is_urgent": false,
"members": [
{
"ack_time": "2023-11-07T05:31:56Z",
"group": 123,
"thread": 123,
"user": 123
}
],
"messages": [
{
"body": "<string>",
"send_date": "2023-11-07T05:31:56Z",
"sender": 123,
"thread": 123
}
],
"signed_by": 123,
"signed_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://sandbox.elationemr.com/api/2.0/message_threads/{id}/"
payload = {
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"patient": 123,
"practice": 123,
"delivery_date": "2023-11-07T05:31:56Z",
"is_urgent": False,
"members": [
{
"ack_time": "2023-11-07T05:31:56Z",
"group": 123,
"thread": 123,
"user": 123
}
],
"messages": [
{
"body": "<string>",
"send_date": "2023-11-07T05:31:56Z",
"sender": 123,
"thread": 123
}
],
"signed_by": 123,
"signed_date": "2023-11-07T05:31:56Z"
}
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({
chart_date: '2023-11-07T05:31:56Z',
document_date: '2023-11-07T05:31:56Z',
patient: 123,
practice: 123,
delivery_date: '2023-11-07T05:31:56Z',
is_urgent: false,
members: [{ack_time: '2023-11-07T05:31:56Z', group: 123, thread: 123, user: 123}],
messages: [
{
body: JSON.stringify('<string>'),
send_date: '2023-11-07T05:31:56Z',
sender: 123,
thread: 123
}
],
signed_by: 123,
signed_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://sandbox.elationemr.com/api/2.0/message_threads/{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://sandbox.elationemr.com/api/2.0/message_threads/{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([
'chart_date' => '2023-11-07T05:31:56Z',
'document_date' => '2023-11-07T05:31:56Z',
'patient' => 123,
'practice' => 123,
'delivery_date' => '2023-11-07T05:31:56Z',
'is_urgent' => false,
'members' => [
[
'ack_time' => '2023-11-07T05:31:56Z',
'group' => 123,
'thread' => 123,
'user' => 123
]
],
'messages' => [
[
'body' => '<string>',
'send_date' => '2023-11-07T05:31:56Z',
'sender' => 123,
'thread' => 123
]
],
'signed_by' => 123,
'signed_date' => '2023-11-07T05:31:56Z'
]),
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://sandbox.elationemr.com/api/2.0/message_threads/{id}/"
payload := strings.NewReader("{\n \"chart_date\": \"2023-11-07T05:31:56Z\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"patient\": 123,\n \"practice\": 123,\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"is_urgent\": false,\n \"members\": [\n {\n \"ack_time\": \"2023-11-07T05:31:56Z\",\n \"group\": 123,\n \"thread\": 123,\n \"user\": 123\n }\n ],\n \"messages\": [\n {\n \"body\": \"<string>\",\n \"send_date\": \"2023-11-07T05:31:56Z\",\n \"sender\": 123,\n \"thread\": 123\n }\n ],\n \"signed_by\": 123,\n \"signed_date\": \"2023-11-07T05:31:56Z\"\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://sandbox.elationemr.com/api/2.0/message_threads/{id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chart_date\": \"2023-11-07T05:31:56Z\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"patient\": 123,\n \"practice\": 123,\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"is_urgent\": false,\n \"members\": [\n {\n \"ack_time\": \"2023-11-07T05:31:56Z\",\n \"group\": 123,\n \"thread\": 123,\n \"user\": 123\n }\n ],\n \"messages\": [\n {\n \"body\": \"<string>\",\n \"send_date\": \"2023-11-07T05:31:56Z\",\n \"sender\": 123,\n \"thread\": 123\n }\n ],\n \"signed_by\": 123,\n \"signed_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elationemr.com/api/2.0/message_threads/{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 \"chart_date\": \"2023-11-07T05:31:56Z\",\n \"document_date\": \"2023-11-07T05:31:56Z\",\n \"patient\": 123,\n \"practice\": 123,\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"is_urgent\": false,\n \"members\": [\n {\n \"ack_time\": \"2023-11-07T05:31:56Z\",\n \"group\": 123,\n \"thread\": 123,\n \"user\": 123\n }\n ],\n \"messages\": [\n {\n \"body\": \"<string>\",\n \"send_date\": \"2023-11-07T05:31:56Z\",\n \"sender\": 123,\n \"thread\": 123\n }\n ],\n \"signed_by\": 123,\n \"signed_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"patient": 123,
"practice": 123,
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"delivery_date": "2023-11-07T05:31:56Z",
"id": 123,
"is_urgent": false,
"members": [
{
"status": "Addressed",
"ack_time": "2023-11-07T05:31:56Z",
"group": 123,
"id": 123,
"thread": 123,
"user": 123
}
],
"messages": [
{
"body": "<string>",
"send_date": "2023-11-07T05:31:56Z",
"sender": 123,
"id": 123,
"patient": 123,
"practice": 123,
"thread": 123,
"to_document": {
"authoring_practice": 123,
"chart_date": "2023-11-07T05:31:56Z",
"document_date": "2023-11-07T05:31:56Z",
"id": 123,
"patient": 123,
"created_date": "2023-11-07T05:31:56Z",
"deleted_date": "2023-11-07T05:31:56Z",
"document_type": 123,
"last_modified": "2023-11-07T05:31:56Z",
"sign_date": "2023-11-07T05:31:56Z",
"signed_by": 123
}
}
],
"signed_by": 123,
"signed_date": "2023-11-07T05:31:56Z"
}