Skip to main content
On Housera, each new listing is verified by a person before it appears in search. There is no shortcut through the API: the listing you create goes into moderation, just like one added from the form.

States

The status field of a listing has one of the values below.

What is moderated

A new listing. POST /listings and PUT /listings/ref/{ref} with a new id create the listing with state pending. After approval, it becomes active; if rejected, it becomes rejected. An edit on a published listing. When you edit a listing active (or paused, unconfirmed), the public version remains unchanged, and your edit awaits approval:
  • you receive 202 Accepted instead of 200;
  • moderation.edit_pending becomes true;
  • after approval, the edit applies to the listing and edit_pending returns to false;
  • if the edit is rejected, the listing remains with the old version, edit_pending returns to false, and the reason appears in moderation.rejection_reason.
The photos submitted for a published listing follow the same path: they join the edit awaiting moderation. What is not moderated. A yet unpublished listing (pending) is modified directly and remains in the moderation queue. Pausing, reactivating, and marking as sold do not go through moderation.

API Transitions

A few rules to remember:
  • Incorrect state means 404. For example, POST /listings/{code}/resume on a listing active or DELETE on a listing active. An active listing must first be paused, then deleted.
  • A refusal with a reason means 409 listing_action_refused. For example, a listing with open reports cannot be deleted until the reports are closed. The reason is in detail.
  • A listing hidden or sold can no longer be edited.
  • A resubmission without any changes is rejected (422): a rejected listing, sent back identically, would be rejected again for the same reason.
  • Marking as sold renounces the edit that was awaiting moderation, if there was one.

Rejection

A rejected listing has in moderation:
rejection_reason is text for people. rejection_codes are stable codes that you can use in your system: The list may be empty when the moderator has only written a free reason. To resubmit the listing, you correct it with PATCH /listings/{code}: the listing returns to pending.

How to find out the result

You have three ways, from the best to the simplest:

Webhooks

You receive instantly listing.published, listing.rejected, and other events.

Events

GET /events?after= gives you everything that has happened in the last 35 days.

Direct Read

GET /account/listings/{code} shows you status and moderation at any time.
Events that correspond to state changes:
The result of moderating an edit on an already published listing does not change the state of the listing, thus it does not produce a state event. You find out by reading the listing: moderation.edit_pending becomes false again, and a rejection appears in moderation.rejection_reason. A CRM that sends edits on active listings periodically checks listings with edit_pending: true.