curl --request POST \
--url https://api.useweve.com/v1/auth/admin/sign-up \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"phone": "(11) 91234-5678"
}
'import requests
url = "https://api.useweve.com/v1/auth/admin/sign-up"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"phone": "(11) 91234-5678"
}
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({
name: '<string>',
email: 'jsmith@example.com',
password: '<string>',
phone: '(11) 91234-5678'
})
};
fetch('https://api.useweve.com/v1/auth/admin/sign-up', 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.useweve.com/v1/auth/admin/sign-up",
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([
'name' => '<string>',
'email' => 'jsmith@example.com',
'password' => '<string>',
'phone' => '(11) 91234-5678'
]),
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.useweve.com/v1/auth/admin/sign-up"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"phone\": \"(11) 91234-5678\"\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.useweve.com/v1/auth/admin/sign-up")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"phone\": \"(11) 91234-5678\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useweve.com/v1/auth/admin/sign-up")
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 \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"phone\": \"(11) 91234-5678\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Criar conta
Abre a conta de quem administra. Não emite sessão — a conta só vale depois do link da caixa de entrada, e não pertence a club nenhum: o club vem depois.
curl --request POST \
--url https://api.useweve.com/v1/auth/admin/sign-up \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"phone": "(11) 91234-5678"
}
'import requests
url = "https://api.useweve.com/v1/auth/admin/sign-up"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"phone": "(11) 91234-5678"
}
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({
name: '<string>',
email: 'jsmith@example.com',
password: '<string>',
phone: '(11) 91234-5678'
})
};
fetch('https://api.useweve.com/v1/auth/admin/sign-up', 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.useweve.com/v1/auth/admin/sign-up",
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([
'name' => '<string>',
'email' => 'jsmith@example.com',
'password' => '<string>',
'phone' => '(11) 91234-5678'
]),
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.useweve.com/v1/auth/admin/sign-up"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"phone\": \"(11) 91234-5678\"\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.useweve.com/v1/auth/admin/sign-up")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"phone\": \"(11) 91234-5678\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useweve.com/v1/auth/admin/sign-up")
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 \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"phone\": \"(11) 91234-5678\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Body
1 - 200320Piso de 8 caracteres e nada mais: exigir símbolo e maiúscula empurra para senha curta e decorável, que é pior. O teto existe só para ninguém gastar a memória do hash mandando megabytes.
8 - 1024O celular, para onde vai o código de entrada pelo WhatsApp — depois
de confirmado: o cadastro manda para ele um código de seis dígitos,
resgatado em /v1/auth/admin/verify-phone. Aceita
o número como a pessoa o escreve — com ou sem máscara, com ou sem
+55 — e o guarda normalizado. Sem código de país, é tomado como
brasileiro, e aí tem que ser um celular: DDD e nove dígitos
começando em 9. Número que não passa responde 422 invalid_phone.
Opcional no contrato para um cliente antigo não passar a receber 400; o dashboard o pede. Num cadastro REPETIDO do mesmo e-mail ele é ignorado: trocar o celular de uma conta que já existe entregaria o próximo código a quem mandou o segundo cadastro.
32"(11) 91234-5678"
Response
Pedido aceito. A resposta é a mesma exista ou não a conta — o que acontece a seguir chega pela caixa de entrada, não por aqui.