Update conversation
Updates the conversation. To close, transfer or apply a wrap-up, prefer the specific routes (/close, /transfer, /wrapup).
With automation: true, the conversation goes to the automation (Flow) under the same rule the automations use: it becomes pending, with no agent. It applies to conversations with no agent and outside the satisfaction survey; a closed conversation only goes if its protocol is still open and, if it has no queue, it gets the channel’s first queue. With automation: false, a conversation in automation goes back to the queue (pending).
curl --request PUT \
--url https://api.connectadesk.com/api/v1/tickets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"queueId": 7,
"userId": 3,
"automation": true,
"wrapupTypeId": 12,
"wrapupNote": "Cliente pediu retorno na segunda."
}
'import requests
url = "https://api.connectadesk.com/api/v1/tickets/{id}"
payload = {
"queueId": 7,
"userId": 3,
"automation": True,
"wrapupTypeId": 12,
"wrapupNote": "Cliente pediu retorno na segunda."
}
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({
queueId: 7,
userId: 3,
automation: true,
wrapupTypeId: 12,
wrapupNote: 'Cliente pediu retorno na segunda.'
})
};
fetch('https://api.connectadesk.com/api/v1/tickets/{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.connectadesk.com/api/v1/tickets/{id}",
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([
'queueId' => 7,
'userId' => 3,
'automation' => true,
'wrapupTypeId' => 12,
'wrapupNote' => 'Cliente pediu retorno na segunda.'
]),
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.connectadesk.com/api/v1/tickets/{id}"
payload := strings.NewReader("{\n \"queueId\": 7,\n \"userId\": 3,\n \"automation\": true,\n \"wrapupTypeId\": 12,\n \"wrapupNote\": \"Cliente pediu retorno na segunda.\"\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.connectadesk.com/api/v1/tickets/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"queueId\": 7,\n \"userId\": 3,\n \"automation\": true,\n \"wrapupTypeId\": 12,\n \"wrapupNote\": \"Cliente pediu retorno na segunda.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/tickets/{id}")
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 \"queueId\": 7,\n \"userId\": 3,\n \"automation\": true,\n \"wrapupTypeId\": 12,\n \"wrapupNote\": \"Cliente pediu retorno na segunda.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 5120,
"status": "open",
"unreadMessages": 2,
"lastMessage": "Perfeito, vou querer o tamanho M",
"isGroup": false,
"automation": false,
"contact": {
"id": 842,
"name": "Maria Silva",
"number": "5511987654321",
"numberCountry": "BR",
"email": "maria.silva@exemplo.com.br",
"code": "CLI-00842",
"cpfCnpj": "12345678909",
"origin": "site",
"profilePicUrl": "https://cdn.exemplo.com/avatars/842.jpg",
"isGroup": false,
"instagramUsername": "maria.silva",
"lid": null,
"sourceUrl": "https://loja.exemplo.com.br/promo",
"sourceId": "23851234567890123",
"headline": "Coleção de inverno",
"mediaType": "image",
"mediaUrl": "https://cdn.exemplo.com/anuncios/inverno.jpg",
"utmSource": "instagram",
"utmMedium": "cpc",
"utmCampaign": "inverno-2026",
"utmId": "6543210987",
"fbclid": "IwAR0xYzAbC123",
"gclid": null,
"ctwaClid": null,
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
],
"customFields": [
{
"key": "plano",
"value": "Ouro",
"customFieldId": 91,
"name": "Plano",
"type": "select"
}
],
"lastChannel": {
"id": 11,
"name": "Instagram Loja",
"type": "instagram"
},
"createdAt": "2026-07-14T13:22:05.412Z",
"updatedAt": "2026-08-18T09:41:17.883Z"
},
"queue": {
"id": 13,
"name": "Comercial",
"color": "#0E7490"
},
"user": {
"id": 3,
"name": "Gabriel Goulart"
},
"channel": {
"id": 11,
"name": "Instagram Loja",
"type": "instagram"
},
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
],
"metaWindowOpenTimestamp": "2026-08-18T14:20:03.000Z",
"metaWindowType": 24,
"protocol": {
"id": 21877,
"userId": 3,
"channelId": 11,
"startedFrom": "receptive",
"startedFromContact": true,
"fromApi": false,
"fromAutomation": false,
"campaignSlug": null,
"rated": false,
"nps": null,
"createdAt": "2026-08-18T12:03:44.001Z",
"queuedAt": "2026-08-18T12:03:44.120Z",
"startedAt": "2026-08-18T12:05:10.300Z",
"userFirstAnswerAt": "2026-08-18T12:05:41.002Z",
"lastCustomerReplyAt": "2026-08-18T14:20:03.000Z",
"lastOperatorReplyAt": "2026-08-18T14:27:10.556Z",
"finishedAt": null,
"ratingAt": null,
"metaData": {
"pedido": "PED-48213",
"origem": "site"
}
},
"createdAt": "2026-08-18T12:03:44.001Z",
"updatedAt": "2026-08-18T14:27:10.556Z"
}
}{
"error": {
"code": "ERR_API_NOT_FOUND",
"message": "Registro não encontrado."
}
}{
"error": {
"code": "ERR_API_TICKET_IN_SERVICE",
"message": "A conversa tem um atendente responsável e não pode ir para a automação. Tire o atendente antes, com `POST /tickets/{id}/transfer` e `userId: null`."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}Authorizations
API token in the sk_live_… format.
Path Parameters
Body
Ticket status: open (in progress), pending (waiting in the queue) or closed (finished).
open, pending, closed Only tickets in this queue.
7
Assigns the ticket to this agent. Use the user id in this company, the same one GET /users returns. The same person has a different id in each company they work in.
3
true sends the conversation to the automation (Flow); false takes it out, back to the queue. With true, don't send userId, wrapupTypeId or wrapupNote, and status can only be pending.
true
Wrap-up type to record. Only applied together with closing the ticket.
12
Note recorded with the wrap-up when the ticket is closed.
"Cliente pediu retorno na segunda."
Response
OK
Show child attributes
Show child attributes
{
"id": 5120,
"status": "open",
"unreadMessages": 2,
"lastMessage": "Perfeito, vou querer o tamanho M",
"isGroup": false,
"automation": false,
"contact": {
"id": 842,
"name": "Maria Silva",
"number": "5511987654321",
"numberCountry": "BR",
"email": "maria.silva@exemplo.com.br",
"code": "CLI-00842",
"cpfCnpj": "12345678909",
"origin": "site",
"profilePicUrl": "https://cdn.exemplo.com/avatars/842.jpg",
"isGroup": false,
"instagramUsername": "maria.silva",
"lid": null,
"sourceUrl": "https://loja.exemplo.com.br/promo",
"sourceId": "23851234567890123",
"headline": "Coleção de inverno",
"mediaType": "image",
"mediaUrl": "https://cdn.exemplo.com/anuncios/inverno.jpg",
"utmSource": "instagram",
"utmMedium": "cpc",
"utmCampaign": "inverno-2026",
"utmId": "6543210987",
"fbclid": "IwAR0xYzAbC123",
"gclid": null,
"ctwaClid": null,
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
],
"customFields": [
{
"key": "plano",
"value": "Ouro",
"customFieldId": 91,
"name": "Plano",
"type": "select"
}
],
"lastChannel": {
"id": 11,
"name": "Instagram Loja",
"type": "instagram"
},
"createdAt": "2026-07-14T13:22:05.412Z",
"updatedAt": "2026-08-18T09:41:17.883Z"
},
"queue": {
"id": 13,
"name": "Comercial",
"color": "#0E7490"
},
"user": { "id": 3, "name": "Gabriel Goulart" },
"channel": {
"id": 11,
"name": "Instagram Loja",
"type": "instagram"
},
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
],
"metaWindowOpenTimestamp": "2026-08-18T14:20:03.000Z",
"metaWindowType": 24,
"protocol": {
"id": 21877,
"userId": 3,
"channelId": 11,
"startedFrom": "receptive",
"startedFromContact": true,
"fromApi": false,
"fromAutomation": false,
"campaignSlug": null,
"rated": false,
"nps": null,
"createdAt": "2026-08-18T12:03:44.001Z",
"queuedAt": "2026-08-18T12:03:44.120Z",
"startedAt": "2026-08-18T12:05:10.300Z",
"userFirstAnswerAt": "2026-08-18T12:05:41.002Z",
"lastCustomerReplyAt": "2026-08-18T14:20:03.000Z",
"lastOperatorReplyAt": "2026-08-18T14:27:10.556Z",
"finishedAt": null,
"ratingAt": null,
"metaData": { "pedido": "PED-48213", "origem": "site" }
},
"createdAt": "2026-08-18T12:03:44.001Z",
"updatedAt": "2026-08-18T14:27:10.556Z"
}
curl --request PUT \
--url https://api.connectadesk.com/api/v1/tickets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"queueId": 7,
"userId": 3,
"automation": true,
"wrapupTypeId": 12,
"wrapupNote": "Cliente pediu retorno na segunda."
}
'import requests
url = "https://api.connectadesk.com/api/v1/tickets/{id}"
payload = {
"queueId": 7,
"userId": 3,
"automation": True,
"wrapupTypeId": 12,
"wrapupNote": "Cliente pediu retorno na segunda."
}
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({
queueId: 7,
userId: 3,
automation: true,
wrapupTypeId: 12,
wrapupNote: 'Cliente pediu retorno na segunda.'
})
};
fetch('https://api.connectadesk.com/api/v1/tickets/{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.connectadesk.com/api/v1/tickets/{id}",
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([
'queueId' => 7,
'userId' => 3,
'automation' => true,
'wrapupTypeId' => 12,
'wrapupNote' => 'Cliente pediu retorno na segunda.'
]),
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.connectadesk.com/api/v1/tickets/{id}"
payload := strings.NewReader("{\n \"queueId\": 7,\n \"userId\": 3,\n \"automation\": true,\n \"wrapupTypeId\": 12,\n \"wrapupNote\": \"Cliente pediu retorno na segunda.\"\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.connectadesk.com/api/v1/tickets/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"queueId\": 7,\n \"userId\": 3,\n \"automation\": true,\n \"wrapupTypeId\": 12,\n \"wrapupNote\": \"Cliente pediu retorno na segunda.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/tickets/{id}")
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 \"queueId\": 7,\n \"userId\": 3,\n \"automation\": true,\n \"wrapupTypeId\": 12,\n \"wrapupNote\": \"Cliente pediu retorno na segunda.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 5120,
"status": "open",
"unreadMessages": 2,
"lastMessage": "Perfeito, vou querer o tamanho M",
"isGroup": false,
"automation": false,
"contact": {
"id": 842,
"name": "Maria Silva",
"number": "5511987654321",
"numberCountry": "BR",
"email": "maria.silva@exemplo.com.br",
"code": "CLI-00842",
"cpfCnpj": "12345678909",
"origin": "site",
"profilePicUrl": "https://cdn.exemplo.com/avatars/842.jpg",
"isGroup": false,
"instagramUsername": "maria.silva",
"lid": null,
"sourceUrl": "https://loja.exemplo.com.br/promo",
"sourceId": "23851234567890123",
"headline": "Coleção de inverno",
"mediaType": "image",
"mediaUrl": "https://cdn.exemplo.com/anuncios/inverno.jpg",
"utmSource": "instagram",
"utmMedium": "cpc",
"utmCampaign": "inverno-2026",
"utmId": "6543210987",
"fbclid": "IwAR0xYzAbC123",
"gclid": null,
"ctwaClid": null,
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
],
"customFields": [
{
"key": "plano",
"value": "Ouro",
"customFieldId": 91,
"name": "Plano",
"type": "select"
}
],
"lastChannel": {
"id": 11,
"name": "Instagram Loja",
"type": "instagram"
},
"createdAt": "2026-07-14T13:22:05.412Z",
"updatedAt": "2026-08-18T09:41:17.883Z"
},
"queue": {
"id": 13,
"name": "Comercial",
"color": "#0E7490"
},
"user": {
"id": 3,
"name": "Gabriel Goulart"
},
"channel": {
"id": 11,
"name": "Instagram Loja",
"type": "instagram"
},
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
],
"metaWindowOpenTimestamp": "2026-08-18T14:20:03.000Z",
"metaWindowType": 24,
"protocol": {
"id": 21877,
"userId": 3,
"channelId": 11,
"startedFrom": "receptive",
"startedFromContact": true,
"fromApi": false,
"fromAutomation": false,
"campaignSlug": null,
"rated": false,
"nps": null,
"createdAt": "2026-08-18T12:03:44.001Z",
"queuedAt": "2026-08-18T12:03:44.120Z",
"startedAt": "2026-08-18T12:05:10.300Z",
"userFirstAnswerAt": "2026-08-18T12:05:41.002Z",
"lastCustomerReplyAt": "2026-08-18T14:20:03.000Z",
"lastOperatorReplyAt": "2026-08-18T14:27:10.556Z",
"finishedAt": null,
"ratingAt": null,
"metaData": {
"pedido": "PED-48213",
"origem": "site"
}
},
"createdAt": "2026-08-18T12:03:44.001Z",
"updatedAt": "2026-08-18T14:27:10.556Z"
}
}{
"error": {
"code": "ERR_API_NOT_FOUND",
"message": "Registro não encontrado."
}
}{
"error": {
"code": "ERR_API_TICKET_IN_SERVICE",
"message": "A conversa tem um atendente responsável e não pode ir para a automação. Tire o atendente antes, com `POST /tickets/{id}/transfer` e `userId: null`."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}
