PROD

This webservice is used to submit a general query, with no property involved. Basic data is requested and validated and also spam check is performed.

It is the form of your site's contact page: the visitor who is not asking about a specific listing, but about the agency. The query enters the agency's Mapaprop Inbox (the account that owns the token) as a lead, just like a listing query. The recipient is resolved from the token, it is not sent as a parameter.

There is a single difference from messages: propertyHash is not sent here. messages requires the ID of a published property, so it cannot serve a general query.

Resource information
AuthenticationRequired (API Token, Bearer)
Scopeexpress-base
HTTP MethodPOST
ResponseJSON
Version1

Resource URL

https://mapaprop.app/api/action/express-v1/contact

Parameters

KeyTypeRequiredDescription
userAgentstringyesThe real browser userAgent string. Required for spam check.
refererstringyesThe referer string requesting the question submition. Required for spam check.
ipstringyesThe IP of the user submitting the question. Required for spam check.
urlstringyesThe URL of the page the form was submitted from. Might be the same as the referer.
namestringyesName of the user submitting the query. Minimum 3 and maximum 100 characters.
emailstringorEmail of the user submitting the query. Either email or phone must be sent. Maximum 100 characters.
phonestringorPhone of the user submitting the query. Either email or phone must be sent. Maximum 100 characters.
messagestringyesText submitted by the user. Maximum 4000 characters.
subjectstringnoSubject of the email the agency receives. Maximum 200 characters. If it is not sent, the subject is Nueva consulta general de {name}.

Email or phone: either one is enough. Asking the visitor for both loses queries, so the API accepts either reply channel; if neither arrives, the response is REQUIRED_INPUT with the text Enter email or phone.

Sample code

POST /api/action/express-v1/contact HTTP/1.1
Host: mapaprop.app
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: Bearer {access_token}

userAgent=Mozilla%2F5.0%20%28X11%3B%20Linux%20x86_64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F32.0.1700.77%20Safari%2F537.36
&referer=https%3A%2F%2Fsomeinmo.com%2Fcontacto
&ip=85.33.65.69&url=https%3A%2F%2Fsomeinmo.com%2Fcontacto
&name=John%20Doe&email=john%40example.com&message=Quiero%20tasar%20mi%20departamento

Response

The JSON response indicates whether the query was submitted successfully. On error, it reports the reason: invalid or missing fields.

If the spam check considers the query suspicious, the response is successful as well and the lead stays in the moderation queue instead of entering the Inbox directly. This is deliberate: whoever submits spam is not told they were detected.

ObjectFieldTypeRequiredDescription
ResponsesuccessbooleanyesBoolean indicating whether the submission was successful or not
errorstringnoText indicating the error type if success == false
descriptionstringnoError detail if success == false

Sample response

{
    "success": false,
    "error": "REQUIRED_INPUT",
    "description": "Enter email or phone"
}