/v1/actions/upsert_contactCreate or update a contact
Finds the contact by phone, then by email, within the key’s scope and updates it (a new number is added, tags are added, an email is set only when the contact has none); otherwise creates it (a name is required). Needs `contacts:write`. Send an `Idempotency-Key`.
Access: API key with contacts:write, or a member session. Permission contacts.create.
Parameters
Idempotency-Keyheader- string
Unique key (a UUID) per logical request. A retry with the same key and body replays the first response for 24 hours (marked Idempotent-Replayed: true); the same key with another body is a 409.
Request body
phone- string or null
email- string or null
name- string or null
first_name- string or null
last_name- string or null
city- string or null
address- string or null
pincode- string or null
occupation- string or null
kinds- array of "buyer" | "tenant" | "owner" | "landlord" | "investor" | "broker" | …
tags- array of string
custom- map of any
Response · 200
datarequired- AutomationContactUpsert
metarequired- object
curl -X POST 'https://api.propzolo.com/v1/actions/upsert_contact' \
-H 'Authorization: Bearer pz_live_…' \
-H 'Idempotency-Key: 6c0f1d3e-…' \
-H 'Content-Type: application/json' \
-d '{"phone":"string","email":"string","name":"string","first_name":"string","last_name":"string","city":"string","address":"string","pincode":"string","occupation":"string","kinds":["buyer"],"tags":["string"],"custom":{}}'{
"data": {
"action": "created",
"contact_id": "cmusrceel0000q7kaafxqi1om",
"contact": {}
},
"meta": {}
}Errors
401No valid session or API key (missing, expired or revoked).403The caller lacks the permission, API-key scope or support grant this operation needs.409A unique value already exists, a concurrent change won, or the Idempotency-Key is still in use or was sent with a different request.422Invalid input; `error.fields` maps field paths to messages.429Too many requests; retry after the Retry-After header.500Unexpected error; quote `error.request_id` to support.

