curl --request POST \
--url https://api.gestio.com.br/v2/autenticar \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"password": "••••••••"
}
'import requests
url = "https://api.gestio.com.br/v2/autenticar"
payload = {
"email": "[email protected]",
"password": "••••••••"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', password: '••••••••'})
};
fetch('https://api.gestio.com.br/v2/autenticar', 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.gestio.com.br/v2/autenticar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'password' => '••••••••'
]),
CURLOPT_HTTPHEADER => [
"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.gestio.com.br/v2/autenticar"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"password\": \"••••••••\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.gestio.com.br/v2/autenticar")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"password\": \"••••••••\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/autenticar")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"password\": \"••••••••\"\n}"
response = http.request(request)
puts response.read_body{
"authenticated": true,
"created": "2026-07-29 14:32:10",
"expiration": "2026-07-29 15:32:10",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Autenticar
Autentica um usuário e retorna o token de acesso a ser usado nas demais requisições.
curl --request POST \
--url https://api.gestio.com.br/v2/autenticar \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"password": "••••••••"
}
'import requests
url = "https://api.gestio.com.br/v2/autenticar"
payload = {
"email": "[email protected]",
"password": "••••••••"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', password: '••••••••'})
};
fetch('https://api.gestio.com.br/v2/autenticar', 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.gestio.com.br/v2/autenticar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'password' => '••••••••'
]),
CURLOPT_HTTPHEADER => [
"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.gestio.com.br/v2/autenticar"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"password\": \"••••••••\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.gestio.com.br/v2/autenticar")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"password\": \"••••••••\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gestio.com.br/v2/autenticar")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"password\": \"••••••••\"\n}"
response = http.request(request)
puts response.read_body{
"authenticated": true,
"created": "2026-07-29 14:32:10",
"expiration": "2026-07-29 15:32:10",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}email e a password do usuário de integração cadastrado no Gestio e receba o token de acesso.
Authorization das demais requisições, no formato Bearer {token}.
200, mesmo quando email/password estão incorretos. Verifique o campo authenticated no corpo da resposta para saber se a autenticação foi bem-sucedida.401 em outra rota, gere um novo token por aqui antes de repetir a chamada.email/password de integração em código client-side (frontend, apps mobile). Essa chamada deve ser feita apenas pelo seu backend.Body
E-mail do usuário de integração cadastrado no Gestio.
Senha do usuário de integração.
"••••••••"
Response
Requisição processada. Verifique o campo authenticated para saber se a autenticação foi bem-sucedida — credenciais inválidas também retornam 200.
Indica se a autenticação foi bem-sucedida. Sempre presente, em sucesso ou falha.
Data/hora de criação do token, no formato yyyy-MM-dd HH:mm:ss. Presente apenas quando authenticated é true.
"2026-07-29 14:32:10"
Data/hora de expiração do token, no formato yyyy-MM-dd HH:mm:ss. Presente apenas quando authenticated é true.
"2026-07-29 15:32:10"
Token de acesso a ser usado no header Authorization, no formato Bearer {accessToken}. Presente apenas quando authenticated é true.
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Mensagem de erro. Presente apenas quando authenticated é false.
"Falha na autenticação."
