API reference

Media

Media endpoints.

MethodPathSummary
GET/v1/account/asset-linksLinks of one file, or on one service, option or special, with the files they name (the account’s and the caller’s locations’)
POST/v1/account/asset-linksLink a file to a service, an option, a service with an option, or a location in general: for every location, or one. A location may also hide or replace an account file there
POST/v1/account/asset-links/bulkLink several files to one service, option, special or location in general, with the same checks as one at a time. Each file is linked on its own: one that cannot be is named with why, and the rest are linked
PATCH/v1/account/asset-links/{linkId}Move a link earlier or later among the files shown for its target
DELETE/v1/account/asset-links/{linkId}Remove a link: the file stops showing there (or, for a hide or a replacement, the account’s file shows again)
GET/v1/account/assetsThe media library: files and tour links the caller can see, newest first, with the account’s storage use and media settings
POST/v1/account/assetsAdd a file to the media library (multipart: a fields part with the asset’s details as JSON, then the file). Files larger than the upload limit use POST /assets/direct
POST/v1/account/assets/bulk/archiveArchive several assets, with the same checks as one at a time. Each is archived on its own: one that cannot be is named with why, and the rest are archived
POST/v1/account/assets/bulk/suggestFor files about to be added together: the location and the service or option each file name names, worked out from the names alone, for people to confirm
POST/v1/account/assets/directStart adding a large file: makes the asset and returns a one-time link to PUT the bytes to, then POST /assets/\{assetId\}/files/\{fileId\}/complete
PUT/v1/account/assets/settingsWhether location managers may add their own media and hide or replace the account’s
POST/v1/account/assets/tourAdd a virtual tour link to the media library
GET/v1/account/assets/{assetId}One asset: its details, its files (current and replaced), and where it is used
PATCH/v1/account/assets/{assetId}Change an asset’s title, alt text, caption, tags, tour link or floor plan details
DELETE/v1/account/assets/{assetId}Delete an asset and every file it has had, for good. Refused while a saved setting still shows it
POST/v1/account/assets/{assetId}/archiveArchive an asset: it is no longer offered anywhere. Refused while a saved setting still shows it
DELETE/v1/account/assets/{assetId}/files/{fileId}Give up a large replacement that was never finished (its upload failed): the room it held goes back at once
POST/v1/account/assets/{assetId}/files/{fileId}/completeFinish a direct upload: checks the stored file’s size and type, then makes it the asset’s file (a new asset’s, or a replacement)
POST/v1/account/assets/{assetId}/files/{fileId}/restoreUndo a replace: make one of the asset’s earlier files its current one again. The file it replaces is kept in turn
POST/v1/account/assets/{assetId}/knowledgeLet a brochure or document answer callers’ questions, or stop it: its text is read into a knowledge document at its owner’s level, and kept up to date when the file is replaced
POST/v1/account/assets/{assetId}/replaceReplace an asset’s file (multipart: file). Its link stays the same, so everything that shows it shows the new file. The old file is kept and can be restored
POST/v1/account/assets/{assetId}/replace/directStart replacing an asset’s file with a large one: returns a one-time link to PUT the bytes to, then POST /assets/\{assetId\}/files/\{fileId\}/complete. The new file must be the same type
POST/v1/account/assets/{assetId}/unarchiveBring an archived asset back
GET/v1/account/groups/{groupId}/mediaWhat one location shows: for the location in general and each service and option it offers, its files in order, with inherited, hidden and replaced account files marked
GET/v1/account/media-matrixEvery location the caller can see against the location in general, each service and each option: how many files each shows, by kind, and where something is missing

GET /v1/account/asset-links

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

NameTypeRequiredDescription
assetIdstring (ast_… ID)NoID (ast_…)
serviceIdstring (srv_… ID)NoID (srv_…)
optionIdstring (sopt_… ID)NoID (sopt_…)
specialIdstring (spcl_… ID)NoID (spcl_…)
ownerenum | string (grp_… ID)No—
FieldTypeRequiredDescription
assetsarray<Asset>Yes—
assets[].altTextstringYes—
assets[].archivedAtstring (date-time) | nullYes—
assets[].canEditbooleanYes—
assets[].captionstringYes—
assets[].contentTypestring | nullYes—
assets[].createdAtstring (date-time)Yes—
assets[].floorPlanobject | nullYes—
assets[].floorPlan.bathroomsnumberNoBetween 0 and 10.
assets[].floorPlan.bedroomsintegerNoBetween 0 and 10.
assets[].floorPlan.layoutNamestringNo1–60 characters.
assets[].floorPlan.squareFeetinteger | objectNo—
assets[].floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
assets[].floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
assets[].groupIdstring | nullYes—
assets[].groupNamestring | nullYes—
assets[].heightinteger | nullYes—
assets[].idstringYes—
assets[].kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
assets[].pageCountinteger | nullYes—
assets[].previewUrlstring | nullYes—
assets[].sizeBytesintegerYes—
assets[].statusenumYesOne of: "uploading", "ready", "failed".
assets[].tagsarray<string>Yes—
assets[].thumbUrlstring | nullYes—
assets[].titlestringYes—
assets[].tourUrlstring | nullYes—
assets[].updatedAtstring (date-time)Yes—
assets[].urlstring | nullYes—
assets[].widthinteger | nullYes—
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

bash
curl -X GET "$ANSWERSTACK_API_URL/v1/account/asset-links" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST /v1/account/asset-links

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

application/json, required.

FieldTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)
effectenumNoOne of: "show", "hide". Default: "show".
groupIdstring (grp_… ID) | nullYes—
replacesAssetIdstring (ast_… ID) | nullNo—
targetobjectYes—
target.kindenumYesOne of: "location", "service", "option", "service_option", "special".
target.optionIdstring | nullNoDefault: null.
target.serviceIdstring | nullNoDefault: null.
target.specialIdstring | nullNoDefault: null.
FieldTypeRequiredDescription
assetIdstringYes—
effectenumYesOne of: "show", "hide".
groupIdstring | nullYes—
groupNamestring | nullYes—
idstringYes—
optionIdstring | nullYes—
replacesAssetIdstring | nullYes—
serviceIdstring | nullYes—
sortintegerYes—
specialIdstring | nullYes—
targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
targetLabelstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/asset-links" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "assetId": "ast_2ZPh7XbT0v9Ao4iJ3qK1mN8sRgE",
  "groupId": "grp_2ZPh7XbT0v9Ao4iJ3qK1mN8sRgE",
  "target": {
    "kind": "location"
  }
}'

POST /v1/account/asset-links/bulk

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

application/json, required.

FieldTypeRequiredDescription
assetIdsarray<string (ast_… ID)>YesUp to 100 items.
groupIdstring (grp_… ID) | nullYes—
targetobjectYes—
target.kindenumYesOne of: "location", "service", "option", "service_option", "special".
target.optionIdstring | nullNoDefault: null.
target.serviceIdstring | nullNoDefault: null.
target.specialIdstring | nullNoDefault: null.
FieldTypeRequiredDescription
createdarray<AssetLink>Yes—
created[].assetIdstringYes—
created[].effectenumYesOne of: "show", "hide".
created[].groupIdstring | nullYes—
created[].groupNamestring | nullYes—
created[].idstringYes—
created[].optionIdstring | nullYes—
created[].replacesAssetIdstring | nullYes—
created[].serviceIdstring | nullYes—
created[].sortintegerYes—
created[].specialIdstring | nullYes—
created[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
created[].targetLabelstringYes—
failedarray<object>Yes—
failed[].assetIdstringYes—
failed[].messagestringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/asset-links/bulk" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "assetIds": [
    "ast_2ZPh7XbT0v9Ao4iJ3qK1mN8sRgE"
  ],
  "groupId": "grp_2ZPh7XbT0v9Ao4iJ3qK1mN8sRgE",
  "target": {
    "kind": "location"
  }
}'

PATCH /v1/account/asset-links/{linkId}

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

NameTypeRequiredDescription
linkIdstring (asl_… ID)YesID (asl_…)

application/json, required.

FieldTypeRequiredDescription
sortintegerYesBetween 0 and 10000.
FieldTypeRequiredDescription
assetIdstringYes—
effectenumYesOne of: "show", "hide".
groupIdstring | nullYes—
groupNamestring | nullYes—
idstringYes—
optionIdstring | nullYes—
replacesAssetIdstring | nullYes—
serviceIdstring | nullYes—
sortintegerYes—
specialIdstring | nullYes—
targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
targetLabelstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

bash
curl -X PATCH "$ANSWERSTACK_API_URL/v1/account/asset-links/{linkId}" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "sort": 0
}'

DELETE /v1/account/asset-links/{linkId}

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

NameTypeRequiredDescription
linkIdstring (asl_… ID)YesID (asl_…)

No content.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

bash
curl -X DELETE "$ANSWERSTACK_API_URL/v1/account/asset-links/{linkId}" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

The media library: files and tour links the caller can see, newest first, with the account’s storage use and media settings#

GET /v1/account/assets

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Query parameters

NameTypeRequiredDescription
kindenumNoOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
kindsstringNoUp to 200 characters.
ownerenum | string (grp_… ID)No—
archivedenumNoOne of: "true", "false".
missingAltenumNoOne of: "true", "false".
unlinkedenumNoOne of: "true", "false".
qstringNoUp to 120 characters.
beforestring (ast_… ID)NoID (ast_…)
limitintegerNoBetween 1 and 200. Default: 60.

Response 200

FieldTypeRequiredDescription
assetsarray<Asset>Yes—
assets[].altTextstringYes—
assets[].archivedAtstring (date-time) | nullYes—
assets[].canEditbooleanYes—
assets[].captionstringYes—
assets[].contentTypestring | nullYes—
assets[].createdAtstring (date-time)Yes—
assets[].floorPlanobject | nullYes—
assets[].floorPlan.bathroomsnumberNoBetween 0 and 10.
assets[].floorPlan.bedroomsintegerNoBetween 0 and 10.
assets[].floorPlan.layoutNamestringNo1–60 characters.
assets[].floorPlan.squareFeetinteger | objectNo—
assets[].floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
assets[].floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
assets[].groupIdstring | nullYes—
assets[].groupNamestring | nullYes—
assets[].heightinteger | nullYes—
assets[].idstringYes—
assets[].kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
assets[].pageCountinteger | nullYes—
assets[].previewUrlstring | nullYes—
assets[].sizeBytesintegerYes—
assets[].statusenumYesOne of: "uploading", "ready", "failed".
assets[].tagsarray<string>Yes—
assets[].thumbUrlstring | nullYes—
assets[].titlestringYes—
assets[].tourUrlstring | nullYes—
assets[].updatedAtstring (date-time)Yes—
assets[].urlstring | nullYes—
assets[].widthinteger | nullYes—
canChangeSettingsbooleanYes—
canManageAccountbooleanYes—
groupsarray<object>Yes—
groups[].canEditbooleanYes—
groups[].idstringYes—
groups[].namestringYes—
nextCursorstring | nullYes—
settingsobjectYes—
settings.locationsMayAddMediabooleanYesDefault: true.
storageMediaStorageYes—
storage.limitBytesnumberYes—
storage.usedBytesnumberYes—
storage.warnbooleanYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X GET "$ANSWERSTACK_API_URL/v1/account/assets" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Add a file to the media library (multipart: a fields part with the asset’s details as JSON, then the file). Files larger than the upload limit use POST /assets/direct#

POST /v1/account/assets

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Response 201

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Archive several assets, with the same checks as one at a time. Each is archived on its own: one that cannot be is named with why, and the rest are archived#

POST /v1/account/assets/bulk/archive

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Request body

application/json, required.

FieldTypeRequiredDescription
assetIdsarray<string (ast_… ID)>YesUp to 100 items.

Response 200

FieldTypeRequiredDescription
archivedarray<string>Yes—
failedarray<object>Yes—
failed[].assetIdstringYes—
failed[].messagestringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/bulk/archive" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "assetIds": [
    "ast_2ZPh7XbT0v9Ao4iJ3qK1mN8sRgE"
  ]
}'

For files about to be added together: the location and the service or option each file name names, worked out from the names alone, for people to confirm#

POST /v1/account/assets/bulk/suggest

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Request body

application/json, required.

FieldTypeRequiredDescription
namesarray<string>YesUp to 200 items.

Response 200

FieldTypeRequiredDescription
suggestionsarray<object>Yes—
suggestions[].groupIdstring | nullYes—
suggestions[].namestringYes—
suggestions[].targetobject | object | object | nullYes—
suggestions[].target.kindconstantYes(variant 1) Always "service".
suggestions[].target.serviceIdstringYes(variant 1)
suggestions[].target.kindconstantYes(variant 2) Always "option".
suggestions[].target.optionIdstringYes(variant 2)
suggestions[].target.kindconstantYes(variant 3) Always "service_option".
suggestions[].target.optionIdstringYes(variant 3)
suggestions[].target.serviceIdstringYes(variant 3)

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/bulk/suggest" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "names": [
    "string"
  ]
}'

Start adding a large file: makes the asset and returns a one-time link to PUT the bytes to, then POST /assets/\{assetId\}/files/\{fileId\}/complete#

POST /v1/account/assets/direct

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Request body

application/json, required.

FieldTypeRequiredDescription
fieldsobjectYes—
fields.altTextstringNoUp to 300 characters. Default: "".
fields.captionstringNoUp to 200 characters. Default: "".
fields.floorPlanobjectNo—
fields.floorPlan.bathroomsnumberNoBetween 0 and 10.
fields.floorPlan.bedroomsintegerNoBetween 0 and 10.
fields.floorPlan.layoutNamestringNo1–60 characters.
fields.floorPlan.squareFeetinteger | objectNo—
fields.floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
fields.floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
fields.groupIdstring | nullNoDefault: null.
fields.kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
fields.tagsarray<string>NoUp to 20 items. Default: [].
fields.titlestringYes1–120 characters.
fields.tourUrlstring (uri)NoA https:// link Up to 2000 characters.
fileobjectYes—
file.namestringYes1–255 characters.
file.sizeintegerYesMinimum 1.
file.typestringYes1–100 characters.

Response 201

FieldTypeRequiredDescription
assetAssetYes—
asset.altTextstringYes—
asset.archivedAtstring (date-time) | nullYes—
asset.canEditbooleanYes—
asset.captionstringYes—
asset.contentTypestring | nullYes—
asset.createdAtstring (date-time)Yes—
asset.floorPlanobject | nullYes—
asset.floorPlan.bathroomsnumberNoBetween 0 and 10.
asset.floorPlan.bedroomsintegerNoBetween 0 and 10.
asset.floorPlan.layoutNamestringNo1–60 characters.
asset.floorPlan.squareFeetinteger | objectNo—
asset.floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
asset.floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
asset.groupIdstring | nullYes—
asset.groupNamestring | nullYes—
asset.heightinteger | nullYes—
asset.idstringYes—
asset.kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
asset.pageCountinteger | nullYes—
asset.previewUrlstring | nullYes—
asset.sizeBytesintegerYes—
asset.statusenumYesOne of: "uploading", "ready", "failed".
asset.tagsarray<string>Yes—
asset.thumbUrlstring | nullYes—
asset.titlestringYes—
asset.tourUrlstring | nullYes—
asset.updatedAtstring (date-time)Yes—
asset.urlstring | nullYes—
asset.widthinteger | nullYes—
uploadobjectYes—
upload.fileIdstringYes—
upload.urlstringYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/direct" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "fields": {
    "kind": "photo",
    "title": "string"
  },
  "file": {
    "name": "string",
    "type": "string",
    "size": 1
  }
}'

Whether location managers may add their own media and hide or replace the account’s#

PUT /v1/account/assets/settings

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Request body

application/json, required.

FieldTypeRequiredDescription
locationsMayAddMediabooleanNoDefault: true.

Response 200

FieldTypeRequiredDescription
locationsMayAddMediabooleanYesDefault: true.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/assets/settings" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "locationsMayAddMedia": true
}'

Add a virtual tour link to the media library#

POST /v1/account/assets/tour

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Request body

application/json, required.

FieldTypeRequiredDescription
altTextstringNoUp to 300 characters. Default: "".
captionstringNoUp to 200 characters. Default: "".
floorPlanobjectNo—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullNoDefault: null.
kindenumYesOne of: "tour".
tagsarray<string>NoUp to 20 items. Default: [].
titlestringYes1–120 characters.
tourUrlstring (uri)NoA https:// link Up to 2000 characters.

Response 201

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/tour" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "tour",
  "title": "string"
}'

One asset: its details, its files (current and replaced), and where it is used#

GET /v1/account/assets/{assetId}

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X GET "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Change an asset’s title, alt text, caption, tags, tour link or floor plan details#

PATCH /v1/account/assets/{assetId}

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Request body

application/json, required.

FieldTypeRequiredDescription
altTextstringNoUp to 300 characters.
captionstringNoUp to 200 characters.
floorPlanobject | nullNo—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
tagsarray<string>NoUp to 20 items.
titlestringNo1–120 characters.
tourUrlstring (uri)NoA https:// link Up to 2000 characters.

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X PATCH "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "altText": "string",
  "caption": "string",
  "floorPlan": {
    "bathrooms": 0,
    "bedrooms": 0,
    "layoutName": "string",
    "squareFeet": 50
  },
  "tags": [
    "string"
  ],
  "title": "string",
  "tourUrl": "https://example.com"
}'

Delete an asset and every file it has had, for good. Refused while a saved setting still shows it#

DELETE /v1/account/assets/{assetId}

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Response 204

No content.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X DELETE "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Archive an asset: it is no longer offered anywhere. Refused while a saved setting still shows it#

POST /v1/account/assets/{assetId}/archive

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/archive" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Give up a large replacement that was never finished (its upload failed): the room it held goes back at once#

DELETE /v1/account/assets/{assetId}/files/{fileId}

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)
fileIdstring (asf_… ID)YesID (asf_…)

Response 204

No content.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X DELETE "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/files/{fileId}" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Finish a direct upload: checks the stored file’s size and type, then makes it the asset’s file (a new asset’s, or a replacement)#

POST /v1/account/assets/{assetId}/files/{fileId}/complete

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)
fileIdstring (asf_… ID)YesID (asf_…)

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/files/{fileId}/complete" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Undo a replace: make one of the asset’s earlier files its current one again. The file it replaces is kept in turn#

POST /v1/account/assets/{assetId}/files/{fileId}/restore

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)
fileIdstring (asf_… ID)YesID (asf_…)

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/files/{fileId}/restore" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Let a brochure or document answer callers’ questions, or stop it: its text is read into a knowledge document at its owner’s level, and kept up to date when the file is replaced#

POST /v1/account/assets/{assetId}/knowledge

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Request body

application/json, required.

FieldTypeRequiredDescription
enabledbooleanYes—

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/knowledge" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true
}'

Replace an asset’s file (multipart: file). Its link stays the same, so everything that shows it shows the new file. The old file is kept and can be restored#

POST /v1/account/assets/{assetId}/replace

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/replace" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Start replacing an asset’s file with a large one: returns a one-time link to PUT the bytes to, then POST /assets/\{assetId\}/files/\{fileId\}/complete. The new file must be the same type#

POST /v1/account/assets/{assetId}/replace/direct

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Request body

application/json, required.

FieldTypeRequiredDescription
fileobjectYes—
file.namestringYes1–255 characters.
file.sizeintegerYesMinimum 1.
file.typestringYes1–100 characters.

Response 201

FieldTypeRequiredDescription
assetAssetYes—
asset.altTextstringYes—
asset.archivedAtstring (date-time) | nullYes—
asset.canEditbooleanYes—
asset.captionstringYes—
asset.contentTypestring | nullYes—
asset.createdAtstring (date-time)Yes—
asset.floorPlanobject | nullYes—
asset.floorPlan.bathroomsnumberNoBetween 0 and 10.
asset.floorPlan.bedroomsintegerNoBetween 0 and 10.
asset.floorPlan.layoutNamestringNo1–60 characters.
asset.floorPlan.squareFeetinteger | objectNo—
asset.floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
asset.floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
asset.groupIdstring | nullYes—
asset.groupNamestring | nullYes—
asset.heightinteger | nullYes—
asset.idstringYes—
asset.kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
asset.pageCountinteger | nullYes—
asset.previewUrlstring | nullYes—
asset.sizeBytesintegerYes—
asset.statusenumYesOne of: "uploading", "ready", "failed".
asset.tagsarray<string>Yes—
asset.thumbUrlstring | nullYes—
asset.titlestringYes—
asset.tourUrlstring | nullYes—
asset.updatedAtstring (date-time)Yes—
asset.urlstring | nullYes—
asset.widthinteger | nullYes—
uploadobjectYes—
upload.fileIdstringYes—
upload.urlstringYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/replace/direct" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "file": {
    "name": "string",
    "type": "string",
    "size": 1
  }
}'

Bring an archived asset back#

POST /v1/account/assets/{assetId}/unarchive

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
assetIdstring (ast_… ID)YesID (ast_…)

Response 200

FieldTypeRequiredDescription
altTextstringYes—
archivedAtstring (date-time) | nullYes—
canEditbooleanYes—
canManageKnowledgebooleanYes—
captionstringYes—
contentTypestring | nullYes—
createdAtstring (date-time)Yes—
filesarray<AssetFile>Yes—
files[].contentTypestringYes—
files[].createdAtstring (date-time)Yes—
files[].currentbooleanYes—
files[].idstringYes—
files[].sizeBytesintegerYes—
files[].statusenumYesOne of: "pending", "ready", "failed".
files[].supersededAtstring (date-time) | nullYes—
files[].urlstring | nullYes—
floorPlanobject | nullYes—
floorPlan.bathroomsnumberNoBetween 0 and 10.
floorPlan.bedroomsintegerNoBetween 0 and 10.
floorPlan.layoutNamestringNo1–60 characters.
floorPlan.squareFeetinteger | objectNo—
floorPlan.squareFeet.maxintegerYes(variant 2) Between 50 and 20000.
floorPlan.squareFeet.minintegerYes(variant 2) Between 50 and 20000.
groupIdstring | nullYes—
groupNamestring | nullYes—
heightinteger | nullYes—
idstringYes—
kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
knowledgeobject | nullYes—
knowledge.docIdstringYes—
knowledge.errorstring | nullYes—
knowledge.statusenumYesOne of: "pending", "processing", "ready", "failed".
linksarray<AssetLink>Yes—
links[].assetIdstringYes—
links[].effectenumYesOne of: "show", "hide".
links[].groupIdstring | nullYes—
links[].groupNamestring | nullYes—
links[].idstringYes—
links[].optionIdstring | nullYes—
links[].replacesAssetIdstring | nullYes—
links[].serviceIdstring | nullYes—
links[].sortintegerYes—
links[].specialIdstring | nullYes—
links[].targetKindenumYesOne of: "location", "service", "option", "service_option", "special".
links[].targetLabelstringYes—
pageCountinteger | nullYes—
previewUrlstring | nullYes—
sizeBytesintegerYes—
statusenumYesOne of: "uploading", "ready", "failed".
tagsarray<string>Yes—
thumbUrlstring | nullYes—
titlestringYes—
tourUrlstring | nullYes—
updatedAtstring (date-time)Yes—
urlstring | nullYes—
usesarray<AssetUse>Yes—
uses[].idstringYes—
uses[].kindenumYesOne of: "playbook", "location", "brand", "booking_page".
uses[].namestringYes—
widthinteger | nullYes—

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/assets/{assetId}/unarchive" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

What one location shows: for the location in general and each service and option it offers, its files in order, with inherited, hidden and replaced account files marked#

GET /v1/account/groups/{groupId}/media

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Path parameters

NameTypeRequiredDescription
groupIdstring (grp_… ID)YesID (grp_…)

Response 200

FieldTypeRequiredDescription
canEditbooleanYes—
groupIdstringYes—
hasPriceBookbooleanYes—
targetsarray<object>Yes—
targets[].hiddenarray<object>Yes—
targets[].hidden[].assetAssetYes—
targets[].hidden[].asset.altTextstringYes—
targets[].hidden[].asset.archivedAtstring (date-time) | nullYes—
targets[].hidden[].asset.canEditbooleanYes—
targets[].hidden[].asset.captionstringYes—
targets[].hidden[].asset.contentTypestring | nullYes—
targets[].hidden[].asset.createdAtstring (date-time)Yes—
targets[].hidden[].asset.floorPlanobject | nullYes—
targets[].hidden[].asset.groupIdstring | nullYes—
targets[].hidden[].asset.groupNamestring | nullYes—
targets[].hidden[].asset.heightinteger | nullYes—
targets[].hidden[].asset.idstringYes—
targets[].hidden[].asset.kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
targets[].hidden[].asset.pageCountinteger | nullYes—
targets[].hidden[].asset.previewUrlstring | nullYes—
targets[].hidden[].asset.sizeBytesintegerYes—
targets[].hidden[].asset.statusenumYesOne of: "uploading", "ready", "failed".
targets[].hidden[].asset.tagsarray<string>Yes—
targets[].hidden[].asset.thumbUrlstring | nullYes—
targets[].hidden[].asset.titlestringYes—
targets[].hidden[].asset.tourUrlstring | nullYes—
targets[].hidden[].asset.updatedAtstring (date-time)Yes—
targets[].hidden[].asset.urlstring | nullYes—
targets[].hidden[].asset.widthinteger | nullYes—
targets[].hidden[].hideLinkIdstringYes—
targets[].hidden[].linkIdstringYes—
targets[].itemsarray<object>Yes—
targets[].items[].assetAssetYes—
targets[].items[].asset.altTextstringYes—
targets[].items[].asset.archivedAtstring (date-time) | nullYes—
targets[].items[].asset.canEditbooleanYes—
targets[].items[].asset.captionstringYes—
targets[].items[].asset.contentTypestring | nullYes—
targets[].items[].asset.createdAtstring (date-time)Yes—
targets[].items[].asset.floorPlanobject | nullYes—
targets[].items[].asset.groupIdstring | nullYes—
targets[].items[].asset.groupNamestring | nullYes—
targets[].items[].asset.heightinteger | nullYes—
targets[].items[].asset.idstringYes—
targets[].items[].asset.kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
targets[].items[].asset.pageCountinteger | nullYes—
targets[].items[].asset.previewUrlstring | nullYes—
targets[].items[].asset.sizeBytesintegerYes—
targets[].items[].asset.statusenumYesOne of: "uploading", "ready", "failed".
targets[].items[].asset.tagsarray<string>Yes—
targets[].items[].asset.thumbUrlstring | nullYes—
targets[].items[].asset.titlestringYes—
targets[].items[].asset.tourUrlstring | nullYes—
targets[].items[].asset.updatedAtstring (date-time)Yes—
targets[].items[].asset.urlstring | nullYes—
targets[].items[].asset.widthinteger | nullYes—
targets[].items[].inheritedbooleanYes—
targets[].items[].linkIdstringYes—
targets[].items[].replacesstring | nullYes—
targets[].keystringYes—
targets[].labelstringYes—
targets[].replacedarray<object>Yes—
targets[].replaced[].assetAssetYes—
targets[].replaced[].asset.altTextstringYes—
targets[].replaced[].asset.archivedAtstring (date-time) | nullYes—
targets[].replaced[].asset.canEditbooleanYes—
targets[].replaced[].asset.captionstringYes—
targets[].replaced[].asset.contentTypestring | nullYes—
targets[].replaced[].asset.createdAtstring (date-time)Yes—
targets[].replaced[].asset.floorPlanobject | nullYes—
targets[].replaced[].asset.groupIdstring | nullYes—
targets[].replaced[].asset.groupNamestring | nullYes—
targets[].replaced[].asset.heightinteger | nullYes—
targets[].replaced[].asset.idstringYes—
targets[].replaced[].asset.kindenumYesOne of: "photo", "floor_plan", "brochure", "video", "tour", "document", "logo", "captions".
targets[].replaced[].asset.pageCountinteger | nullYes—
targets[].replaced[].asset.previewUrlstring | nullYes—
targets[].replaced[].asset.sizeBytesintegerYes—
targets[].replaced[].asset.statusenumYesOne of: "uploading", "ready", "failed".
targets[].replaced[].asset.tagsarray<string>Yes—
targets[].replaced[].asset.thumbUrlstring | nullYes—
targets[].replaced[].asset.titlestringYes—
targets[].replaced[].asset.tourUrlstring | nullYes—
targets[].replaced[].asset.updatedAtstring (date-time)Yes—
targets[].replaced[].asset.urlstring | nullYes—
targets[].replaced[].asset.widthinteger | nullYes—
targets[].replaced[].byLinkIdstringYes—
targets[].replaced[].linkIdstringYes—
targets[].targetobjectYes—
targets[].target.kindenumYesOne of: "location", "service", "option", "service_option", "special".
targets[].target.optionIdstring | nullYesDefault: null.
targets[].target.serviceIdstring | nullYesDefault: null.
targets[].target.specialIdstring | nullYesDefault: null.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X GET "$ANSWERSTACK_API_URL/v1/account/groups/{groupId}/media" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Every location the caller can see against the location in general, each service and each option: how many files each shows, by kind, and where something is missing#

GET /v1/account/media-matrix

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

Response 200

FieldTypeRequiredDescription
columnsarray<object>Yes—
columns[].keystringYes—
columns[].labelstringYes—
columns[].targetobjectYes—
columns[].target.kindenumYesOne of: "location", "service", "option", "service_option", "special".
columns[].target.optionIdstring | nullYesDefault: null.
columns[].target.serviceIdstring | nullYesDefault: null.
columns[].target.specialIdstring | nullYesDefault: null.
gapsnumberYes—
rowsarray<object>Yes—
rows[].cellsarray<object | null>Yes—
rows[].cells[].countsmapYes—
rows[].cells[].counts.{key}numberNoAny key.
rows[].cells[].gapbooleanYes—
rows[].cells[].ownnumberYes—
rows[].cells[].totalnumberYes—
rows[].groupIdstringYes—
rows[].hasPriceBookbooleanYes—
rows[].namestringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X GET "$ANSWERSTACK_API_URL/v1/account/media-matrix" \
  -H "Authorization: Bearer $ACCESS_TOKEN"