Unit listings

Generate listing copy with AI

Asks MagicDoor's AI to write a title, keywords and description for this listing from what it already knows about the unit. The result is returned for you to review — nothing is saved to the listing.

POST
https://api.portal.magicdoor.com/company-app/unit-listings/{unitId}/generate-ai-masterlisting

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

unitIdstringrequired

Snowflake id of the unit. A unit listing has no id of its own — it is keyed by the unit it markets, so this is also the listing's id.

example: 1830472847398404098

Body

application/json

promptstring

Extra notes to steer the copy — what to emphasise, what tone to take. 1 to 1000 characters. Leave it out and the AI works from the unit's own details alone.

Response

200 · Suggested copy. None of it has been saved.

titlestring

A suggested headline.

keywordsstring[]

Suggested marketing keywords.

descriptionstring

A suggested body copy.

400 · `prompt` is longer than 1000 characters. The response carries an `errors` member mapping each rejected field name to its message.

401 · The access token is missing, expired, or not for this company.

404 · No listing for that unit, the unit belongs to another company, or the listing has been deactivated.

Nothing is written

This endpoint only returns suggested copy. To keep it, send the title and description you want in a call to Update a unit listing.