API Reference
Complete reference for the AgentsAI REST API. All endpoints accept JSON, return JSON. Authentication via Bearer token. Base URL: https://agentsai.ae
Authentication
Every request must include your API key in one of two headers (use either, not both):
Authorization: Bearer ak_live_xxxxxxxxxxxxxxxx
X-API-Key: ak_live_xxxxxxxxxxxxxxxx
Keys start with the prefix ak_live_. Generate / revoke keys from your account page.
Rate limits
| Tier | Monthly calls | Concurrency | Bundled with |
|---|---|---|---|
| Trial | 100 lifetime | 1 req/s | Free signup |
| API Starter | 1,000 / month | 1 req/s | App Starter plan |
| API Pro | 5,000 / month | 3 req/s | App Pro plan |
| API Enterprise | 25,000 / month | 10 req/s | App Team plan |
Over-limit responses return HTTP 429 with Retry-After header.
Error codes
| HTTP | error code | Meaning |
|---|---|---|
| 400 | validation_error | Required field missing or invalid |
| 401 | unauthorized / invalid_key | Missing / invalid / revoked API key |
| 429 | monthly_limit_reached | Tier's monthly cap exhausted |
| 502 | generation_failed | Upstream AI temporarily unavailable; retry with backoff |
Endpoints
/api/v1/listingGenerate a property listing description (Bayut/Property Finder ready).
Request body
| Field | Type | Required |
|---|---|---|
| propertyType | string (enum) | yes |
| location | string | yes |
| bedrooms | integer | no |
| bathrooms | integer | no |
| sizeSqft | integer | no |
| building | string | no |
| price | integer (AED) | no |
| priceType | 'sale' | 'rent_yearly' | 'rent_monthly' | no |
| features | string[] | no |
| amenities | string[] | no |
| view | string | no |
| condition | string | no |
| tone | 'luxury' | 'family' | 'investment' | 'casual' | no |
| language | 'en' | 'ar' | 'both' | no |
| extra | string | no |
Response (200)
| Field | Type |
|---|---|
| output | string |
| tool | string |
| usage.tier | 'trial' | 'starter' | 'pro' | 'enterprise' |
| usage.monthly_limit | integer |
cURL example
curl -X POST https://agentsai.ae/api/v1/listing \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"propertyType":"Apartment","bedrooms":2,"sizeSqft":1450,"location":"Dubai Marina","price":2400000,"priceType":"sale","tone":"luxury","language":"en"}'/api/v1/emailGenerate a follow-up email (subject + body). 6 scenario presets.
Request body
| Field | Type | Required |
|---|---|---|
| scenario | string (enum) | yes |
| clientName | string | yes |
| property | string | no |
| details | string | no |
| agentName | string | no |
| language | 'en' | 'ar' | 'both' | no |
Response (200)
| Field | Type |
|---|---|
| output | string |
| tool | string |
| usage.tier | 'trial' | 'starter' | 'pro' | 'enterprise' |
| usage.monthly_limit | integer |
cURL example
curl -X POST https://agentsai.ae/api/v1/email \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"scenario":"viewing_confirm","clientName":"Layla","property":"2BR Marina","agentName":"Ahmed"}'/api/v1/whatsappGenerate a short, reply-worthy WhatsApp message (under 60 words).
Request body
| Field | Type | Required |
|---|---|---|
| scenario | string (enum) | yes |
| clientName | string | yes |
| property | string | no |
| details | string | no |
| agentName | string | no |
| language | 'en' | 'ar' | 'both' | no |
Response (200)
| Field | Type |
|---|---|
| output | string |
| tool | string |
| usage.tier | 'trial' | 'starter' | 'pro' | 'enterprise' |
| usage.monthly_limit | integer |
cURL example
curl -X POST https://agentsai.ae/api/v1/whatsapp \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"scenario":"first_outreach","clientName":"Mohammed","property":"3BR Palm villa"}'/api/v1/chatMulti-turn conversational AI. Stateless — client maintains history.
Request body
| Field | Type | Required |
|---|---|---|
| message | string | yes |
| history | {role,content}[] (max 30) | no |
| language | 'en' | 'ar' | 'both' | no |
Response (200)
| Field | Type |
|---|---|
| output | string |
| tool | string |
| usage.tier | 'trial' | 'starter' | 'pro' | 'enterprise' |
| usage.monthly_limit | integer |
cURL example
curl -X POST https://agentsai.ae/api/v1/chat \\
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \\
-d '{"message":"What is the 2026 rental yield in JVC?"}'/api/v1/cmaGenerate a Comparative Market Analysis report with comparables and price recommendation.
Request body
| Field | Type | Required |
|---|---|---|
| propertyType | string | yes |
| location | string | yes |
| sizeSqft | integer | yes |
| bedrooms | integer | no |
| building | string | no |
| view | string | no |
| condition | string | no |
| purpose | 'sale' | 'rent' | no |
| language | 'en' | 'ar' | 'both' | no |
Response (200)
| Field | Type |
|---|---|
| output | string |
| tool | string |
| usage.tier | 'trial' | 'starter' | 'pro' | 'enterprise' |
| usage.monthly_limit | integer |
cURL example
curl -X POST https://agentsai.ae/api/v1/cma \
-H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
-d '{"propertyType":"Apartment","location":"Downtown Dubai","sizeSqft":1100,"bedrooms":2,"purpose":"sale"}'More endpoints coming. Cold-call, persona, valuation, compliance, contract, brochure, photo→listing — all on the roadmap. Email us if you need a specific endpoint earlier.
Start building
Free signup includes 100 trial API calls. Upgrade for higher monthly limits.
Generate API key →