Usuários
Ativar ou desativar usuário
PUT
/
users
/
{id}
/
active
Ativar ou desativar usuário
curl --request PUT \
--url https://api.connectadesk.com/api/v1/users/{id}/active \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"active": true
}'import requests
url = "https://api.connectadesk.com/api/v1/users/{id}/active"
payload = { "active": True }
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({active: true})
};
fetch('https://api.connectadesk.com/api/v1/users/{id}/active', 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}/active",
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([
'active' => true
]),
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}/active"
payload := strings.NewReader("{\n \"active\": true\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}/active")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/users/{id}/active")
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 \"active\": true\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
application/json
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
Exemplo:
{
"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"
}
⌘I
Ativar ou desativar usuário
curl --request PUT \
--url https://api.connectadesk.com/api/v1/users/{id}/active \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"active": true
}'import requests
url = "https://api.connectadesk.com/api/v1/users/{id}/active"
payload = { "active": True }
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({active: true})
};
fetch('https://api.connectadesk.com/api/v1/users/{id}/active', 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}/active",
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([
'active' => true
]),
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}/active"
payload := strings.NewReader("{\n \"active\": true\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}/active")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/users/{id}/active")
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 \"active\": true\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\"."
}
}
