curl --request POST \
--url https://api.bevits.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "u_8842",
"email": "ana@exemplo.com.br",
"phone": "+5511988887777",
"name": "Ana Souza",
"attributes": {
"plano": "vip"
},
"consent": {
"email": true,
"whatsapp": true
}
}
'import requests
url = "https://api.bevits.com/v1/customers"
payload = {
"external_id": "u_8842",
"email": "ana@exemplo.com.br",
"phone": "+5511988887777",
"name": "Ana Souza",
"attributes": { "plano": "vip" },
"consent": {
"email": True,
"whatsapp": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'u_8842',
email: 'ana@exemplo.com.br',
phone: '+5511988887777',
name: 'Ana Souza',
attributes: {plano: 'vip'},
consent: {email: true, whatsapp: true}
})
};
fetch('https://api.bevits.com/v1/customers', 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.bevits.com/v1/customers",
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([
'external_id' => 'u_8842',
'email' => 'ana@exemplo.com.br',
'phone' => '+5511988887777',
'name' => 'Ana Souza',
'attributes' => [
'plano' => 'vip'
],
'consent' => [
'email' => true,
'whatsapp' => 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.bevits.com/v1/customers"
payload := strings.NewReader("{\n \"external_id\": \"u_8842\",\n \"email\": \"ana@exemplo.com.br\",\n \"phone\": \"+5511988887777\",\n \"name\": \"Ana Souza\",\n \"attributes\": {\n \"plano\": \"vip\"\n },\n \"consent\": {\n \"email\": true,\n \"whatsapp\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.bevits.com/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"u_8842\",\n \"email\": \"ana@exemplo.com.br\",\n \"phone\": \"+5511988887777\",\n \"name\": \"Ana Souza\",\n \"attributes\": {\n \"plano\": \"vip\"\n },\n \"consent\": {\n \"email\": true,\n \"whatsapp\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bevits.com/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"u_8842\",\n \"email\": \"ana@exemplo.com.br\",\n \"phone\": \"+5511988887777\",\n \"name\": \"Ana Souza\",\n \"attributes\": {\n \"plano\": \"vip\"\n },\n \"consent\": {\n \"email\": true,\n \"whatsapp\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "customer",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"html_url": "<string>",
"tags": [
{
"id": "<string>",
"name": "<string>"
}
],
"attributes": {},
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"source": "<string>",
"is_subscribed": true,
"is_subscribed_to_email": true,
"total_spent_in_cents": 123,
"total_orders": 123,
"first_purchase_date": "2023-11-07T05:31:56Z",
"last_purchase_date": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"identification": "<string>",
"default_address": {
"id": "<string>",
"street": "<string>",
"number": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zip_code": "<string>",
"neighborhood": "<string>",
"complement": "<string>"
}
}{
"object": "customer",
"id": "cus_ckabc123",
"name": "Ana Souza",
"email": "ana@exemplo.com.br",
"phone": "+5511988887777",
"source": "API",
"is_subscribed": true,
"is_subscribed_to_email": true,
"created_at": "2026-11-24T14:03:00.000Z",
"updated_at": "2026-11-24T14:03:00.000Z",
"html_url": "https://app.bevits.com/customers/ckabc123",
"external_id": "u_8842",
"tags": [],
"attributes": {
"plano": "vip"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "Invalid API key.",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}{
"error": {
"type": "permission_denied",
"code": "missing_scope",
"message": "This API key does not have the required \"write\" scope.",
"param": "scope",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
}
}{
"error": {
"type": "validation_error",
"code": "invalid_phone",
"message": "phone is not a valid number. Send it in E.164 (+5511988887777), or without a country code for a number in the store's country.",
"param": "phone",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
},
"retry_after": 2
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
}
}{
"error": {
"type": "service_unavailable",
"code": "temporarily_unavailable",
"message": "The request could not be confirmed right now. Retry it with the same Idempotency-Key: it is applied at most once.",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}Create customer
Adds a customer to the store’s base with at least one identifier: external_id, tax_id, email or phone. If one of them already belongs to an active customer (looked up in that order, as with events), that customer is returned unchanged, with 200, and nothing about it changes. A new customer is created with 201 and triggers the customer.created webhook, with the same object as the response. Without consent, the new customer has no marketing opt-in. No flow starts and no message is sent. Send Idempotency-Key to retry the request safely. Requires an API key with the write scope.
curl --request POST \
--url https://api.bevits.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "u_8842",
"email": "ana@exemplo.com.br",
"phone": "+5511988887777",
"name": "Ana Souza",
"attributes": {
"plano": "vip"
},
"consent": {
"email": true,
"whatsapp": true
}
}
'import requests
url = "https://api.bevits.com/v1/customers"
payload = {
"external_id": "u_8842",
"email": "ana@exemplo.com.br",
"phone": "+5511988887777",
"name": "Ana Souza",
"attributes": { "plano": "vip" },
"consent": {
"email": True,
"whatsapp": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'u_8842',
email: 'ana@exemplo.com.br',
phone: '+5511988887777',
name: 'Ana Souza',
attributes: {plano: 'vip'},
consent: {email: true, whatsapp: true}
})
};
fetch('https://api.bevits.com/v1/customers', 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.bevits.com/v1/customers",
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([
'external_id' => 'u_8842',
'email' => 'ana@exemplo.com.br',
'phone' => '+5511988887777',
'name' => 'Ana Souza',
'attributes' => [
'plano' => 'vip'
],
'consent' => [
'email' => true,
'whatsapp' => 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.bevits.com/v1/customers"
payload := strings.NewReader("{\n \"external_id\": \"u_8842\",\n \"email\": \"ana@exemplo.com.br\",\n \"phone\": \"+5511988887777\",\n \"name\": \"Ana Souza\",\n \"attributes\": {\n \"plano\": \"vip\"\n },\n \"consent\": {\n \"email\": true,\n \"whatsapp\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.bevits.com/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"u_8842\",\n \"email\": \"ana@exemplo.com.br\",\n \"phone\": \"+5511988887777\",\n \"name\": \"Ana Souza\",\n \"attributes\": {\n \"plano\": \"vip\"\n },\n \"consent\": {\n \"email\": true,\n \"whatsapp\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bevits.com/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"u_8842\",\n \"email\": \"ana@exemplo.com.br\",\n \"phone\": \"+5511988887777\",\n \"name\": \"Ana Souza\",\n \"attributes\": {\n \"plano\": \"vip\"\n },\n \"consent\": {\n \"email\": true,\n \"whatsapp\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "customer",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"html_url": "<string>",
"tags": [
{
"id": "<string>",
"name": "<string>"
}
],
"attributes": {},
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"source": "<string>",
"is_subscribed": true,
"is_subscribed_to_email": true,
"total_spent_in_cents": 123,
"total_orders": 123,
"first_purchase_date": "2023-11-07T05:31:56Z",
"last_purchase_date": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"identification": "<string>",
"default_address": {
"id": "<string>",
"street": "<string>",
"number": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zip_code": "<string>",
"neighborhood": "<string>",
"complement": "<string>"
}
}{
"object": "customer",
"id": "cus_ckabc123",
"name": "Ana Souza",
"email": "ana@exemplo.com.br",
"phone": "+5511988887777",
"source": "API",
"is_subscribed": true,
"is_subscribed_to_email": true,
"created_at": "2026-11-24T14:03:00.000Z",
"updated_at": "2026-11-24T14:03:00.000Z",
"html_url": "https://app.bevits.com/customers/ckabc123",
"external_id": "u_8842",
"tags": [],
"attributes": {
"plano": "vip"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "Invalid API key.",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}{
"error": {
"type": "permission_denied",
"code": "missing_scope",
"message": "This API key does not have the required \"write\" scope.",
"param": "scope",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
}
}{
"error": {
"type": "validation_error",
"code": "invalid_phone",
"message": "phone is not a valid number. Send it in E.164 (+5511988887777), or without a country code for a number in the store's country.",
"param": "phone",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
},
"retry_after": 2
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>",
"suggestion": "<string>"
}
}{
"error": {
"type": "service_unavailable",
"code": "temporarily_unavailable",
"message": "The request could not be confirmed right now. Retry it with the same Idempotency-Key: it is applied at most once.",
"request_id": "req_07f6cdc3c20249d6afcd90b4"
}
}Headers
Body
At least one of external_id, tax_id, email or phone. These are the same fields as the customer of an event.
Response
An active customer already had one of the identifiers sent. It is returned unchanged, nothing about it changes and no webhook is sent.