AthausDocs

REST API: test mode

A test key works in a test office with invented data. Nothing leaves Athaus except webhooks to your own addresses.

Last updated:

With a test key you build against /v1 without touching a real office, an inquirer or a portal. It looks like a live key and is called ath_test_....

Authorization: Bearer ath_test_...

The test office

Every office has at most one test office: its own organisation with its own data, pointing at the real office. It is created with the first test key. A test key always resolves to the test office, never the real one, and the real office sees none of it.

A new test office starts with invented data:

WhatHow many
Listings (apartment for sale, apartment for rent, house)3
Contacts5
Inquiries2
Viewing1
File (a small generated image)1

Streets are called Musterstraße, addresses end in example.com. GET /v1/me returns key.mode as test and the ID of the test office.

Create a test key

In Settings, API keys choose Test under Key type. Scopes and the restriction per resource work as for a live key, and so does the rule on who may create keys. The plan of the real office decides: Pro and Scale work, in Basic the API answers plan_required.

A test key works at /v1 only, not at the MCP server and not in the app. It does not count against the connections of your plan, but an office has at most 10 valid test keys at a time: the eleventh is answered with test_key_limit_erreicht when you create it in the app. The test office is not visible in the app.

Nothing leaves Athaus

In the test office no email, no SMS and no other message goes out. No portal receives anything, no connected CRM is written to, no listing becomes public. No AI model runs either.

A message you send to an inquiry then stands in the thread as sent, with a note that it was not delivered in test mode. The proposal ends as executed.

Webhooks keep going: the endpoints of a test key belong to the test office, receive its events and are signed the same way, so you can test your receiver. If an endpoint fails for good, it is disabled like any other (disabledReason, disabledAt); no email goes out for it.

Tell events apart

Every event carries livemode: true for the real office, false for the test office. A proposal carries the same member.

{ "object": "event", "type": "proposal.pending", "livemode": false }

Decide proposals through the API

In a real office a person says yes or no in the app, or a key with the scope decide. Nobody is in the test office, so there are two paths that a test key uses without that scope:

PathEffect
POST /v1/proposals/{id}/approveYes: the message stands in the thread as sent, the proposal is executed
POST /v1/proposals/{id}/rejectNo: nothing is sent, the proposal is rejected

That lets you play through "202 with a proposal, then yes" without the app (What leaves the office). A live key needs the scope decide for them, otherwise 403 (Deciding without a person). Here too you only see the proposals of your own key.

Reset

POST /v1/test/reset restores the sample data. Everything else in the test office disappears, the old events too. The sample data itself reports no events: your receiver gets no flood of created events, only what you create or change afterwards. Webhook endpoints and keys stay, and the test office keeps its ID. The key needs write access to all resources. With a live key: 404.

Limits

The same limits as for live keys apply. The test office is also capped so it does not become storage: 200 listings, 1,000 contacts and 100 MB of files. Beyond that the API answers 403 with test_office_full. Resetting makes room again.

What can go wrong

StatusCodeCause
403test_office_fullthe test office reached its cap
409test_office_busythe test office is being built or reset
403plan_requiredthe plan of the real office has no API access
404not_foundreset or decide with a live key

Keep reading

On this page