Update User Address
curl --request POST \
--url https://api.chessa.ai/v1/users/address \
--header 'Content-Type: application/json' \
--data '
{
"additional": "Apt 4B",
"city": "Lagos",
"country": "NG",
"postalCode": "105102",
"region": "LA",
"street": "821 Folashade Abike St"
}
'import requests
url = "https://api.chessa.ai/v1/users/address"
payload = {
"additional": "Apt 4B",
"city": "Lagos",
"country": "NG",
"postalCode": "105102",
"region": "LA",
"street": "821 Folashade Abike St"
}
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({
additional: 'Apt 4B',
city: 'Lagos',
country: 'NG',
postalCode: '105102',
region: 'LA',
street: '821 Folashade Abike St'
})
};
fetch('https://api.chessa.ai/v1/users/address', 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.chessa.ai/v1/users/address",
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([
'additional' => 'Apt 4B',
'city' => 'Lagos',
'country' => 'NG',
'postalCode' => '105102',
'region' => 'LA',
'street' => '821 Folashade Abike St'
]),
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.chessa.ai/v1/users/address"
payload := strings.NewReader("{\n \"additional\": \"Apt 4B\",\n \"city\": \"Lagos\",\n \"country\": \"NG\",\n \"postalCode\": \"105102\",\n \"region\": \"LA\",\n \"street\": \"821 Folashade Abike St\"\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.chessa.ai/v1/users/address")
.header("Content-Type", "application/json")
.body("{\n \"additional\": \"Apt 4B\",\n \"city\": \"Lagos\",\n \"country\": \"NG\",\n \"postalCode\": \"105102\",\n \"region\": \"LA\",\n \"street\": \"821 Folashade Abike St\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chessa.ai/v1/users/address")
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 \"additional\": \"Apt 4B\",\n \"city\": \"Lagos\",\n \"country\": \"NG\",\n \"postalCode\": \"105102\",\n \"region\": \"LA\",\n \"street\": \"821 Folashade Abike St\"\n}"
response = http.request(request)
puts response.read_body{
"address": {
"additional": "Apt 4B",
"city": "Lagos",
"country": "NG",
"createdAt": "2025-03-12T14:30:42.456Z",
"id": "b2c3d4e5-f6g7-8h9i-10j11-k12l13m14n15",
"postalCode": "105102",
"region": "LA",
"street": "821 Folashade Abike St",
"userId": "a1b2c3d4-e5f6-7g8h-9i10-j11k12l13m14"
},
"message": "Address added successfully"
}{
"details": [
{
"field": "street",
"message": "Street address is required"
}
],
"error": "validation_error",
"message": "Validation failed",
"statusCode": 400
}Users
Update User Address
Update address for current user.
POST
/
v1
/
users
/
address
Update User Address
curl --request POST \
--url https://api.chessa.ai/v1/users/address \
--header 'Content-Type: application/json' \
--data '
{
"additional": "Apt 4B",
"city": "Lagos",
"country": "NG",
"postalCode": "105102",
"region": "LA",
"street": "821 Folashade Abike St"
}
'import requests
url = "https://api.chessa.ai/v1/users/address"
payload = {
"additional": "Apt 4B",
"city": "Lagos",
"country": "NG",
"postalCode": "105102",
"region": "LA",
"street": "821 Folashade Abike St"
}
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({
additional: 'Apt 4B',
city: 'Lagos',
country: 'NG',
postalCode: '105102',
region: 'LA',
street: '821 Folashade Abike St'
})
};
fetch('https://api.chessa.ai/v1/users/address', 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.chessa.ai/v1/users/address",
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([
'additional' => 'Apt 4B',
'city' => 'Lagos',
'country' => 'NG',
'postalCode' => '105102',
'region' => 'LA',
'street' => '821 Folashade Abike St'
]),
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.chessa.ai/v1/users/address"
payload := strings.NewReader("{\n \"additional\": \"Apt 4B\",\n \"city\": \"Lagos\",\n \"country\": \"NG\",\n \"postalCode\": \"105102\",\n \"region\": \"LA\",\n \"street\": \"821 Folashade Abike St\"\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.chessa.ai/v1/users/address")
.header("Content-Type", "application/json")
.body("{\n \"additional\": \"Apt 4B\",\n \"city\": \"Lagos\",\n \"country\": \"NG\",\n \"postalCode\": \"105102\",\n \"region\": \"LA\",\n \"street\": \"821 Folashade Abike St\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chessa.ai/v1/users/address")
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 \"additional\": \"Apt 4B\",\n \"city\": \"Lagos\",\n \"country\": \"NG\",\n \"postalCode\": \"105102\",\n \"region\": \"LA\",\n \"street\": \"821 Folashade Abike St\"\n}"
response = http.request(request)
puts response.read_body{
"address": {
"additional": "Apt 4B",
"city": "Lagos",
"country": "NG",
"createdAt": "2025-03-12T14:30:42.456Z",
"id": "b2c3d4e5-f6g7-8h9i-10j11-k12l13m14n15",
"postalCode": "105102",
"region": "LA",
"street": "821 Folashade Abike St",
"userId": "a1b2c3d4-e5f6-7g8h-9i10-j11k12l13m14"
},
"message": "Address added successfully"
}{
"details": [
{
"field": "street",
"message": "Street address is required"
}
],
"error": "validation_error",
"message": "Validation failed",
"statusCode": 400
}Body
application/json
Was this page helpful?