INTEGRATIONS · REST API
How do you integrate Satik address verification?
Call Satik’s HTTPS REST endpoint from server-side code with a secret API key in the Authorization header and a JSON address body. The same contract works from Node.js, Python, PHP, or cURL. Keep the key out of browser code, check non-2xx responses, use an idempotency key for retries, and store the returned verification ID.
Last updated:
What must you do before using an example?
- Create a test or live key in the Satik dashboard.
- Store it as the server-side environment variable
SATIK_KEY. - Copy one example below and run it from a server or terminal.
- Read
verdict,flags, andrecommended_action.
How do you verify an address with cURL?
Send one JSON request to the public v1 endpoint. This example uses the documented address field and bearer authentication.
curl --fail-with-body https://api.satik.in/v1/addresses/verify \
-H "Authorization: Bearer $SATIK_KEY" \
-H "Content-Type: application/json" \
-d '{"address":"Flat 402, Sharma Apartments, MG Road, Bengaluru 560001"}'How do you verify an address with Node.js?
Send one JSON request to the public v1 endpoint. This example uses the documented address field and bearer authentication.
const response = await fetch("https://api.satik.in/v1/addresses/verify", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SATIK_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ address: "Flat 402, Sharma Apartments, MG Road, Bengaluru 560001" }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());How do you verify an address with Python?
Send one JSON request to the public v1 endpoint. This example uses the documented address field and bearer authentication.
import os, requests
response = requests.post(
"https://api.satik.in/v1/addresses/verify",
headers={"Authorization": f"Bearer {os.environ['SATIK_KEY']}"},
json={"address": "Flat 402, Sharma Apartments, MG Road, Bengaluru 560001"},
timeout=30,
)
response.raise_for_status()
print(response.json())How do you verify an address with PHP?
Send one JSON request to the public v1 endpoint. This example uses the documented address field and bearer authentication.
<?php
$ch = curl_init("https://api.satik.in/v1/addresses/verify");
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("SATIK_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["address" => "Flat 402, Sharma Apartments, MG Road, Bengaluru 560001"]),
]);
$result = curl_exec($ch);
if ($result === false) throw new Exception(curl_error($ch));
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) throw new Exception("HTTP request failed with status " . $status . ": " . $result);
echo $result;What should production code add?
Add a unique Idempotency-Key for safe retries of the same operation, set timeouts, log request IDs without logging secret keys, and handle 401, 402, 409, 422, 429, and 5xx responses. See errors and the idempotency guide.