curl --request DELETE \
--url https://api.bigco.ai/api/v1/users/{user_id} \
--header 'x-bigco-hmac-sha256: <api-key>'import requests
url = "https://api.bigco.ai/api/v1/users/{user_id}"
headers = {"x-bigco-hmac-sha256": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-bigco-hmac-sha256': '<api-key>'}};
fetch('https://api.bigco.ai/api/v1/users/{user_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.bigco.ai/api/v1/users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.bigco.ai/api/v1/users/{user_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-bigco-hmac-sha256", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.bigco.ai/api/v1/users/{user_id}")
.header("x-bigco-hmac-sha256", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bigco.ai/api/v1/users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-bigco-hmac-sha256"] = '<api-key>'
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": "not_authenticated",
"msg": "HMAC signature verification failed"
}
}{
"detail": {
"type": "user_not_found",
"msg": "User with ID [1] not found."
}
}{
"detail": {
"type": "UNCAUGHT_ERROR",
"msg": "Internal server error"
}
}Delete a user
Deletes a user. The response returns the user with is_deleted set to true.
curl --request DELETE \
--url https://api.bigco.ai/api/v1/users/{user_id} \
--header 'x-bigco-hmac-sha256: <api-key>'import requests
url = "https://api.bigco.ai/api/v1/users/{user_id}"
headers = {"x-bigco-hmac-sha256": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-bigco-hmac-sha256': '<api-key>'}};
fetch('https://api.bigco.ai/api/v1/users/{user_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.bigco.ai/api/v1/users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.bigco.ai/api/v1/users/{user_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-bigco-hmac-sha256", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.bigco.ai/api/v1/users/{user_id}")
.header("x-bigco-hmac-sha256", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bigco.ai/api/v1/users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-bigco-hmac-sha256"] = '<api-key>'
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": "not_authenticated",
"msg": "HMAC signature verification failed"
}
}{
"detail": {
"type": "user_not_found",
"msg": "User with ID [1] not found."
}
}{
"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.
Path Parameters
The Sotto ID of the user to delete.
x >= 11
Response
The deleted 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