curl --request PATCH \
--url https://api2.getsales.io/unibox/v1/api/tasks/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"title": "<string>",
"body": "<string>",
"due_at": "<string>",
"expires_at": "<string>",
"assignee_user_sid": "<string>",
"chosen_option_id": 2,
"workflow_sid": "<string>"
}
'import requests
url = "https://api2.getsales.io/unibox/v1/api/tasks/{sid}"
payload = {
"title": "<string>",
"body": "<string>",
"due_at": "<string>",
"expires_at": "<string>",
"assignee_user_sid": "<string>",
"chosen_option_id": 2,
"workflow_sid": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
body: JSON.stringify('<string>'),
due_at: '<string>',
expires_at: '<string>',
assignee_user_sid: '<string>',
chosen_option_id: 2,
workflow_sid: '<string>'
})
};
fetch('https://api2.getsales.io/unibox/v1/api/tasks/{sid}', 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://api2.getsales.io/unibox/v1/api/tasks/{sid}",
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([
'title' => '<string>',
'body' => '<string>',
'due_at' => '<string>',
'expires_at' => '<string>',
'assignee_user_sid' => '<string>',
'chosen_option_id' => 2,
'workflow_sid' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <api-key>"
],
]);
$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://api2.getsales.io/unibox/v1/api/tasks/{sid}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"due_at\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"assignee_user_sid\": \"<string>\",\n \"chosen_option_id\": 2,\n \"workflow_sid\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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))
}HttpResponse<String> response = Unirest.patch("https://api2.getsales.io/unibox/v1/api/tasks/{sid}")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"due_at\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"assignee_user_sid\": \"<string>\",\n \"chosen_option_id\": 2,\n \"workflow_sid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.getsales.io/unibox/v1/api/tasks/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"due_at\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"assignee_user_sid\": \"<string>\",\n \"chosen_option_id\": 2,\n \"workflow_sid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "update",
"item": {
"sid": "<string>",
"team_sid": "<string>",
"title": "<string>",
"state": "open",
"created_by": {
"actor_type": "user",
"actor_sid": "<string>",
"team_sid": "<string>",
"permissions": {},
"actor_name": "<string>",
"oauth_client_sid": "<string>",
"reason": "<string>",
"cluster_id": 123,
"trace_id": "<string>"
},
"conversation_sid": "<string>",
"person_sid": "<string>",
"body": "<string>",
"due_at": "<string>",
"assignee_user_sid": "<string>",
"completed_at": "<string>",
"workflow_task_sid": "<string>",
"options": [
{
"id": 2,
"label": "<string>",
"key": "<string>"
}
],
"chosen_option_id": 123,
"expires_at": "<string>",
"source_ref": "<string>",
"kind": "manual",
"draft": "<string>",
"play_ref": {
"play_sid": "<string>",
"play_name": "<string>",
"playtable_sid": "<string>",
"workflow_sid": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"updated_fields": [
"<string>"
],
"previous_values": {},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
},
"kept_fields": [
"<string>"
]
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}Answer or update a task
Answer, edit or close an inbox task: done completes it, canceled discards it, open reopens a done task and clears the pick. A task carrying options closes with chosen_option_id. A play’s draft (kind play_draft) is sent by approve_workflow_task, never closed done here (409): canceled skips it. A play’s question (kind play_question) closes done with the chosen option, and with workflow_sid when its key is move or add and play_ref names no workflow. Empty patch: 422 nothing_to_update.
Contract:
- MCP tool
update_task, registry packagemcp.unibox/tasks, mountinbox. - Operation
update, response envelopeupdate. - Flags: none.
curl --request PATCH \
--url https://api2.getsales.io/unibox/v1/api/tasks/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Team-SID: <api-key>' \
--data '
{
"title": "<string>",
"body": "<string>",
"due_at": "<string>",
"expires_at": "<string>",
"assignee_user_sid": "<string>",
"chosen_option_id": 2,
"workflow_sid": "<string>"
}
'import requests
url = "https://api2.getsales.io/unibox/v1/api/tasks/{sid}"
payload = {
"title": "<string>",
"body": "<string>",
"due_at": "<string>",
"expires_at": "<string>",
"assignee_user_sid": "<string>",
"chosen_option_id": 2,
"workflow_sid": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Team-SID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Team-SID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
body: JSON.stringify('<string>'),
due_at: '<string>',
expires_at: '<string>',
assignee_user_sid: '<string>',
chosen_option_id: 2,
workflow_sid: '<string>'
})
};
fetch('https://api2.getsales.io/unibox/v1/api/tasks/{sid}', 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://api2.getsales.io/unibox/v1/api/tasks/{sid}",
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([
'title' => '<string>',
'body' => '<string>',
'due_at' => '<string>',
'expires_at' => '<string>',
'assignee_user_sid' => '<string>',
'chosen_option_id' => 2,
'workflow_sid' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Team-SID: <api-key>"
],
]);
$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://api2.getsales.io/unibox/v1/api/tasks/{sid}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"due_at\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"assignee_user_sid\": \"<string>\",\n \"chosen_option_id\": 2,\n \"workflow_sid\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Team-SID", "<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))
}HttpResponse<String> response = Unirest.patch("https://api2.getsales.io/unibox/v1/api/tasks/{sid}")
.header("Authorization", "Bearer <token>")
.header("Team-SID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"due_at\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"assignee_user_sid\": \"<string>\",\n \"chosen_option_id\": 2,\n \"workflow_sid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.getsales.io/unibox/v1/api/tasks/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Team-SID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"due_at\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"assignee_user_sid\": \"<string>\",\n \"chosen_option_id\": 2,\n \"workflow_sid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"operation": "update",
"item": {
"sid": "<string>",
"team_sid": "<string>",
"title": "<string>",
"state": "open",
"created_by": {
"actor_type": "user",
"actor_sid": "<string>",
"team_sid": "<string>",
"permissions": {},
"actor_name": "<string>",
"oauth_client_sid": "<string>",
"reason": "<string>",
"cluster_id": 123,
"trace_id": "<string>"
},
"conversation_sid": "<string>",
"person_sid": "<string>",
"body": "<string>",
"due_at": "<string>",
"assignee_user_sid": "<string>",
"completed_at": "<string>",
"workflow_task_sid": "<string>",
"options": [
{
"id": 2,
"label": "<string>",
"key": "<string>"
}
],
"chosen_option_id": 123,
"expires_at": "<string>",
"source_ref": "<string>",
"kind": "manual",
"draft": "<string>",
"play_ref": {
"play_sid": "<string>",
"play_name": "<string>",
"playtable_sid": "<string>",
"workflow_sid": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"updated_fields": [
"<string>"
],
"previous_values": {},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
},
"kept_fields": [
"<string>"
]
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}{
"success": false,
"error": {
"code": "validation_failed",
"message": "<string>",
"recoverable": true,
"suggestion": "<string>",
"field_errors": {},
"blockers": [
{
"type": "<string>",
"severity": "hard",
"description": "<string>",
"entity_sid": "<string>",
"resolution": "<string>",
"resolution_hint": "<string>",
"count": 123
}
],
"context": {}
},
"meta": {
"trace_id": "<string>",
"span_id": "<string>",
"timestamp": "<string>",
"duration_ms": 1,
"team_sid": "<string>",
"actor_type": "<string>"
}
}Authorizations
Body
Request body of update_task.
A play's question only: the workflow a move or an add puts the person into (play_ref.workflow_sid). Required with state done when the chosen option's key is move or add and the ref names none (422 workflow_sid); 422 on a task that is no play's question.
18Response
update success envelope.