Atualizar o vínculo do usuário com a empresa
Altera apenas o que a tela de edição de usuário permite alterar dentro da empresa.
email e password pertencem à conta da pessoa, que é a mesma em todas as empresas de que
ela participa. Por isso não podem ser alterados pela API. Se o corpo não tiver nenhum campo
que possa ser alterado, a resposta é 400 ERR_API_USER_NO_WRITABLE_FIELDS.
Não existe DELETE de usuário. Para tirar o acesso de alguém, use PUT /users/{id}/active.
curl --request PUT \
--url https://api.connectadesk.com/api/v1/users/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gabriel Goulart",
"profileId": 21,
"maxOpenTickets": 5,
"queueIds": [
7
],
"channelsIds": [
4
]
}
'import requests
url = "https://api.connectadesk.com/api/v1/users/{id}"
payload = {
"name": "Gabriel Goulart",
"profileId": 21,
"maxOpenTickets": 5,
"queueIds": [7],
"channelsIds": [4]
}
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({
name: 'Gabriel Goulart',
profileId: 21,
maxOpenTickets: 5,
queueIds: [7],
channelsIds: [4]
})
};
fetch('https://api.connectadesk.com/api/v1/users/{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/users/{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([
'name' => 'Gabriel Goulart',
'profileId' => 21,
'maxOpenTickets' => 5,
'queueIds' => [
7
],
'channelsIds' => [
4
]
]),
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/users/{id}"
payload := strings.NewReader("{\n \"name\": \"Gabriel Goulart\",\n \"profileId\": 21,\n \"maxOpenTickets\": 5,\n \"queueIds\": [\n 7\n ],\n \"channelsIds\": [\n 4\n ]\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/users/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gabriel Goulart\",\n \"profileId\": 21,\n \"maxOpenTickets\": 5,\n \"queueIds\": [\n 7\n ],\n \"channelsIds\": [\n 4\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/users/{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 \"name\": \"Gabriel Goulart\",\n \"profileId\": 21,\n \"maxOpenTickets\": 5,\n \"queueIds\": [\n 7\n ],\n \"channelsIds\": [\n 4\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 3,
"email": "gabriel@exemplo.com.br",
"name": "Gabriel Goulart",
"profile": {
"id": 20,
"name": "Admin"
},
"isOwner": false,
"active": true,
"online": true,
"approved": true,
"maxOpenTickets": 15,
"lastLogin": "2026-08-19T08:12:00.000Z",
"queues": [
{
"id": 13,
"name": "Comercial"
}
],
"createdAt": "2026-01-08T12:00:00.000Z",
"updatedAt": "2026-08-19T08:30:00.000Z"
}
}{
"error": {
"code": "ERR_API_NOT_FOUND",
"message": "Registro não encontrado."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}Autorizações
Token da API no formato sk_live_….
Parâmetros de caminho
Corpo
Nome exibido nesta empresa.
2"Gabriel Goulart"
Perfil de permissões da pessoa nesta empresa. Use o id de GET /profiles. O proprietário da empresa não tem perfil, e o campo é ignorado para ele.
Um id que não é desta empresa responde 422 ERR_API_PROFILE_NOT_FOUND.
21
Forma antiga de escolher o perfil, mantida para as integrações que já a usam. Prefira profileId.
| valor | significado |
|---|---|
admin | Perfil padrão Admin da empresa. |
user | Perfil padrão Atendente da empresa. |
Se profileId também for enviado, vale o profileId.
admin, user Limite de atendimentos simultâneos. Envie null para remover o limite.
5
Filas da pessoa. A lista enviada substitui a anterior por completo.
[7]
Canais da pessoa. A lista enviada substitui a anterior por completo.
[4]
Resposta
OK
Usuário do ponto de vista da empresa. O id é o do usuário nesta empresa, e o email é o da conta da pessoa. Nome, perfil, ativação, presença e limite de atendimentos são definidos por empresa, então o mesmo usuário pode ter valores diferentes em cada empresa.
Contas de super admin nunca aparecem.
Show child attributes
Show child attributes
{ "id": 3, "email": "gabriel@exemplo.com.br", "name": "Gabriel Goulart", "profile": { "id": 20, "name": "Admin" }, "isOwner": false, "active": true, "online": true, "approved": true, "maxOpenTickets": 15, "lastLogin": "2026-08-19T08:12:00.000Z", "queues": [{ "id": 13, "name": "Comercial" }], "createdAt": "2026-01-08T12:00:00.000Z", "updatedAt": "2026-08-19T08:30:00.000Z" }
curl --request PUT \
--url https://api.connectadesk.com/api/v1/users/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Gabriel Goulart",
"profileId": 21,
"maxOpenTickets": 5,
"queueIds": [
7
],
"channelsIds": [
4
]
}
'import requests
url = "https://api.connectadesk.com/api/v1/users/{id}"
payload = {
"name": "Gabriel Goulart",
"profileId": 21,
"maxOpenTickets": 5,
"queueIds": [7],
"channelsIds": [4]
}
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({
name: 'Gabriel Goulart',
profileId: 21,
maxOpenTickets: 5,
queueIds: [7],
channelsIds: [4]
})
};
fetch('https://api.connectadesk.com/api/v1/users/{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/users/{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([
'name' => 'Gabriel Goulart',
'profileId' => 21,
'maxOpenTickets' => 5,
'queueIds' => [
7
],
'channelsIds' => [
4
]
]),
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/users/{id}"
payload := strings.NewReader("{\n \"name\": \"Gabriel Goulart\",\n \"profileId\": 21,\n \"maxOpenTickets\": 5,\n \"queueIds\": [\n 7\n ],\n \"channelsIds\": [\n 4\n ]\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/users/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gabriel Goulart\",\n \"profileId\": 21,\n \"maxOpenTickets\": 5,\n \"queueIds\": [\n 7\n ],\n \"channelsIds\": [\n 4\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/users/{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 \"name\": \"Gabriel Goulart\",\n \"profileId\": 21,\n \"maxOpenTickets\": 5,\n \"queueIds\": [\n 7\n ],\n \"channelsIds\": [\n 4\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 3,
"email": "gabriel@exemplo.com.br",
"name": "Gabriel Goulart",
"profile": {
"id": 20,
"name": "Admin"
},
"isOwner": false,
"active": true,
"online": true,
"approved": true,
"maxOpenTickets": 15,
"lastLogin": "2026-08-19T08:12:00.000Z",
"queues": [
{
"id": 13,
"name": "Comercial"
}
],
"createdAt": "2026-01-08T12:00:00.000Z",
"updatedAt": "2026-08-19T08:30:00.000Z"
}
}{
"error": {
"code": "ERR_API_NOT_FOUND",
"message": "Registro não encontrado."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}
