curl --request POST \
--url https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft_id": "<string>",
"draft_updated_at": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send"
payload = {
"draft_id": "<string>",
"draft_updated_at": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({draft_id: '<string>', draft_updated_at: '<string>', note: '<string>'})
};
fetch('https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send', 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/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'draft_id' => '<string>',
'draft_updated_at' => '<string>',
'note' => '<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/send"
payload := strings.NewReader("{\n \"draft_id\": \"<string>\",\n \"draft_updated_at\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft_id\": \"<string>\",\n \"draft_updated_at\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft_id\": \"<string>\",\n \"draft_updated_at\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"action": {
"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>"
},
"conversation_status": {
"status": "<string>",
"previous": "<string>",
"previous_status_id": 123,
"status_id": 123
},
"message": "<string>",
"success": true
}Send a conversation's reply
SENDS the conversation’s reply draft to the customer, as the app’s Send does (approving its Workbench action): an email from the person’s connected mailbox or the support address the thread uses, or a Slack, Teams, portal or ticket reply. Then the conversation’s status is decided as the app decides it after a send (conversation_status). draft_id and draft_updated_at are the draft you read (its id and updated_at); a 409 when the conversation’s draft is another one, or was edited, since: nothing goes out that you didn’t see. 502 when the send failed (the draft stays open). 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. Over MCP: first show the person the reply (GET /v1/workbench/actions/, which needs workbench:read: its payload, and its updated_at to pass as draft_updated_at) and send only on their explicit go-ahead.
curl --request POST \
--url https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft_id": "<string>",
"draft_updated_at": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send"
payload = {
"draft_id": "<string>",
"draft_updated_at": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({draft_id: '<string>', draft_updated_at: '<string>', note: '<string>'})
};
fetch('https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send', 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/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'draft_id' => '<string>',
'draft_updated_at' => '<string>',
'note' => '<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/send"
payload := strings.NewReader("{\n \"draft_id\": \"<string>\",\n \"draft_updated_at\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft_id\": \"<string>\",\n \"draft_updated_at\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/conversations/{conversation_id}/draft/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft_id\": \"<string>\",\n \"draft_updated_at\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"action": {
"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>"
},
"conversation_status": {
"status": "<string>",
"previous": "<string>",
"previous_status_id": 123,
"status_id": 123
},
"message": "<string>",
"success": true
}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?