REST API

REST API

您的系统以密钥创建者的身份读取 Realton 的项目库和您的 CRM,并写入客户、备注、任务和交易阶段。

Agency 套餐

快速开始

  1. 在 Realton 中,由所有者或管理员打开设置 › API 和 MCP,勾选 REST API,然后选择创建密钥。请立即复制:密钥只显示一次。
  2. 将密钥保存在服务器的环境变量中:
    export REALTON_API_KEY="rtk_live_…"
  3. 发起第一次调用:
    curl "https://realton.ai/api/v1/projects?place=Dubai&beds=2&limit=5" \
      -H "Authorization: Bearer $REALTON_API_KEY"

用 AI 来开发

如今大多数集成都由 AI 编写。把这两个地址和简短的任务说明交给它,其余内容它会自己读。

可复制的提示词,填好方括号中的内容:
我想把[我的网站 / 我的 CRM / 我的系统]接入 Realton 的 REST API。
请先阅读简介:https://realton.ai/docs/api.md
完整的 OpenAPI 文档:https://realton.ai/docs/openapi.json
我的技术栈:[例如,部署在 Vercel 上的 Next.js]。
我想实现:[例如,在我的网站上展示 Realton 的迪拜项目,每天刷新一次]。
API 密钥在环境变量 REALTON_API_KEY 中。不要向我索要密钥,也不要把它写进代码。

切勿把密钥粘贴到聊天中。请您自己在服务器上设置 REALTON_API_KEY,只告诉 AI 变量名。

规则

密钥

每次调用都在 Authorization 请求头中发送密钥。只有创建时勾选了 REST API 的密钥才能访问 REST API,且仅在工作区使用 Agency 套餐期间有效。

Authorization: Bearer rtk_live_…

调用以谁的身份执行

调用以创建密钥的成员身份执行,权限与其相同:经纪人只能访问自己的客户,所有者或管理员可以访问全公司的客户。该成员离开工作区后,密钥即失效。

限制

每个密钥每分钟最多 120 次调用。超出后会返回 429,附带 RATE_LIMITED 和 retryAfterSec:等待相应秒数后再调用。

分页

GET /projects 每次最多返回 100 个项目:limit 指定数量,offset 指定起始位置,total 表示总数。

各类 ID

项目标识来自 GET /projects,客户 ID 来自 GET /clients,交易 ID 来自客户卡片 GET /clients/{id} 中的 deals[].id。

不会向客户发送任何内容

任何调用都不会向客户发送内容:POST /brochures 返回一个链接,由经纪人发送。价格均为开发商的原价,使用开发商的货币。

拒绝响应

拒绝响应是带有固定 code 的 JSON。请根据 code 判断,不要根据消息文本判断。

{ "code": "plan_required" }
状态代码含义
401key_required没有携带密钥的 Authorization 请求头。
401key_invalid密钥无法识别或已被撤销。
403key_scope该密钥无法访问 REST API。请创建一个勾选了 REST API 的密钥。
403plan_required该工作区已不再使用 Agency 套餐。
403key_member_gone创建该密钥的人已离开工作区。请创建新密钥。
404not_found未找到,或该成员无权查看。
429RATE_LIMITED本分钟调用次数过多。请等待 retryAfterSec 秒。
400place_unknown, whatsapp_invalid, …字段超出范围,或取值无效。code 会指明是哪个字段。

参考

每个调用的字段和示例,与 OpenAPI 文档一致。

基础地址
https://realton.ai/api/v1

项目库

GET/projectsSearch the catalog

Projects that fit, newest first, with their price from. Up to 100 a page.

参数

名称类型说明
q
查询参数
string ≤ 120Words of a project's or a developer's name.
place
查询参数
string ≤ 80A city or an emirate, by name or slug: Dubai, Batumi, Limassol.
area
查询参数
string ≤ 80An area, by name or slug: Dubai Islands, JVC.
beds
查询参数
integer 0–9Bedrooms: 0 is a studio, 4 is four and more.
maxPrice
查询参数
numberThe most the client would pay, in currency.
currency
查询参数
stringThe currency of maxPrice.
handoverBy
查询参数
integer 2025–2045The latest handover year.
lang
查询参数
en | heThe language of place and area names.
limit
查询参数
integer 1–100How many projects in this page.
offset
查询参数
integerHow many to skip: the next page starts at offset + limit.

响应 200

名称类型说明
total必填integerHow many projects fit, across all pages.
offset必填integerThe offset of this page.
catalogDate必填stringThe day the catalog was last built, YYYY-MM-DD.
projects必填array

其中每一项

名称类型说明
keystringThe project key, for GET /projects/{key} and POST /brochures.
namestringThe project's name.
developerstring | nullThe developer's name.
marketae | cy | ge | om | saae, cy, ge, om or sa.
placestring | nullThe city or emirate.
areastring | nullThe area.
stageOFF_PLAN | UNDER_CONSTRUCTION | READYOFF_PLAN, UNDER_CONSTRUCTION or READY.
handoverstring | nullWhen it is handed over, as the developer says it: Q4 2028.
priceFromnumber | nullThe lowest price, in currency.
currencystringThe developer's currency: AED, EUR, USD, OMR, SAR.
bedroomsarrayThe bedroom counts it has; 0 is a studio.
commissionPctnumber | nullThe agent's commission, in percent.
photostring | nullA photo of it.
示例
{
  "total": 312,
  "offset": 0,
  "catalogDate": "2026-10-24",
  "projects": [
    {
      "key": "studio:soma-residences",
      "name": "Soma Residences",
      "developer": "Origami Properties",
      "market": "ae",
      "place": "Dubai",
      "area": "Dubai Islands",
      "stage": "OFF_PLAN",
      "handover": "Q4 2028",
      "priceFrom": 1670000,
      "currency": "AED",
      "bedrooms": [
        1,
        2,
        3
      ],
      "commissionPct": 5,
      "photo": "https://…/soma-residences.avif"
    }
  ]
}
curl
curl -X GET "https://realton.ai/api/v1/projects" \
  -H "Authorization: Bearer $REALTON_API_KEY"
GET/projects/{key}One project in full

Unit types with sizes and prices, payment plans, amenities, the gallery and what is nearby.

参数

名称类型说明
key必填
路径参数
stringThe project key from GET /projects.
lang
查询参数
en | heThe language of names, plans and amenities.

响应 200

名称类型说明
entryobjectIts catalog line: the same figures as GET /projects, with title for the name and slugs for place and area.
placeNamestring | nullThe city or emirate.
areaNamestring | nullThe area.
unitTypesarrayEach unit type: label, beds, available (from the inventory), sizeSqft, sizeSqm, priceFrom, currency, pricePerArea, areaUnit.
plansarrayPayment plans: each with its steps (label, timing, percent, phase) and its share before and after handover.
dldPctnumber | nullDubai's registration fee on booking, in percent; null elsewhere.
amenitiesarrayWhat the project offers.
galleryobjectcount, and images with their url.
nearbyarrayPlaces near it: category, name, km.
curl
curl -X GET "https://realton.ai/api/v1/projects/{key}" \
  -H "Authorization: Bearer $REALTON_API_KEY"

客户

GET/clientsYour clients

An agent's own clients; an owner's or an admin's, the agency's. Last active first.

参数

名称类型说明
q
查询参数
string ≤ 80A name, a number or an email to look for.

响应 200

名称类型说明
clients必填array

其中每一项

名称类型说明
idstringThe client id.
namestring | nullTheir name.
whatsappstring | nullTheir number.
emailstring | nullTheir email.
languagestring | nullThe language they speak.
sourcestringWhere they came from.
stageNEW | CONTACTED | VIEWING | EOI | BOOKED | WON | LOSTThe stage of their most advanced open deal.
projectstring | nullThe project of that deal.
lastActivityAtstringThe last thing that happened with them, ISO date-time.
ownerUserIdstringThe member they belong to.
openTasksintegerTheir open tasks.
curl
curl -X GET "https://realton.ai/api/v1/clients" \
  -H "Authorization: Bearer $REALTON_API_KEY"
POST/clientsA new client

A name and at least one way to reach them is the usual; a name alone is accepted.

请求体

名称类型说明
name必填string ≤ 120Their full name.
whatsappstring ≤ 30A number with its country code, +971 50 555 0147.
emailstring ≤ 200An email address.
languagestring ≤ 5The language they speak, a two-letter code: en, ar, he, ru…
示例
{
  "name": "Elena Petrova",
  "whatsapp": "+971505550147",
  "language": "ru"
}

响应 201

名称类型说明
idstringThe client id.
namestring | nullTheir name.
languagestring | nullThe language they speak.
whatsappstring | nullTheir number, E.164.
emailstring | nullTheir email.
ownerUserIdstringThe member they belong to.
updatedAtstringISO date-time.
curl
curl -X POST "https://realton.ai/api/v1/clients" \
  -H "Authorization: Bearer $REALTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Elena Petrova","whatsapp":"+971505550147","language":"ru"}'
GET/clients/{id}A client's card

Their details, what they are looking for, and their deals with each deal's id for PATCH /deals/{id}.

参数

名称类型说明
id必填
路径参数
stringThe client id from GET /clients.
lang
查询参数
en | heThe language of place names.

响应 200

名称类型说明
idstringThe client id.
namestring | nullTheir name.
whatsappstring | nullTheir number.
emailstring | nullTheir email.
languagestring | nullThe language they speak.
requirementsobjectWhat they are looking for: places, bedrooms, budget, handover.
ownerNamestring | nullThe member they belong to.
dealsarrayTheir deals: id, stage, projectKey, projectTitle, beds, unitLabel, price, currency, commissionPct, commission, lostReason.
curl
curl -X GET "https://realton.ai/api/v1/clients/{id}" \
  -H "Authorization: Bearer $REALTON_API_KEY"
POST/clients/{id}/notesA note on a client's card

Free text on the client's timeline, as the member.

参数

名称类型说明
id必填
路径参数
stringThe client id.

请求体

名称类型说明
text必填string ≤ 4000The note.
示例
{
  "text": "Wants a sea view, budget AED 2M, moving in 2028."
}

响应 201

名称类型说明
id必填stringThe note id.
curl
curl -X POST "https://realton.ai/api/v1/clients/{id}/notes" \
  -H "Authorization: Bearer $REALTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Wants a sea view, budget AED 2M, moving in 2028."}'

任务

GET/tasksYour tasks

The member's own tasks, with how many there are in each scope.

参数

名称类型说明
scope
查询参数
open | overdue | today | upcoming | someday | doneopen is every task not done.

响应 200

名称类型说明
tasks必填array
counts必填objectHow many tasks in overdue, today, upcoming, someday and done.

其中每一项

名称类型说明
idstringThe task id.
titlestringWhat to do.
notestring | nullMore words about it.
dueAtstring | nullWhen, ISO date-time.
dueKindAT | DAY | NONEAT, DAY or NONE.
doneAtstring | nullWhen it was done.
scopeoverdue | today | upcoming | someday | doneWhere it stands now, in the member's time zone.
contactobject | nullThe client it is for: id and name.
dealIdstring | nullThe deal it belongs to.
curl
curl -X GET "https://realton.ai/api/v1/tasks" \
  -H "Authorization: Bearer $REALTON_API_KEY"
POST/tasksA new task

A task at a time, on a day, or with no date; for a client when clientId is given.

请求体

名称类型说明
title必填string ≤ 200What to do.
notestring ≤ 2000More words about it.
dueAtstring ≤ 40When: an ISO date-time with its offset, 2026-10-25T11:00:00+04:00. With dueKind DAY, any time on that day.
dueKindAT | DAY | NONEAT for a time, DAY for a whole day, NONE for no date.
clientIdstringThe client the task is for.
示例
{
  "title": "Call Elena about Soma Residences",
  "dueAt": "2026-10-25T11:00:00+04:00",
  "dueKind": "AT",
  "clientId": "cm2x8k1qz0001abcdeffghijk"
}

响应 201

名称类型说明
idstringThe task id.
titlestringWhat to do.
notestring | nullMore words about it.
dueAtstring | nullWhen, ISO date-time.
dueKindAT | DAY | NONEAT, DAY or NONE.
doneAtstring | nullWhen it was done.
scopeoverdue | today | upcoming | someday | doneWhere it stands now, in the member's time zone.
contactobject | nullThe client it is for: id and name.
dealIdstring | nullThe deal it belongs to.
curl
curl -X POST "https://realton.ai/api/v1/tasks" \
  -H "Authorization: Bearer $REALTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Call Elena about Soma Residences","dueAt":"2026-10-25T11:00:00+04:00","dueKind":"AT","clientId":"cm2x8k1qz0001abcdeffghijk"}'

交易

PATCH/deals/{id}Move a deal's stage

A deal's id is on its client's card (GET /clients/{id}, deals[].id).

参数

名称类型说明
id必填
路径参数
stringThe deal id.

请求体

名称类型说明
stage必填NEW | CONTACTED | VIEWING | EOI | BOOKED | WON | LOSTThe new stage.
lostReasonstring ≤ 200Why it was lost; read only with LOST.
示例
{
  "stage": "VIEWING"
}

响应 200

名称类型说明
ok必填boolean
curl
curl -X PATCH "https://realton.ai/api/v1/deals/{id}" \
  -H "Authorization: Bearer $REALTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stage":"VIEWING"}'

宣传册

POST/brochuresA brochure link

A brochure of a project in your brand, with open tracking, for the agent to send. Realton does not send it.

请求体

名称类型说明
project必填stringThe project key.
clientIdstringThe client it is for: their opens show on their card.
lang必填en | heThe language of the brochure.
示例
{
  "project": "studio:soma-residences",
  "clientId": "cm2x8k1qz0001abcdeffghijk",
  "lang": "en"
}

响应 201

名称类型说明
id必填stringThe link id.
url必填stringThe address to send: it opens the brochure in the agency's brand.
project必填stringThe project name.
lang必填stringThe language of the brochure.
client必填string | nullThe client's name, when it is for one.
示例
{
  "id": "cm2x9p0aa0002abcdeffghijk",
  "url": "https://realton.ai/b/Hk3…",
  "project": "Soma Residences",
  "lang": "en",
  "client": "Elena Petrova"
}
curl
curl -X POST "https://realton.ai/api/v1/brochures" \
  -H "Authorization: Bearer $REALTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project":"studio:soma-residences","clientId":"cm2x8k1qz0001abcdeffghijk","lang":"en"}'