{"openapi":"3.1.0","info":{"title":"The Yellow Page API","version":"v1"},"servers":[{"url":"https://api.yellowecuador.com/api/public/v1"}],"tags":[{"name":"meta"},{"name":"reference"},{"name":"listings"},{"name":"leads"},{"name":"appointments"},{"name":"webhooks"}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["meta"],"summary":"The key in use, its scopes and its rate limit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"apiVersion":{"type":"string"},"key":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["listings:read","listings:write","leads:read","leads:write","appointments:read","webhooks:manage"]}},"expiresAt":{"type":["string","null"]}},"required":["id","name","prefix","scopes","expiresAt"],"additionalProperties":false},"brokerage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"rateLimit":{"type":"object","properties":{"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"windowSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["limit","windowSeconds"],"additionalProperties":false}},"required":["apiVersion","key","brokerage","rateLimit"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"any"}},"/openapi.json":{"get":{"operationId":"getOpenApi","tags":["meta"],"summary":"This API as an OpenAPI 3.1 document","responses":{"200":{"description":"OK"}},"security":[],"x-scope":"none"}},"/reference/provinces":{"get":{"operationId":"listProvinces","tags":["reference"],"summary":"Provinces (INEC codes)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"any"}},"/reference/cantons":{"get":{"operationId":"listCantons","tags":["reference"],"summary":"Cantons, optionally of one province","parameters":[{"name":"provinceCode","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{2}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"provinceCode":{"type":"string"}},"required":["code","name","provinceCode"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"any"}},"/reference/parishes":{"get":{"operationId":"listParishes","tags":["reference"],"summary":"Parishes of one canton","parameters":[{"name":"cantonCode","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"cantonCode":{"type":"string"}},"required":["code","name","cantonCode"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"any"}},"/reference/property-types":{"get":{"operationId":"listPropertyTypes","tags":["reference"],"summary":"Property types allowed per category","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"propertyTypes":{"type":"array","items":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]}}},"required":["category","propertyTypes"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"any"}},"/reference/features":{"get":{"operationId":"listFeatures","tags":["reference"],"summary":"Feature codes a listing may carry","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"any"}},"/listings":{"get":{"operationId":"listListings","tags":["listings"],"summary":"The brokerage's listings, any status, newest first","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reference":{"type":"string"},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]},"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"type":["number","null"]},"provinceCode":{"type":["string","null"]},"provinceName":{"type":["string","null"]},"cantonCode":{"type":["string","null"]},"cantonName":{"type":["string","null"]},"parishCode":{"type":["string","null"]},"parishName":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"showExactLocation":{"type":"boolean"},"bedrooms":{"type":["number","null"]},"bathrooms":{"type":["number","null"]},"halfBathrooms":{"type":["number","null"]},"parkingSpaces":{"type":["number","null"]},"areaM2":{"type":["number","null"]},"lotAreaM2":{"type":["number","null"]},"floors":{"type":["number","null"]},"floorNumber":{"type":["number","null"]},"yearBuilt":{"type":["number","null"]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"type":["string","null"]},"deliveryDate":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"virtualTourUrl":{"type":["string","null"]},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"shortCode":{"type":"string"},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"type":["number","null"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}},"publishIssues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","slug","url","status","operation","category","propertyType","title","description","price","priceNegotiable","hoaFee","provinceCode","provinceName","cantonCode","cantonName","parishCode","parishName","addressLine","neighborhood","lat","lng","showExactLocation","bedrooms","bathrooms","halfBathrooms","parkingSpaces","areaM2","lotAreaM2","floors","floorNumber","yearBuilt","furnished","petsAllowed","features","projectName","deliveryDate","videoUrl","virtualTourUrl","officeId","shortCode","pricePeriod","priceOnRequest","seismicCondition","seismicYear","owner","media","publishIssues","publishedAt","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.\n\n`invalid_cursor` — The cursor does not belong to this list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:read"},"post":{"operationId":"createListing","tags":["listings"],"summary":"Create a draft listing","description":"The listing is created as a draft owned by the key's acting owner, or by `ownerId`. It is published with a separate call, under the same rules and plan limits as in the dashboard. A brokerage may create 600 listings an hour through the API (more with a higher rate agreed in its contract; past it, 429) and hold 500 drafts made through the API (2 000 with bulk import; past it, 409 `too_many_drafts`). Neither uses the owner's own budget in the dashboard.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string","minLength":3,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"price":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":100000000000,"multipleOf":0.01},{"type":"null"}]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"anyOf":[{"type":"number","minimum":0,"maximum":100000000,"multipleOf":0.01},{"type":"null"}]},"provinceCode":{"anyOf":[{"type":"string","pattern":"^\\d{2}$"},{"type":"null"}]},"cantonCode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]},"parishCode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"type":"null"}]},"addressLine":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"neighborhood":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"lat":{"anyOf":[{"type":"number","minimum":-5.1,"maximum":1.7},{"type":"null"}]},"lng":{"anyOf":[{"type":"number","minimum":-92.1,"maximum":-75.1},{"type":"null"}]},"showExactLocation":{"type":"boolean"},"bedrooms":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"bathrooms":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"halfBathrooms":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"parkingSpaces":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"areaM2":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":10000000},{"type":"null"}]},"lotAreaM2":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000000},{"type":"null"}]},"floors":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"floorNumber":{"anyOf":[{"type":"integer","minimum":-5,"maximum":200},{"type":"null"}]},"yearBuilt":{"anyOf":[{"type":"integer","minimum":1800,"maximum":2031},{"type":"null"}]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"maxItems":25,"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"videoUrl":{"anyOf":[{"type":"string","maxLength":300,"format":"uri"},{"type":"null"}]},"virtualTourUrl":{"anyOf":[{"type":"string","maxLength":300,"format":"uri"},{"type":"null"}]},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"anyOf":[{"type":"integer","minimum":1900,"maximum":2027},{"type":"null"}]},"ownerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["operation","category","propertyType","title"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reference":{"type":"string"},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]},"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"type":["number","null"]},"provinceCode":{"type":["string","null"]},"provinceName":{"type":["string","null"]},"cantonCode":{"type":["string","null"]},"cantonName":{"type":["string","null"]},"parishCode":{"type":["string","null"]},"parishName":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"showExactLocation":{"type":"boolean"},"bedrooms":{"type":["number","null"]},"bathrooms":{"type":["number","null"]},"halfBathrooms":{"type":["number","null"]},"parkingSpaces":{"type":["number","null"]},"areaM2":{"type":["number","null"]},"lotAreaM2":{"type":["number","null"]},"floors":{"type":["number","null"]},"floorNumber":{"type":["number","null"]},"yearBuilt":{"type":["number","null"]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"type":["string","null"]},"deliveryDate":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"virtualTourUrl":{"type":["string","null"]},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"shortCode":{"type":"string"},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"type":["number","null"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}},"publishIssues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","slug","url","status","operation","category","propertyType","title","description","price","priceNegotiable","hoaFee","provinceCode","provinceName","cantonCode","cantonName","parishCode","parishName","addressLine","neighborhood","lat","lng","showExactLocation","bedrooms","bathrooms","halfBathrooms","parkingSpaces","areaM2","lotAreaM2","floors","floorNumber","yearBuilt","furnished","petsAllowed","features","projectName","deliveryDate","videoUrl","virtualTourUrl","officeId","shortCode","pricePeriod","priceOnRequest","seismicCondition","seismicYear","owner","media","publishIssues","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`too_many_drafts` — The brokerage holds 500 drafts made through the API (2 000 with bulk import); publish or delete some first.\n\n`idempotency_in_progress` — A request with this Idempotency-Key is still running.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`unknown_geo` — Unknown or inconsistent province / canton / parish.\n\n`not_a_member` — `ownerId` is not an active professional member of the brokerage.\n\n`idempotency_key_reused` — This Idempotency-Key was used with a different request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:write"}},"/listings/{id}":{"get":{"operationId":"getListing","tags":["listings"],"summary":"One listing","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reference":{"type":"string"},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]},"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"type":["number","null"]},"provinceCode":{"type":["string","null"]},"provinceName":{"type":["string","null"]},"cantonCode":{"type":["string","null"]},"cantonName":{"type":["string","null"]},"parishCode":{"type":["string","null"]},"parishName":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"showExactLocation":{"type":"boolean"},"bedrooms":{"type":["number","null"]},"bathrooms":{"type":["number","null"]},"halfBathrooms":{"type":["number","null"]},"parkingSpaces":{"type":["number","null"]},"areaM2":{"type":["number","null"]},"lotAreaM2":{"type":["number","null"]},"floors":{"type":["number","null"]},"floorNumber":{"type":["number","null"]},"yearBuilt":{"type":["number","null"]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"type":["string","null"]},"deliveryDate":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"virtualTourUrl":{"type":["string","null"]},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"shortCode":{"type":"string"},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"type":["number","null"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}},"publishIssues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","slug","url","status","operation","category","propertyType","title","description","price","priceNegotiable","hoaFee","provinceCode","provinceName","cantonCode","cantonName","parishCode","parishName","addressLine","neighborhood","lat","lng","showExactLocation","bedrooms","bathrooms","halfBathrooms","parkingSpaces","areaM2","lotAreaM2","floors","floorNumber","yearBuilt","furnished","petsAllowed","features","projectName","deliveryDate","videoUrl","virtualTourUrl","officeId","shortCode","pricePeriod","priceOnRequest","seismicCondition","seismicYear","owner","media","publishIssues","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:read"},"patch":{"operationId":"updateListing","tags":["listings"],"summary":"Change a listing's content","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string","minLength":3,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"price":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":100000000000,"multipleOf":0.01},{"type":"null"}]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"anyOf":[{"type":"number","minimum":0,"maximum":100000000,"multipleOf":0.01},{"type":"null"}]},"provinceCode":{"anyOf":[{"type":"string","pattern":"^\\d{2}$"},{"type":"null"}]},"cantonCode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]},"parishCode":{"anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"type":"null"}]},"addressLine":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"neighborhood":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"lat":{"anyOf":[{"type":"number","minimum":-5.1,"maximum":1.7},{"type":"null"}]},"lng":{"anyOf":[{"type":"number","minimum":-92.1,"maximum":-75.1},{"type":"null"}]},"showExactLocation":{"type":"boolean"},"bedrooms":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"bathrooms":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"halfBathrooms":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"parkingSpaces":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"areaM2":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":10000000},{"type":"null"}]},"lotAreaM2":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000000},{"type":"null"}]},"floors":{"anyOf":[{"type":"integer","minimum":0,"maximum":99},{"type":"null"}]},"floorNumber":{"anyOf":[{"type":"integer","minimum":-5,"maximum":200},{"type":"null"}]},"yearBuilt":{"anyOf":[{"type":"integer","minimum":1800,"maximum":2031},{"type":"null"}]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"maxItems":25,"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"deliveryDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"videoUrl":{"anyOf":[{"type":"string","maxLength":300,"format":"uri"},{"type":"null"}]},"virtualTourUrl":{"anyOf":[{"type":"string","maxLength":300,"format":"uri"},{"type":"null"}]},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"anyOf":[{"type":"integer","minimum":1900,"maximum":2027},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reference":{"type":"string"},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]},"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"type":["number","null"]},"provinceCode":{"type":["string","null"]},"provinceName":{"type":["string","null"]},"cantonCode":{"type":["string","null"]},"cantonName":{"type":["string","null"]},"parishCode":{"type":["string","null"]},"parishName":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"showExactLocation":{"type":"boolean"},"bedrooms":{"type":["number","null"]},"bathrooms":{"type":["number","null"]},"halfBathrooms":{"type":["number","null"]},"parkingSpaces":{"type":["number","null"]},"areaM2":{"type":["number","null"]},"lotAreaM2":{"type":["number","null"]},"floors":{"type":["number","null"]},"floorNumber":{"type":["number","null"]},"yearBuilt":{"type":["number","null"]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"type":["string","null"]},"deliveryDate":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"virtualTourUrl":{"type":["string","null"]},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"shortCode":{"type":"string"},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"type":["number","null"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}},"publishIssues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","slug","url","status","operation","category","propertyType","title","description","price","priceNegotiable","hoaFee","provinceCode","provinceName","cantonCode","cantonName","parishCode","parishName","addressLine","neighborhood","lat","lng","showExactLocation","bedrooms","bathrooms","halfBathrooms","parkingSpaces","areaM2","lotAreaM2","floors","floorNumber","yearBuilt","furnished","petsAllowed","features","projectName","deliveryDate","videoUrl","virtualTourUrl","officeId","shortCode","pricePeriod","priceOnRequest","seismicCondition","seismicYear","owner","media","publishIssues","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`unknown_geo` — Unknown or inconsistent province / canton / parish.\n\n`listing_incomplete` — The listing lacks what publishing requires; `errors` lists it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:write"}},"/listings/{id}/publish":{"post":{"operationId":"publishListing","tags":["listings"],"summary":"Publish a draft","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reference":{"type":"string"},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]},"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"type":["number","null"]},"provinceCode":{"type":["string","null"]},"provinceName":{"type":["string","null"]},"cantonCode":{"type":["string","null"]},"cantonName":{"type":["string","null"]},"parishCode":{"type":["string","null"]},"parishName":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"showExactLocation":{"type":"boolean"},"bedrooms":{"type":["number","null"]},"bathrooms":{"type":["number","null"]},"halfBathrooms":{"type":["number","null"]},"parkingSpaces":{"type":["number","null"]},"areaM2":{"type":["number","null"]},"lotAreaM2":{"type":["number","null"]},"floors":{"type":["number","null"]},"floorNumber":{"type":["number","null"]},"yearBuilt":{"type":["number","null"]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"type":["string","null"]},"deliveryDate":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"virtualTourUrl":{"type":["string","null"]},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"shortCode":{"type":"string"},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"type":["number","null"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}},"publishIssues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","slug","url","status","operation","category","propertyType","title","description","price","priceNegotiable","hoaFee","provinceCode","provinceName","cantonCode","cantonName","parishCode","parishName","addressLine","neighborhood","lat","lng","showExactLocation","bedrooms","bathrooms","halfBathrooms","parkingSpaces","areaM2","lotAreaM2","floors","floorNumber","yearBuilt","furnished","petsAllowed","features","projectName","deliveryDate","videoUrl","virtualTourUrl","officeId","shortCode","pricePeriod","priceOnRequest","seismicCondition","seismicYear","owner","media","publishIssues","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"`plan_limit_reached` — A limit of the plan was reached (active listings).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`invalid_transition` — The listing cannot go from its status to the one asked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`listing_incomplete` — The listing lacks what publishing requires; `errors` lists it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:write"}},"/listings/{id}/status":{"post":{"operationId":"setListingStatus","tags":["listings"],"summary":"Pause, resume, mark sold or rented, archive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED","DRAFT"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"reference":{"type":"string"},"slug":{"type":["string","null"]},"url":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","SOLD","RENTED","ARCHIVED"]},"operation":{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},"category":{"type":"string","enum":["RESIDENTIAL","COMMERCIAL","LAND","NEW_CONSTRUCTION"]},"propertyType":{"type":"string","enum":["HOUSE","APARTMENT","SUITE","PENTHOUSE","TOWNHOUSE","FARM","OFFICE","RETAIL","WAREHOUSE","BUILDING","HOTEL","LAND"]},"title":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":["number","null"]},"priceNegotiable":{"type":"boolean"},"hoaFee":{"type":["number","null"]},"provinceCode":{"type":["string","null"]},"provinceName":{"type":["string","null"]},"cantonCode":{"type":["string","null"]},"cantonName":{"type":["string","null"]},"parishCode":{"type":["string","null"]},"parishName":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"neighborhood":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"showExactLocation":{"type":"boolean"},"bedrooms":{"type":["number","null"]},"bathrooms":{"type":["number","null"]},"halfBathrooms":{"type":["number","null"]},"parkingSpaces":{"type":["number","null"]},"areaM2":{"type":["number","null"]},"lotAreaM2":{"type":["number","null"]},"floors":{"type":["number","null"]},"floorNumber":{"type":["number","null"]},"yearBuilt":{"type":["number","null"]},"furnished":{"type":"boolean"},"petsAllowed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string","enum":["POOL","GYM","BBQ","GARDEN","TERRACE","BALCONY","ELEVATOR","SECURITY_24H","GATED_COMMUNITY","AIR_CONDITIONING","HEATING","FIREPLACE","LAUNDRY","STORAGE","FURNISHED","PET_FRIENDLY","SOLAR_PANELS","WATER_TANK","GENERATOR","PLAYGROUND","VIEW_CITY","VIEW_MOUNTAIN","VIEW_OCEAN","VIEW_RIVER","PARKING_VISITORS","DISABLED_ACCESS"]}},"projectName":{"type":["string","null"]},"deliveryDate":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"virtualTourUrl":{"type":["string","null"]},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"shortCode":{"type":"string"},"pricePeriod":{"anyOf":[{"type":"string","enum":["NIGHT","WEEK","MONTH"]},{"type":"null"}]},"priceOnRequest":{"type":"boolean"},"seismicCondition":{"type":"string","enum":["NOT_STATED","NO_VISIBLE_DAMAGE","INSPECTED","REPAIRED"]},"seismicYear":{"type":["number","null"]},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}},"publishIssues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","slug","url","status","operation","category","propertyType","title","description","price","priceNegotiable","hoaFee","provinceCode","provinceName","cantonCode","cantonName","parishCode","parishName","addressLine","neighborhood","lat","lng","showExactLocation","bedrooms","bathrooms","halfBathrooms","parkingSpaces","areaM2","lotAreaM2","floors","floorNumber","yearBuilt","furnished","petsAllowed","features","projectName","deliveryDate","videoUrl","virtualTourUrl","officeId","shortCode","pricePeriod","priceOnRequest","seismicCondition","seismicYear","owner","media","publishIssues","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"`plan_limit_reached` — A limit of the plan was reached (active listings).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`invalid_transition` — The listing cannot go from its status to the one asked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`listing_incomplete` — The listing lacks what publishing requires; `errors` lists it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:write"}},"/listings/{id}/media":{"post":{"operationId":"importListingMedia","tags":["listings"],"summary":"Add a photo from a URL","description":"The image is downloaded over https from the public internet (JPEG, PNG or WebP, up to 10 MB), then processed like an upload: metadata is removed and the sizes are generated. `status` is PROCESSING until that is done.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"caption":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"caption":{"type":["string","null"]},"status":{"type":"string","enum":["PROCESSING","READY","FAILED"]},"url":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"error":{"type":["string","null"]}},"required":["id","position","caption","status","url","width","height","error"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`unsafe_url` — The URL is not an https address on the public internet.\n\n`fetch_failed` — The image could not be downloaded.\n\n`not_an_image` — The file is not a JPEG, PNG or WebP image.\n\n`too_large` — The image is larger than 10 MB.\n\n`media_limit` — A listing holds at most 30 images.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`outbound_busy` — Our outbound capacity is momentarily full; retry after `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"listings:write"}},"/leads":{"get":{"operationId":"listLeads","tags":["leads"],"summary":"The brokerage's leads, newest first","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"stage","in":"query","required":false,"schema":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"stage":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]},"source":{"type":"string","enum":["INQUIRY","CHAT","SHOWING_REQUEST","APPOINTMENT","MANUAL","IMPORT","LISTING","VALUATION","WHATSAPP","API"]},"tags":{"type":"array","items":{"type":"string"}},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"listingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"budgetMin":{"type":["number","null"]},"budgetMax":{"type":["number","null"]},"operation":{"anyOf":[{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},{"type":"null"}]},"lostReason":{"anyOf":[{"type":"string","enum":["PRICE","FINANCING","CHOSE_OTHER","NOT_RESPONSIVE","NOT_QUALIFIED","TIMING","OTHER"]},{"type":"null"}]},"locale":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stageChangedAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","email","phone","stage","source","tags","owner","listingIds","officeId","budgetMin","budgetMax","operation","lostReason","locale","version","stageChangedAt","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.\n\n`invalid_cursor` — The cursor does not belong to this list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"leads:read"},"post":{"operationId":"createLead","tags":["leads"],"summary":"Send a lead in","description":"The contact enters the CRM as any inbound lead does: if the brokerage already has an open lead with that e-mail or phone, this request is added to it (`created: false`); otherwise a lead is created and routed by the brokerage's rules. The answer is `{ id, created }`; the whole lead is in `lead` only when the key also holds `leads:read`. Note that `created: false` tells the caller that the brokerage already has an open lead with that e-mail or phone — the CRM's rule for every inbound source.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"email":{"type":"string","maxLength":160,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+?[\\d\\s-]{7,20}$"},"listingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"message":{"type":"string","minLength":1,"maxLength":2000},"ownerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"locale":{"type":"string","enum":["es-EC","en"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"created":{"type":"boolean"},"lead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"stage":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]},"source":{"type":"string","enum":["INQUIRY","CHAT","SHOWING_REQUEST","APPOINTMENT","MANUAL","IMPORT","LISTING","VALUATION","WHATSAPP","API"]},"tags":{"type":"array","items":{"type":"string"}},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"listingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"budgetMin":{"type":["number","null"]},"budgetMax":{"type":["number","null"]},"operation":{"anyOf":[{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},{"type":"null"}]},"lostReason":{"anyOf":[{"type":"string","enum":["PRICE","FINANCING","CHOSE_OTHER","NOT_RESPONSIVE","NOT_QUALIFIED","TIMING","OTHER"]},{"type":"null"}]},"locale":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stageChangedAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","email","phone","stage","source","tags","owner","listingIds","officeId","budgetMin","budgetMax","operation","lostReason","locale","version","stageChangedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","created"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`idempotency_in_progress` — A request with this Idempotency-Key is still running.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`not_a_member` — `ownerId` is not an active professional member of the brokerage.\n\n`idempotency_key_reused` — This Idempotency-Key was used with a different request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"leads:write"}},"/leads/{id}":{"get":{"operationId":"getLead","tags":["leads"],"summary":"One lead","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"stage":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]},"source":{"type":"string","enum":["INQUIRY","CHAT","SHOWING_REQUEST","APPOINTMENT","MANUAL","IMPORT","LISTING","VALUATION","WHATSAPP","API"]},"tags":{"type":"array","items":{"type":"string"}},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"listingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"budgetMin":{"type":["number","null"]},"budgetMax":{"type":["number","null"]},"operation":{"anyOf":[{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},{"type":"null"}]},"lostReason":{"anyOf":[{"type":"string","enum":["PRICE","FINANCING","CHOSE_OTHER","NOT_RESPONSIVE","NOT_QUALIFIED","TIMING","OTHER"]},{"type":"null"}]},"locale":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stageChangedAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","email","phone","stage","source","tags","owner","listingIds","officeId","budgetMin","budgetMax","operation","lostReason","locale","version","stageChangedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"leads:read"}},"/leads/{id}/stage":{"post":{"operationId":"setLeadStage","tags":["leads"],"summary":"Move a lead to another stage","description":"The answer is the whole lead when the key also holds `leads:read`; otherwise `{ id, stage, version }`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]},"lostReason":{"anyOf":[{"type":"string","enum":["PRICE","FINANCING","CHOSE_OTHER","NOT_RESPONSIVE","NOT_QUALIFIED","TIMING","OTHER"]},{"type":"null"}]},"lostNote":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"deal":{"type":"object","properties":{"amount":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,2})?$"},"referralName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"referralBps":{"type":"integer","minimum":0,"maximum":10000}},"required":["amount"]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["stage"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"stage":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]},"source":{"type":"string","enum":["INQUIRY","CHAT","SHOWING_REQUEST","APPOINTMENT","MANUAL","IMPORT","LISTING","VALUATION","WHATSAPP","API"]},"tags":{"type":"array","items":{"type":"string"}},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"listingIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"officeId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},{"type":"null"}]},"budgetMin":{"type":["number","null"]},"budgetMax":{"type":["number","null"]},"operation":{"anyOf":[{"type":"string","enum":["SALE","RENT","SHORT_TERM"]},{"type":"null"}]},"lostReason":{"anyOf":[{"type":"string","enum":["PRICE","FINANCING","CHOSE_OTHER","NOT_RESPONSIVE","NOT_QUALIFIED","TIMING","OTHER"]},{"type":"null"}]},"locale":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stageChangedAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","email","phone","stage","source","tags","owner","listingIds","officeId","budgetMin","budgetMax","operation","lostReason","locale","version","stageChangedAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"stage":{"type":"string","enum":["NEW","CONTACTED","QUALIFIED","APPOINTMENT","SHOWING","OFFER","NEGOTIATION","WON","LOST"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","stage","version"],"additionalProperties":false}]}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`version_conflict` — The lead changed since `version` was read.\n\n`duplicate_contact` — Reopening the lead would duplicate an open one.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"leads:write"}},"/leads/{id}/notes":{"post":{"operationId":"addLeadNote","tags":["leads"],"summary":"Add a note to a lead","description":"Notes are visible to the team in the dashboard. The API never returns notes.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"createdAt":{"type":"string"}},"required":["id","createdAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"`plan_required` — The plan does not include this feature.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"leads:write"}},"/appointments":{"get":{"operationId":"listAppointments","tags":["appointments"],"summary":"The brokerage's appointments, newest first","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"updatedSince","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["REQUESTED","CONFIRMED","DECLINED","CANCELLED"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"listingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"message":{"type":["string","null"]},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["REQUESTED","CONFIRMED","DECLINED","CANCELLED"]},"source":{"type":"string","enum":["BOOKING","SHOWING_REQUEST"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","listingId","agent","name","email","phone","message","startsAt","endsAt","status","source","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.\n\n`invalid_cursor` — The cursor does not belong to this list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"appointments:read"}},"/appointments/{id}":{"get":{"operationId":"getAppointment","tags":["appointments"],"summary":"One appointment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"listingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"message":{"type":["string","null"]},"startsAt":{"type":"string"},"endsAt":{"type":"string"},"status":{"type":"string","enum":["REQUESTED","CONFIRMED","DECLINED","CANCELLED"]},"source":{"type":"string","enum":["BOOKING","SHOWING_REQUEST"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","listingId","agent","name","email","phone","message","startsAt","endsAt","status","source","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"appointments:read"}},"/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["webhooks"],"summary":"Webhook endpoints","description":"Only the endpoints this key created are listed (another key's, or one made in the dashboard, is not this key's to manage); URLs are shown masked.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["GENERIC","ZAPIER","MAKE","N8N"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.deleted","listing.published","listing.updated","listing.status_changed","listing.deleted","appointment.created","appointment.status_changed","review.published","whatsapp.click"]}},"status":{"type":"string","enum":["ACTIVE","PAUSED","DISABLED"]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"disabledAt":{"type":["string","null"]},"disabledReason":{"type":["string","null"]},"lastSuccessAt":{"type":["string","null"]},"lastFailureAt":{"type":["string","null"]},"previousSecretUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","url","description","events","status","consecutiveFailures","disabledAt","disabledReason","lastSuccessAt","lastFailureAt","previousSecretUntil","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"webhooks:manage"},"post":{"operationId":"createWebhookEndpoint","tags":["webhooks"],"summary":"Create a webhook endpoint","description":"The signing secret is in this response and nowhere else: a retry with the same Idempotency-Key answers the same endpoint without it (`secretShown: false`). Receiving an event is reading its resource, so the key needs the read scope of every event family it subscribes to: `leads:read` for `lead.*` and `whatsapp.click`, `appointments:read` for `appointment.*`, `listings:read` for `listing.*` and `review.*`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Makes a retry of this request safe for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"type":"string","maxLength":200},"events":{"minItems":1,"maxItems":13,"type":"array","items":{"type":"string","enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.deleted","listing.published","listing.updated","listing.status_changed","listing.deleted","appointment.created","appointment.status_changed","review.published","whatsapp.click"]}},"kind":{"type":"string","enum":["GENERIC","ZAPIER","MAKE","N8N"]}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["GENERIC","ZAPIER","MAKE","N8N"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.deleted","listing.published","listing.updated","listing.status_changed","listing.deleted","appointment.created","appointment.status_changed","review.published","whatsapp.click"]}},"status":{"type":"string","enum":["ACTIVE","PAUSED","DISABLED"]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"disabledAt":{"type":["string","null"]},"disabledReason":{"type":["string","null"]},"lastSuccessAt":{"type":["string","null"]},"lastFailureAt":{"type":["string","null"]},"previousSecretUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"secret":{"type":"string"},"secretShown":{"type":"boolean"}},"required":["id","kind","url","description","events","status","consecutiveFailures","disabledAt","disabledReason","lastSuccessAt","lastFailureAt","previousSecretUntil","createdAt","updatedAt","secretShown"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"`plan_required` — The plan does not include this feature.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`endpoint_limit` — A brokerage holds at most 10 webhook endpoints.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`unsafe_url` — The URL is not an https address on the public internet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`outbound_busy` — Our outbound capacity is momentarily full; retry after `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"webhooks:manage"}},"/webhook-endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","tags":["webhooks"],"summary":"One webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["GENERIC","ZAPIER","MAKE","N8N"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.deleted","listing.published","listing.updated","listing.status_changed","listing.deleted","appointment.created","appointment.status_changed","review.published","whatsapp.click"]}},"status":{"type":"string","enum":["ACTIVE","PAUSED","DISABLED"]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"disabledAt":{"type":["string","null"]},"disabledReason":{"type":["string","null"]},"lastSuccessAt":{"type":["string","null"]},"lastFailureAt":{"type":["string","null"]},"previousSecretUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","url","description","events","status","consecutiveFailures","disabledAt","disabledReason","lastSuccessAt","lastFailureAt","previousSecretUntil","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"webhooks:manage"},"patch":{"operationId":"updateWebhookEndpoint","tags":["webhooks"],"summary":"Change, pause or resume a webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"minItems":1,"maxItems":13,"type":"array","items":{"type":"string","enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.deleted","listing.published","listing.updated","listing.status_changed","listing.deleted","appointment.created","appointment.status_changed","review.published","whatsapp.click"]}},"status":{"type":"string","enum":["ACTIVE","PAUSED"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"kind":{"type":"string","enum":["GENERIC","ZAPIER","MAKE","N8N"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.deleted","listing.published","listing.updated","listing.status_changed","listing.deleted","appointment.created","appointment.status_changed","review.published","whatsapp.click"]}},"status":{"type":"string","enum":["ACTIVE","PAUSED","DISABLED"]},"consecutiveFailures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"disabledAt":{"type":["string","null"]},"disabledReason":{"type":["string","null"]},"lastSuccessAt":{"type":["string","null"]},"lastFailureAt":{"type":["string","null"]},"previousSecretUntil":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","url","description","events","status","consecutiveFailures","disabledAt","disabledReason","lastSuccessAt","lastFailureAt","previousSecretUntil","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"`plan_required` — The plan does not include this feature.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`unsafe_url` — The URL is not an https address on the public internet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`outbound_busy` — Our outbound capacity is momentarily full; retry after `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"webhooks:manage"},"delete":{"operationId":"deleteWebhookEndpoint","tags":["webhooks"],"summary":"Delete a webhook endpoint and its delivery log","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"204":{"description":"No content"},"400":{"description":"`validation` — The body or the query is not valid; `errors` lists every field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"`invalid_api_key` — The key is missing, malformed, revoked, expired, or its brokerage no longer has API access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`insufficient_scope` — The key does not hold the scope this route needs (see `scope` in the body).\n\n`no_acting_owner` — The brokerage has no active owner the key could act for.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`not_found` — No such resource in this brokerage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited` — Too many requests (per brokerage and per key, or the hourly budget of listing creations); wait `Retry-After` seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"apiKey":[]}],"x-scope":"webhooks:manage"}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer <API key>"}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"detail":{"type":"string"},"instance":{"type":"string"},"requestId":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status"],"additionalProperties":false}}},"x-scopes":["listings:read","listings:write","leads:read","leads:write","appointments:read","webhooks:manage"]}