DEVELOPER GUIDE
API documentation
Base URL: https://api.citydial.in
Authentication
Send the device key in X-API-Key or as a Bearer token. Keys are shown once when created and stored hashed. Use HTTPS for every request.
Upload call logs
POST /api/v1/call-logs · JSON · maximum 500 records and 1 MiB per request.
{
"calls": [
{
"call_id": "android-calllog-row-id",
"phone_number": "+919876543210",
"contact_name": "Example Contact",
"call_type": "missed",
"started_at": "2026-11-04T10:20:30+05:30",
"duration_seconds": 0
}
]
}call_id, phone_number, call_type, and started_at are required. contact_name and duration_seconds are optional. Type must be missed, received, outgoing, or unknown. Timestamp must be ISO 8601 with a timezone. Repeated call IDs on the same device are ignored.
Example with cURL
curl -X POST https://api.citydial.in/api/v1/call-logs \ -H "Content-Type: application/json" \ -H "X-API-Key: cd_live_YOUR_DEVICE_KEY" \ --data-binary @calls.json
Response
HTTP/1.1 201 Created
{
"ok": true,
"received": 1,
"inserted": 1,
"duplicates": 0
}Errors
400invalid JSON or fields401invalid or revoked key405wrong method413body exceeds 1 MiB415content type is not JSON422more than 500 calls
Call records include phone numbers and may contain contact names. The Android app should ask the device owner's permission and explain syncing before it reads or uploads these records.
