Re-order a file on a record
Sets the file's position on one record. Requires permission to update media and the record.
/api/v2/media/{media}/attachments/{attachableType}/{attachableId}Sets the file's position on one record. Requires permission to update media and the record.
Authorization
bearerAuth In: header
Path Parameters
The file's id.
uuidThe kind of record the file is on.
Value in
- "property"
- "unit"
- "building"
- "floor_plan"
- "gallery"
- "amenity"
- "announcement"
- "neighborhood_place"
- "content_block"
- "content_item"
The record's id.
uuidQuery Parameters
Optional account to run this request against. Defaults to the account the API token is scoped to, so callers with a single account can omit it. Must be an account the authenticated user belongs to; staff may target any account. For write requests the value may be sent in the JSON body instead of the query string. The resolved account is returned on the X-Resi-Account-Id response header.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v2/media/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments/property/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "sort_order": 0 }'{ "data": { "kind": "file", "media": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "string", "thumb_url": "string", "full_url": "string", "caption": "string", "alt_text": "string", "tags": [ "string" ], "reference_url": "string", "reference_id": "string", "property_id": "05003a8a-8f3c-454b-8884-a906ec46f5f5", "folder_id": "7695bac3-9397-4ec2-9335-45a2a16f1901" }, "attachments": [ { "attachable_type": "property", "attachable_id": "59195f01-f1b9-4338-a5d0-42410c1862ca", "slot": "string", "sort_order": 0 } ] }}Import media in bulk POST
Imports up to 100 items in one request. Every item runs through the same validation, authorization and dedup as POST /api/v2/media, independently and in order: one failing item is reported in its result and does not roll back or stop the others, so the response is 200 whenever the envelope itself is valid. Files are downloaded while the request runs. After 40 seconds the batch cuts short any download still under way (that item fails with `422`) and returns the items it did not start with status `503` (not attempted), so a batch of many new files may need to be resent in parts; retry only those indexes. Files may come from at most 25 different hosts per batch; an item from a further host fails with `422`. Limited to 10 batches a minute.
Remove a file from a record DELETE
Takes the file off one record. The file stays in the media library and on every other record. Embeds belong to one record: delete the embed instead.