Skip to main content
Through the API you read the company the key works in: its details, the people on its team and its offices, under the same rules as the Team and Offices pages in the portal. This is how you match the colleagues in your CRM with the ones in Housera and find the email you send as agent on a listing or as agent_email to POST /leads/{id}/assign. The API only reads. Invitations, roles, moving someone to another office, deactivating them and removing them from the team happen in the portal. When something changes, you get an event (see Team and company events). All three calls need the listings:read permission.

The company

GET /account/firm returns the company the key works in.
An account that works in no company, or that has left the key’s company, gets 404. A suspended company can still be read, with status: suspended.

The team

GET /account/members returns the people on the team, with cursor pagination, in the order they joined the company.
What the key sees depends on the account’s role, as on the Team page: Colleagues who left the company no longer appear. While the company is suspended or the account is deactivated, the list is empty, as in the portal.

The offices

GET /account/offices returns the company’s offices, the head office first, then the others by name. A developer has no offices, since its teams are on projects, so its list is empty.

Team and company events

When the team or the company changes, you get an event, on your webhook and in GET /events. They start in the portal and in Housera’s moderation. member in the member.* events has id, name, email, role and office, as in GET /account/members. When the colleague deleted their account (reason: account_deleted), member has only id, with no name or email. handed_to has name and email. firm and into have id and name. The events reach the company’s owner and admins, through the keys bound to the company that have the listings:read permission, and an integrator only if its connection is on that company. A manager or an agent does not get them. firm.suspended, firm.closed and firm.merged go out before the company loses its team, and the key bound to the company can still read them in GET /events. Integrators’ webhooks get them automatically. On a webhook from Settings → API you tick them, since they do not follow from another event.
Your colleagues’ emails and phone numbers are personal data. Keep them only as long as you need them to match the colleagues in your CRM with the ones in Housera.