curl --request POST \
--url https://api.bigco.ai/api/v1/users \
--header 'Content-Type: application/json' \
--header 'x-bigco-hmac-sha256: <api-key>' \
--data '
{
"phone_number": "+15551234567",
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane.doe@example.com",
"date_of_birth": "01/01/1990",
"messaging_consent": true,
"postal_code": "10001",
"custom_data": {
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": [
"running",
"swimming"
]
},
"channel": "MANYCHAT"
}
'import requests
url = "https://api.bigco.ai/api/v1/users"
payload = {
"phone_number": "+15551234567",
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane.doe@example.com",
"date_of_birth": "01/01/1990",
"messaging_consent": True,
"postal_code": "10001",
"custom_data": {
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": ["running", "swimming"]
},
"channel": "MANYCHAT"
}
headers = {
"x-bigco-hmac-sha256": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-bigco-hmac-sha256': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '+15551234567',
first_name: 'Jane',
last_name: 'Doe',
email_address: 'jane.doe@example.com',
date_of_birth: '01/01/1990',
messaging_consent: true,
postal_code: '10001',
custom_data: {loyalty_tier: 'Gold', loyalty_points: 1000, hobby: ['running', 'swimming']},
channel: 'MANYCHAT'
})
};
fetch('https://api.bigco.ai/api/v1/users', 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.bigco.ai/api/v1/users",
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([
'phone_number' => '+15551234567',
'first_name' => 'Jane',
'last_name' => 'Doe',
'email_address' => 'jane.doe@example.com',
'date_of_birth' => '01/01/1990',
'messaging_consent' => true,
'postal_code' => '10001',
'custom_data' => [
'loyalty_tier' => 'Gold',
'loyalty_points' => 1000,
'hobby' => [
'running',
'swimming'
]
],
'channel' => 'MANYCHAT'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-bigco-hmac-sha256: <api-key>"
],
]);
$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.bigco.ai/api/v1/users"
payload := strings.NewReader("{\n \"phone_number\": \"+15551234567\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email_address\": \"jane.doe@example.com\",\n \"date_of_birth\": \"01/01/1990\",\n \"messaging_consent\": true,\n \"postal_code\": \"10001\",\n \"custom_data\": {\n \"loyalty_tier\": \"Gold\",\n \"loyalty_points\": 1000,\n \"hobby\": [\n \"running\",\n \"swimming\"\n ]\n },\n \"channel\": \"MANYCHAT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-bigco-hmac-sha256", "<api-key>")
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.bigco.ai/api/v1/users")
.header("x-bigco-hmac-sha256", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+15551234567\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email_address\": \"jane.doe@example.com\",\n \"date_of_birth\": \"01/01/1990\",\n \"messaging_consent\": true,\n \"postal_code\": \"10001\",\n \"custom_data\": {\n \"loyalty_tier\": \"Gold\",\n \"loyalty_points\": 1000,\n \"hobby\": [\n \"running\",\n \"swimming\"\n ]\n },\n \"channel\": \"MANYCHAT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bigco.ai/api/v1/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-bigco-hmac-sha256"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"+15551234567\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email_address\": \"jane.doe@example.com\",\n \"date_of_birth\": \"01/01/1990\",\n \"messaging_consent\": true,\n \"postal_code\": \"10001\",\n \"custom_data\": {\n \"loyalty_tier\": \"Gold\",\n \"loyalty_points\": 1000,\n \"hobby\": [\n \"running\",\n \"swimming\"\n ]\n },\n \"channel\": \"MANYCHAT\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"phone_number": "+15551234567",
"date_created": "2024-01-01T12:00:00Z",
"date_last_updated": "2024-10-01T12:00:00Z",
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane.doe@example.com",
"date_of_birth": "01/01/1990",
"messaging_consent": true,
"custom_data": {
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": [
"running",
"swimming"
]
},
"location": {
"postal_code": "10001",
"city": "New York",
"county": "New York",
"state": "New York",
"state_code": "NY"
},
"is_deleted": false
}{
"detail": {
"type": "not_authenticated",
"msg": "HMAC signature verification failed"
}
}{
"detail": {
"type": "duplicate_record_found",
"msg": "Duplicate entry for '+15551234567'"
}
}{
"detail": {
"type": "invalid_phone_number",
"msg": "Invalid phone number [555-123-4567] provided."
}
}{
"detail": {
"type": "UNCAUGHT_ERROR",
"msg": "Internal server error"
}
}Create a user
Creates a new user. phone_number is required and must be unique for your brand.
curl --request POST \
--url https://api.bigco.ai/api/v1/users \
--header 'Content-Type: application/json' \
--header 'x-bigco-hmac-sha256: <api-key>' \
--data '
{
"phone_number": "+15551234567",
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane.doe@example.com",
"date_of_birth": "01/01/1990",
"messaging_consent": true,
"postal_code": "10001",
"custom_data": {
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": [
"running",
"swimming"
]
},
"channel": "MANYCHAT"
}
'import requests
url = "https://api.bigco.ai/api/v1/users"
payload = {
"phone_number": "+15551234567",
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane.doe@example.com",
"date_of_birth": "01/01/1990",
"messaging_consent": True,
"postal_code": "10001",
"custom_data": {
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": ["running", "swimming"]
},
"channel": "MANYCHAT"
}
headers = {
"x-bigco-hmac-sha256": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-bigco-hmac-sha256': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone_number: '+15551234567',
first_name: 'Jane',
last_name: 'Doe',
email_address: 'jane.doe@example.com',
date_of_birth: '01/01/1990',
messaging_consent: true,
postal_code: '10001',
custom_data: {loyalty_tier: 'Gold', loyalty_points: 1000, hobby: ['running', 'swimming']},
channel: 'MANYCHAT'
})
};
fetch('https://api.bigco.ai/api/v1/users', 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.bigco.ai/api/v1/users",
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([
'phone_number' => '+15551234567',
'first_name' => 'Jane',
'last_name' => 'Doe',
'email_address' => 'jane.doe@example.com',
'date_of_birth' => '01/01/1990',
'messaging_consent' => true,
'postal_code' => '10001',
'custom_data' => [
'loyalty_tier' => 'Gold',
'loyalty_points' => 1000,
'hobby' => [
'running',
'swimming'
]
],
'channel' => 'MANYCHAT'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-bigco-hmac-sha256: <api-key>"
],
]);
$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.bigco.ai/api/v1/users"
payload := strings.NewReader("{\n \"phone_number\": \"+15551234567\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email_address\": \"jane.doe@example.com\",\n \"date_of_birth\": \"01/01/1990\",\n \"messaging_consent\": true,\n \"postal_code\": \"10001\",\n \"custom_data\": {\n \"loyalty_tier\": \"Gold\",\n \"loyalty_points\": 1000,\n \"hobby\": [\n \"running\",\n \"swimming\"\n ]\n },\n \"channel\": \"MANYCHAT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-bigco-hmac-sha256", "<api-key>")
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.bigco.ai/api/v1/users")
.header("x-bigco-hmac-sha256", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone_number\": \"+15551234567\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email_address\": \"jane.doe@example.com\",\n \"date_of_birth\": \"01/01/1990\",\n \"messaging_consent\": true,\n \"postal_code\": \"10001\",\n \"custom_data\": {\n \"loyalty_tier\": \"Gold\",\n \"loyalty_points\": 1000,\n \"hobby\": [\n \"running\",\n \"swimming\"\n ]\n },\n \"channel\": \"MANYCHAT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bigco.ai/api/v1/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-bigco-hmac-sha256"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone_number\": \"+15551234567\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email_address\": \"jane.doe@example.com\",\n \"date_of_birth\": \"01/01/1990\",\n \"messaging_consent\": true,\n \"postal_code\": \"10001\",\n \"custom_data\": {\n \"loyalty_tier\": \"Gold\",\n \"loyalty_points\": 1000,\n \"hobby\": [\n \"running\",\n \"swimming\"\n ]\n },\n \"channel\": \"MANYCHAT\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"phone_number": "+15551234567",
"date_created": "2024-01-01T12:00:00Z",
"date_last_updated": "2024-10-01T12:00:00Z",
"first_name": "Jane",
"last_name": "Doe",
"email_address": "jane.doe@example.com",
"date_of_birth": "01/01/1990",
"messaging_consent": true,
"custom_data": {
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": [
"running",
"swimming"
]
},
"location": {
"postal_code": "10001",
"city": "New York",
"county": "New York",
"state": "New York",
"state_code": "NY"
},
"is_deleted": false
}{
"detail": {
"type": "not_authenticated",
"msg": "HMAC signature verification failed"
}
}{
"detail": {
"type": "duplicate_record_found",
"msg": "Duplicate entry for '+15551234567'"
}
}{
"detail": {
"type": "invalid_phone_number",
"msg": "Invalid phone number [555-123-4567] provided."
}
}{
"detail": {
"type": "UNCAUGHT_ERROR",
"msg": "Internal server error"
}
}Authorizations
Base64-encoded HMAC-SHA256 signature of the request. Every request must also include the x-bigco-hmac-username and x-date headers, and POST/PUT requests must include x-digest. See the Authentication guide for the full signing procedure.
Body
The user's phone number in E.164 format. Required and unique per brand.
20"+15551234567"
50"Jane"
50"Doe"
50"jane.doe@example.com"
Date of birth in MM/DD/YYYY format.
"01/01/1990"
true to opt the user in, false to opt them out, null for no preference.
true
The user's postal code. US ZIP codes only.
"10001"
Key/value pairs of custom data. Each key must match a configured custom data field name, lowercased and snake-cased (e.g. "Loyalty Tier" becomes loyalty_tier). Values may be a string, number, or array.
Show child attributes
Show child attributes
{
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": ["running", "swimming"]
}
The channel the user is entering Sotto from.
SHOPIFY, KLAVIYO, HANG, MANYCHAT, FILE "MANYCHAT"
Response
The created user.
The user's unique Sotto ID. Use this for update and delete requests.
1
The user's phone number in E.164 format.
"+15551234567"
UTC time when the user was created.
"2024-01-01T12:00:00Z"
UTC time when the user was last updated.
"2024-10-01T12:00:00Z"
50"Jane"
50"Doe"
50"jane.doe@example.com"
Date of birth in MM/DD/YYYY format.
"01/01/1990"
true if subscribed to messages, false if unsubscribed, null if the user has neither opted in nor opted out.
true
Key/value pairs of custom data. Each key must match a configured custom data field name, lowercased and snake-cased (e.g. "Loyalty Tier" becomes loyalty_tier). Values may be a string, number, or array.
Show child attributes
Show child attributes
{
"loyalty_tier": "Gold",
"loyalty_points": 1000,
"hobby": ["running", "swimming"]
}
A user's resolved location, derived from their postal code.
Show child attributes
Show child attributes
Whether the user has been deleted.
false