Save the draft reply
Replaces the stored draft. Sending an empty string stores an empty draft rather than clearing it — use DELETE to remove one. Returns an empty body.
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
conversations
/
{conversation_id}
/
draft_messages
Save the draft reply
curl --request PATCH \
--url https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"draft_message": {
"message": "Checking with billing on the seat proration before I reply."
}
}
'import requests
url = "https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages"
payload = { "draft_message": { "message": "Checking with billing on the seat proration before I reply." } }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draft_message: {message: 'Checking with billing on the seat proration before I reply.'}
})
};
fetch('https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft_message\": {\n \"message\": \"Checking with billing on the seat proration before I reply.\"\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages"
payload := strings.NewReader("{\n \"draft_message\": {\n \"message\": \"Checking with billing on the seat proration before I reply.\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api_access_token", "<api-key>")
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))
}{
"error": "Resource could not be found"
}{
"error": "Resource could not be found"
}Authorizations
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Path Parameters
The numeric ID of the account
The numeric ID of the conversation
Body
application/json
The draft to store.
Show child attributes
Show child attributes
Response
Saved
Was this page helpful?
⌘I
Save the draft reply
curl --request PATCH \
--url https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"draft_message": {
"message": "Checking with billing on the seat proration before I reply."
}
}
'import requests
url = "https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages"
payload = { "draft_message": { "message": "Checking with billing on the seat proration before I reply." } }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draft_message: {message: 'Checking with billing on the seat proration before I reply.'}
})
};
fetch('https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft_message\": {\n \"message\": \"Checking with billing on the seat proration before I reply.\"\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.tied.com/api/v1/accounts/{account_id}/conversations/{conversation_id}/draft_messages"
payload := strings.NewReader("{\n \"draft_message\": {\n \"message\": \"Checking with billing on the seat proration before I reply.\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api_access_token", "<api-key>")
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))
}{
"error": "Resource could not be found"
}{
"error": "Resource could not be found"
}