Showami (1.0)

The Showami API for creating, accepting, and updating showings and rentals.

See the API Changelog for what changed in each release.

API key access levels

Every request must include an X-Api-Key header. Keys are issued at one of two access levels:

  • Full access — can read and modify resources via any HTTP method.
  • Read-only — restricted to GET, HEAD, and OPTIONS requests. Any request using another method is rejected with 403 Forbidden and the body { "message": "Read-only API keys cannot modify resources." }. Use a read-only key for integrations that only need to pull data (reporting, dashboards, audits). The sign-in endpoints (POST /api/v1/users/tokens and POST /users/sign_in) are allowlisted so the key bearer can still exchange credentials for a user token.

Profiles pending re-review

Changing certain profile details (such as name or license) can put an approved profile back into review. While it's in review, your user can keep working showings and task lists it already has: amending, rescheduling, checking in and out, completing tasks, and accepting counter-proposals. Taking on new work returns 403 Forbidden with { "message": "Your profile is pending approval." } until the profile is approved again: creating showings or task lists (POST /api/v1/showings, POST /api/v1/tasks), claiming a showing, or sending a counter-proposal. A profile that was rejected before going back into review stays rejected until it's reviewed.

Idempotency keys

Every POST, PUT, PATCH and DELETE endpoint accepts an optional Idempotency-Key header, so a change can be retried safely when its response never arrives (a timeout or dropped connection) without it happening twice, such as a duplicate booking.

  • Use a unique value per change you intend to make, such as a UUID or your own booking id, and send the same value on every retry of that request. Keys are up to 255 characters and scoped to the authenticated user (for consumer showings, to the consumer).
  • Once the original request has succeeded, a retry with the same key doesn't repeat it. It returns the original response with an Idempotent-Replayed: true header. The create endpoints (POST /api/v1/showings, POST /api/v1/tasks, POST /api/v1/rentals and POST /api/v1/consumers/showings) return the created showing(s) in their current state, so a since-accepted showing comes back accepted. Every other endpoint returns the original response exactly as it was sent.
  • Keys are kept for 24 hours. After that a reused key is treated as a new request.
  • A retry must use the same method, path and parameters (query and body; the order of JSON keys doesn't matter). Anything else returns 422 with { "message": "This Idempotency-Key was already used with a different request. Use a new key for a new request." } and changes nothing.
  • While the original is still being processed, a retry returns 409 Conflict; wait and retry again with the same key.
  • If the original failed (any non-2xx response), nothing was changed and the key is released, so a retry with the same key is processed as a new request.
  • GET requests ignore the header, since they're already safe to retry. So do requests that sign in or return credentials (POST /api/v1/users/tokens, POST /api/v1/refresh_tokens, POST /api/v1/consumers, POST /api/v1/users, PUT /api/v1/users) and the endpoints that return presigned upload URLs.

Authentication and token lifetimes

Sign in once with POST /api/v1/users/tokens (or POST /users/sign_in), cache the tokens it returns, and reuse them until they expire. There's no need to sign in on every request, and POST /users/sign_in is limited to 5 attempts per 20 seconds (see "Rate limits").

TokenSend it asLifetime
access_token from sign-inAuthorization: Bearer <token>Set per API key, 24 hours by default
access_token from POST /api/v1/refresh_tokensAuthorization: Bearer <token>60 minutes
refresh_tokenBody of POST /api/v1/refresh_tokensOne month, single use
tokenX-User-Token, with X-User-EmailNo expiry
  • Access tokens are JWTs. Read the exp claim (seconds since the Unix epoch) to see when one expires, and refresh shortly before then rather than assuming a lifetime. Note that tokens from a refresh last 60 minutes, which is shorter than the sign-in default.
  • An expired or invalid access token returns 401 with { "message": "Signature has expired" } (or another decode error). Refresh it and retry the request.
  • Each refresh returns a new refresh_token and invalidates the one you sent. Store the new one; reusing the old one returns 401 with { "message": "Invalid refresh token" }. If two workers share a refresh token, only the first to refresh succeeds, so refresh in one place.
  • Changing the user's password revokes all of their refresh tokens. Sign in again to get a new pair.
  • DELETE /api/v1/refresh_tokens revokes a refresh token when you sign out.

Scheduling rules

Every new showing time (POST /api/v1/showings, POST /api/v1/rentals, POST /api/v1/consumers/showings, a rescheduling, an amendment or a task's candidate schedules) must follow these rules. The showing_at(*) fields are the local wall-clock time in the request's time_zone, on a 24-hour clock, and the rules are checked in that time zone.

Rule422 message
At least one hour from nowShowing at must be at least one hour from now
No more than seven days from nowShowing at cannot be more than seven days from now
Starts no earlier than 8:00 amShowing at cannot be before 8 am
Starts no later than 8:45 pmShowing at cannot be after 8:45 pm
On the quarter hour (:00, :15, :30 or :45)Showing at must be at 15 minute intervals from the hour
An open house ends by 9:00 pm (showing_at + duration)Open house cannot be scheduled to end after 9:00 pm
Each showing in a request has a different timeTwo showings in the same group cannot have the same time.
You don't already have a showing in the same status with the same MLS # at the same timeThere is already a showing scheduled with this MLS # and time.
  • The one-hour minimum is measured from when Showami receives the request, not when you built it. Leave a margin for queueing and retries. A time that passed the check when you first sent it can fail when you retry it later.
  • When several rules fail, the create endpoints return only the first message.
  • A rescheduled time can be in the future but less than an hour away only for a showing created through an accepted amendment. Every other new time needs the full hour.

Rate limits

Requests are rate limited to keep the API responsive for every integration.

ScopeLimit
All API requests, per client IP address50 requests per 10 seconds
POST /users/sign_in, per IP address and per email5 attempts per 20 seconds

A request over the limit gets 429 Too Many Requests. It's rejected before it reaches the API, so nothing was created or changed and the request is safe to retry.

  • Check the status code, not the body. A 429 from the general limit comes from our edge network, so its body may be HTML rather than JSON.
  • If the response has a Retry-After header, wait that many seconds before retrying. Otherwise wait at least 10 seconds, then back off exponentially (10s, 20s, 40s…) with some random jitter. Retrying right away keeps the window full and extends the block.
  • Send the same Idempotency-Key when you retry a create or any other change (see "Idempotency keys").
  • Spread bulk work out: a steady 5 requests per second stays under the limit, while a burst of 50 at once uses up the whole window. Use webhooks rather than polling where you can.

These limits may change. We'll give integration partners notice before lowering them. If your integration needs a higher limit, contact us.

Overview
Servers
/