curl --request PUT \
--url https://api.statisfy.com/v1/conversations/{conversation_id}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {},
"draft_updated_at": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/conversations/{conversation_id}/draft"
payload = {
"payload": {},
"draft_updated_at": "<string>"
}
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({payload: {}, draft_updated_at: '<string>'})
};
fetch('https://api.statisfy.com/v1/conversations/{conversation_id}/draft', 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.statisfy.com/v1/conversations/{conversation_id}/draft",
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([
'payload' => [
],
'draft_updated_at' => '<string>'
]),
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.statisfy.com/v1/conversations/{conversation_id}/draft"
payload := strings.NewReader("{\n \"payload\": {},\n \"draft_updated_at\": \"<string>\"\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.statisfy.com/v1/conversations/{conversation_id}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {},\n \"draft_updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/conversations/{conversation_id}/draft")
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 \"payload\": {},\n \"draft_updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"payload": {},
"priority": 123,
"status": "<string>",
"title": "<string>",
"type": "<string>",
"account_id": "<string>",
"account_name": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"assignee": {
"id": "<string>",
"name": "<string>"
},
"conversation_id": "<string>",
"created_at": "<string>",
"description": "<string>",
"dismiss_reason": "<string>",
"dismissed_at": "<string>",
"executed_at": "<string>",
"execution_result": {},
"last_activity_at": "<string>",
"meeting_start": "<string>",
"meeting_title": "<string>",
"original_payload": {},
"resolution": "<string>",
"resolved_by": {
"id": "<string>",
"name": "<string>"
},
"source": "<string>",
"source_id": "<string>",
"updated_at": "<string>"
}Edit a conversation's reply draft
Edits the reply waiting on a conversation, as the app’s conversation editor saves it: the keys given replace the draft’s (for an email to, cc, subject, body; for a chat reply body), the rest stay, whoever wrote it. Nothing is sent. Returns the draft. The conversation’s draft is the reply its editor shows in the app, its draft on GET /v1/conversations/: a Workbench action, so GET /v1/workbench/actions/ reads it whole and its own routes act on it too. Done as the key’s person: only a person’s key may (403 for any other). 404 for a conversation the workspace doesn’t read; 409 when it has no draft open.
curl --request PUT \
--url https://api.statisfy.com/v1/conversations/{conversation_id}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {},
"draft_updated_at": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/conversations/{conversation_id}/draft"
payload = {
"payload": {},
"draft_updated_at": "<string>"
}
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({payload: {}, draft_updated_at: '<string>'})
};
fetch('https://api.statisfy.com/v1/conversations/{conversation_id}/draft', 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.statisfy.com/v1/conversations/{conversation_id}/draft",
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([
'payload' => [
],
'draft_updated_at' => '<string>'
]),
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.statisfy.com/v1/conversations/{conversation_id}/draft"
payload := strings.NewReader("{\n \"payload\": {},\n \"draft_updated_at\": \"<string>\"\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.statisfy.com/v1/conversations/{conversation_id}/draft")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {},\n \"draft_updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/conversations/{conversation_id}/draft")
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 \"payload\": {},\n \"draft_updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"payload": {},
"priority": 123,
"status": "<string>",
"title": "<string>",
"type": "<string>",
"account_id": "<string>",
"account_name": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"assignee": {
"id": "<string>",
"name": "<string>"
},
"conversation_id": "<string>",
"created_at": "<string>",
"description": "<string>",
"dismiss_reason": "<string>",
"dismissed_at": "<string>",
"executed_at": "<string>",
"execution_result": {},
"last_activity_at": "<string>",
"meeting_start": "<string>",
"meeting_title": "<string>",
"original_payload": {},
"resolution": "<string>",
"resolved_by": {
"id": "<string>",
"name": "<string>"
},
"source": "<string>",
"source_id": "<string>",
"updated_at": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
Response
Successful Response
Was this page helpful?