Agents

Create, list, update, and delete real estate agents. Manage avatars and list public agent profiles.

Manage real estate agent profiles for your organization. Agents can be linked to Clerk user accounts (team members) or created as standalone profiles.

Create a Clerk-Linked Agent

POST /agents

Authentication: Required (JWT)

Creates an agent profile linked to an existing Clerk organization member.

Request Body

FieldTypeRequiredDescriptionConstraints
clerkUserIdstringYesClerk user ID to linkNon-empty
firstNamestringNoFirst nameMax 100 chars
lastNamestringNoLast nameMax 100 chars
avatarUrlstringNoAvatar image URLMax 500 chars
displayEmailstringNoPublic-facing emailValid email format
phoneNumberstringNoPhone number
whatsappNumberstringNoWhatsApp number
descriptionstringNoAgent bio / description
titlestringNoJob title
isActivebooleanNoWhether the agent is activeDefault: true
additionalInfoobjectNoCustom key-value data

Example

curl -X POST https://api.fondaro.com/agents \
  -H "Authorization: Bearer <jwt-session-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "clerkUserId": "user_2abc123def456",
    "firstName": "Sarah",
    "lastName": "Johnson",
    "displayEmail": "sarah@luxuryestates.com",
    "phoneNumber": "+34612345678",
    "title": "Senior Property Consultant"
  }'

Create a Standalone Agent

POST /agents/standalone

Authentication: Required (JWT)

Creates an agent profile that is not linked to a Clerk user account. Use this for external agents or collaborators who don't have a Fondaro login.

Request Body

FieldTypeRequiredDescriptionConstraints
firstNamestringYesFirst nameMax 100 chars, non-empty
lastNamestringNoLast nameMax 100 chars
displayEmailstringNoPublic emailValid email format
phoneNumberstringNoPhone number
whatsappNumberstringNoWhatsApp number
descriptionstringNoAgent bio
titlestringNoJob title
isActivebooleanNoActive statusDefault: true
additionalInfoobjectNoCustom data

Example

curl -X POST https://api.fondaro.com/agents/standalone \
  -H "Authorization: Bearer <jwt-session-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Miguel",
    "lastName": "Fernández",
    "displayEmail": "miguel@example.com",
    "phoneNumber": "+34698765432",
    "title": "Independent Agent"
  }'

List Agents

GET /agents

Authentication: Required (JWT)

Returns all agents for your organization.

Query Parameters

ParameterTypeDefaultDescription
isActivebooleanFilter by active status
searchstringSearch by name
includeClerkMembersbooleanfalseInclude Clerk members that don't yet have agent records

Example

curl "https://api.fondaro.com/agents?isActive=true&search=sarah" \
  -H "Authorization: Bearer <jwt-session-token>"

Get an Agent

GET /agents/:id

Authentication: Required (JWT)

Example

curl https://api.fondaro.com/agents/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d \
  -H "Authorization: Bearer <jwt-session-token>"

Errors

StatusCondition
404Agent not found

Update an Agent

PUT /agents/:id

Authentication: Required (JWT)

All fields are optional — include only what you want to change.

Request Body

FieldTypeDescriptionConstraints
firstNamestringFirst nameMax 100 chars
lastNamestringLast nameMax 100 chars
avatarUrlstringAvatar URLMax 500 chars
avatarThumbnailUrlstringThumbnail URLMax 500 chars
displayEmailstringPublic emailValid email
phoneNumberstringPhone number
whatsappNumberstringWhatsApp number
descriptionstringBio / description
titlestringJob title
isActivebooleanActive status
additionalInfoobjectCustom data

Example

curl -X PUT https://api.fondaro.com/agents/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d \
  -H "Authorization: Bearer <jwt-session-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Director of Sales",
    "description": "Specializing in luxury beachfront properties on the Costa del Sol."
  }'

Delete an Agent

DELETE /agents/:id

Authentication: Required (JWT)

Example

curl -X DELETE https://api.fondaro.com/agents/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d \
  -H "Authorization: Bearer <jwt-session-token>"

Response

{
  "success": true
}

Upload Agent Avatar

POST /agents/:id/avatar

Authentication: Required (JWT)

Upload a profile photo for an agent. The image is resized and stored, and the agent record is updated with the new URLs.

Request

Send the file as multipart/form-data with the field name avatar.

ConstraintValue
Max file size5 MB
Accepted formatsJPEG, JPG, PNG, WebP, GIF

Example

curl -X POST https://api.fondaro.com/agents/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/avatar \
  -H "Authorization: Bearer <jwt-session-token>" \
  -F "avatar=@photo.jpg"

Response

Returns the updated agent object with new avatarUrl and avatarThumbnailUrl fields.

Errors

StatusCondition
404Agent not found
422File too large or invalid format

Delete Agent Avatar

DELETE /agents/:id/avatar

Authentication: Required (JWT)

Removes the agent's avatar photo.

Example

curl -X DELETE https://api.fondaro.com/agents/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/avatar \
  -H "Authorization: Bearer <jwt-session-token>"

Public: Active Agents with Listings

GET /properties/agents?organizationId=<uuid>

Authentication: None required (public endpoint)

Returns active agents that have at least one active property listing. This is intended for public-facing websites to display agent directories.

Query Parameters

ParameterTypeRequiredDescription
organizationIdUUIDYesOrganization ID to list agents for

Example

curl "https://api.fondaro.com/properties/agents?organizationId=a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"

Response

Returns an array of public agent profiles (no internal IDs or timestamps):

[
  {
    "id": "f1e2d3c4-...",
    "firstName": "Sarah",
    "lastName": "Johnson",
    "avatarUrl": "https://cdn.fondaro.com/avatars/...",
    "avatarThumbnailUrl": "https://cdn.fondaro.com/avatars/...",
    "displayEmail": "sarah@luxuryestates.com",
    "phoneNumber": "+34612345678",
    "whatsappNumber": "+34612345678",
    "description": "Specializing in luxury beachfront properties.",
    "title": "Senior Property Consultant"
  }
]

Response Format Note

Agent responses include both snake_case and camelCase field names for backwards compatibility:

  • first_name / firstName
  • last_name / lastName
  • image_url / avatarUrl

Prefer the camelCase versions in new integrations. The public endpoint only returns camelCase fields.

Fondaro Help

Docs & support

Hi there, how can we help?

Browse popular articles or ask a question below.

Popular articles

Or ask a question