Rename an attachment
Changes an attachment's displayed file name and its note. Both are written, so send the current name even when only changing the note.
Authorization
AuthorizationstringrequiredPath parameters
entityTypeenum<string>requiredWhat kind of record the file hangs off. Written in the path in lower case, for example lease.
entityIdstringrequiredThe record the file hangs off, of the kind named by entityType. A Snowflake id sent as a decimal string.
fileAttachmentIdstringrequiredThe attachment to act on. A Snowflake id sent as a decimal string.
Body
application/json
fileNamestringrequiredNew displayed name, 1 to 250 characters.
descriptionstringNew note, 1 to 1000 characters. Leave it out to clear it.
Response
200 · The attachment after the change.
idstringThe attachment. A Snowflake id sent as a decimal string. Different from file.id, which is the stored file.
fileNamestringName shown for the attachment.
descriptionstringNote about the attachment. Absent when none was set.
createdstring · date-timeWhen the file was attached, in the company's timezone.
uploaderNamestringName of whoever attached it. Absent when it is not known.
uploaderTypestringWhat kind of user attached it, written in PascalCase: System, MagicDoor, PropertyManager, Tenant, Vendor or Owner. Absent when it is not known.
shareTypesstring[]Which outside audiences can see the file, written in PascalCase: Tenant, Vendor or Owner. Empty when it is internal only.
relationTypeenum<string>What kind of record the file hangs off.
relationIdstringThe record the file hangs off.
fileobjectThe stored file itself.
fileIdstringdeprecatedSame value as file.id.
fileUrlstringdeprecatedPre-signed URL for the file. Use file.secureUrl.raw instead.
fileThumbUrlstringdeprecatedPre-signed thumbnail URL. Use file.secureUrl.variantTemplate instead.
fileSizeBytesintegerdeprecatedSame value as file.size.
propertyIdstringdeprecatedSet to relationId when relationType is property, otherwise absent. Use relationType and relationId.
leaseIdstringdeprecatedSet to relationId when relationType is lease, otherwise absent. Use relationType and relationId.
401 · The access token is missing, expired, or not valid for this company.
404 · No file attachment with that id exists in the caller's company.
entityType and entityId are part of the path but the attachment is found by fileAttachmentId alone. Send the record the attachment really belongs to so the URL reads honestly.