Edit an action's draft
curl --request PATCH \
--url https://api.statisfy.com/v1/workbench/actions/{action_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {},
"updated_at": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/workbench/actions/{action_id}"
payload = {
"payload": {},
"updated_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payload: {}, updated_at: '<string>'})
};
fetch('https://api.statisfy.com/v1/workbench/actions/{action_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://api.statisfy.com/v1/workbench/actions/{action_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
],
'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/workbench/actions/{action_id}"
payload := strings.NewReader("{\n \"payload\": {},\n \"updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/workbench/actions/{action_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {},\n \"updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/workbench/actions/{action_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payload\": {},\n \"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>"
}workbench
Edit an action's draft
Changes an open action’s draft before it is approved, as the app’s editor does: the keys given replace the draft’s (for an email to, cc, subject, body; for a chat reply body), the rest stay. For a conversation’s reply you can also use PUT /v1/conversations//draft. Returns the action. Done as the key’s person, as they would in the app: only a person’s key may (403 for any other), on an action GET opens for them (else a 404). The app’s refusals come back as they are: 409 for an action already carried out or dismissed, or one a teammate holds.
PATCH
/
v1
/
workbench
/
actions
/
{action_id}
Edit an action's draft
curl --request PATCH \
--url https://api.statisfy.com/v1/workbench/actions/{action_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {},
"updated_at": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/workbench/actions/{action_id}"
payload = {
"payload": {},
"updated_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({payload: {}, updated_at: '<string>'})
};
fetch('https://api.statisfy.com/v1/workbench/actions/{action_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://api.statisfy.com/v1/workbench/actions/{action_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
],
'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/workbench/actions/{action_id}"
payload := strings.NewReader("{\n \"payload\": {},\n \"updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/workbench/actions/{action_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {},\n \"updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/workbench/actions/{action_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payload\": {},\n \"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.
Path Parameters
Body
application/json
Response
200 - application/json
Successful Response
Was this page helpful?