Ativar Cliente
curl --request PATCH \
--url https://api.revenda.nexus/lines/active/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"credits": 123,
"whatsapp": "<string>",
"country": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.revenda.nexus/lines/active/{id}"
payload = {
"username": "<string>",
"password": "<string>",
"credits": 123,
"whatsapp": "<string>",
"country": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
credits: 123,
whatsapp: '<string>',
country: '<string>',
notes: '<string>'
})
};
fetch('https://api.revenda.nexus/lines/active/{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.revenda.nexus/lines/active/{id}",
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([
'username' => '<string>',
'password' => '<string>',
'credits' => 123,
'whatsapp' => '<string>',
'country' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.revenda.nexus/lines/active/{id}"
payload := strings.NewReader("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"credits\": 123,\n \"whatsapp\": \"<string>\",\n \"country\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://api.revenda.nexus/lines/active/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"credits\": 123,\n \"whatsapp\": \"<string>\",\n \"country\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenda.nexus/lines/active/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"credits\": 123,\n \"whatsapp\": \"<string>\",\n \"country\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 505,
"username": "123456",
"password": "123456",
"owner": 80,
"expDate": "2025-02-15T14:27:08.832Z",
"notes": "Ativação oficial",
"status": 1,
"isTrial": 0,
"whatsapp": "(12) 3 1231-2312",
"telegram": null,
"trash": 0,
"country": "Brasil",
"error_nexus": 0,
"idNexus": 8448,
"updated": 0,
"migrationUrl": null,
"lastTrust": null,
"email": null,
"createdAt": "2025-01-16T13:42:30.047Z",
"updatedAt": "2025-01-16T13:42:30.047Z"
}
Clientes
Ativar Cliente
Este endpoint permite ativar um cliente de teste, tornando-o um usuário oficial na plataforma Nexus.
PATCH
/
lines
/
active
/
{id}
Ativar Cliente
curl --request PATCH \
--url https://api.revenda.nexus/lines/active/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"credits": 123,
"whatsapp": "<string>",
"country": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.revenda.nexus/lines/active/{id}"
payload = {
"username": "<string>",
"password": "<string>",
"credits": 123,
"whatsapp": "<string>",
"country": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
credits: 123,
whatsapp: '<string>',
country: '<string>',
notes: '<string>'
})
};
fetch('https://api.revenda.nexus/lines/active/{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.revenda.nexus/lines/active/{id}",
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([
'username' => '<string>',
'password' => '<string>',
'credits' => 123,
'whatsapp' => '<string>',
'country' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.revenda.nexus/lines/active/{id}"
payload := strings.NewReader("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"credits\": 123,\n \"whatsapp\": \"<string>\",\n \"country\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://api.revenda.nexus/lines/active/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"credits\": 123,\n \"whatsapp\": \"<string>\",\n \"country\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenda.nexus/lines/active/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"credits\": 123,\n \"whatsapp\": \"<string>\",\n \"country\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 505,
"username": "123456",
"password": "123456",
"owner": 80,
"expDate": "2025-02-15T14:27:08.832Z",
"notes": "Ativação oficial",
"status": 1,
"isTrial": 0,
"whatsapp": "(12) 3 1231-2312",
"telegram": null,
"trash": 0,
"country": "Brasil",
"error_nexus": 0,
"idNexus": 8448,
"updated": 0,
"migrationUrl": null,
"lastTrust": null,
"email": null,
"createdAt": "2025-01-16T13:42:30.047Z",
"updatedAt": "2025-01-16T13:42:30.047Z"
}
Como utilizar este endpoint?
Esse endpoint converte um cliente de teste em um cliente ativo, definindo o período de ativação com base nos créditos utilizados.Headers obrigatórios
string
required
O token de autenticação no formato Bearer é obrigatório para acessar este endpoint.
Parâmetros da URL
string
required
ID do cliente a ser ativado. Esse parâmetro deve ser informado diretamente na URL.
Parâmetros do corpo da requisição (Payload)
string
required
Nome de usuário do cliente a ser ativado.
string
required
Senha do cliente.
number
required
Quantidade de créditos para ativação, onde cada crédito corresponde a um período específico:
- 0.5 Crédito → 15 dias
- 1 Crédito → 1 mês
- 2 Créditos → 2 meses
- 3 Créditos → 3 meses
- 5 Créditos → 180 dias
- 10 Créditos → 360 dias
string
Número de WhatsApp do cliente. Campo opcional.
string
required
País de origem do cliente.
string
Observações adicionais sobre o cliente. Campo opcional.
Exemplo de Requisição
PATCH https://api.revenda.nexus/lines/active/505
Headers:
{
"Authorization": "Bearer seu_token_aqui",
"Content-Type": "application/json"
}
Payload:
{
"username": "123456",
"password": "123456",
"credits": 1,
"whatsapp": "(12) 3 1231-2312",
"country": "Brasil",
"notes": "Ativação oficial"
}
Resposta
number
Indica o código HTTP da resposta. Esperado: 201 (Created).
object
Conteúdo da resposta.
Show Mostrar objeto
Show Mostrar objeto
number
Identificador único do cliente.
string
Nome de usuário do cliente.
string
Senha do cliente.
number
ID do proprietário responsável pelo cliente.
string
Data de expiração do período ativo do cliente.
number
Status da conta (1 para ativo).
number
Indica se o cliente é de teste (0 para cliente ativo).
string
Número de WhatsApp associado ao cliente.
string
País de origem do cliente.
string
Data de criação do cliente.
string
Data da última atualização do cliente.
Exemplo de Resposta
{
"id": 505,
"username": "123456",
"password": "123456",
"owner": 80,
"expDate": "2025-02-15T14:27:08.832Z",
"notes": "Ativação oficial",
"status": 1,
"isTrial": 0,
"whatsapp": "(12) 3 1231-2312",
"telegram": null,
"trash": 0,
"country": "Brasil",
"error_nexus": 0,
"idNexus": 8448,
"updated": 0,
"migrationUrl": null,
"lastTrust": null,
"email": null,
"createdAt": "2025-01-16T13:42:30.047Z",
"updatedAt": "2025-01-16T13:42:30.047Z"
}
⌘I

