Create a profile photo upload session
Reserves an upload slot for a property manager's profile photo. Upload the file to the returned target, then attach it with set a profile photo.
Authorization
AuthorizationstringrequiredPath parameters
propertyManagerIdstringrequiredThe property manager. A Snowflake id, sent as a decimal string.
Body
application/json
Describe the photo you are about to upload. Profile photos must be an image and no larger than 5 MB.
fileNamestringrequiredName of the file you are about to upload. 1 to 250 characters.
fileSizeintegerrequiredSize of the file in bytes. Must be at least 1, and at most 5,242,880 (5 MB).
contentTypestringrequiredMIME type of the file. Must be an image type.
Response
200 · Where and how to upload the photo.
sessionIdstringId of the upload session. Send it back in the follow-up call that attaches the file.
endpointstringAbsolute URL to upload the file to.
methodstringHTTP method to use for the upload, for example POST.
fieldsobjectForm fields the storage provider requires. Send every key and value exactly as given, as multipart/form-data, with the file itself last.
expiresstring · date-timeWhen the session stops accepting the upload.
401 · The access token is missing, expired, or does not belong to a property manager.
404 · No property manager with that id exists for the calling company. A record that belongs to another company is reported the same way as one that does not exist. The id you asked for is in `entityId`; `detail` names only the kind of record.
- Reserve a session
Call this endpoint with the file's name, size and MIME type. You get back an
endpoint, amethod, a set offieldsand asessionId. - Upload the file
Send the file to
endpointusingmethod, asmultipart/form-data. Include every key and value fromfieldsunchanged, with the file itself as the last part. The session expires atexpires. - Attach it
Call set a profile photo with the
sessionId. Only then does the photo become the property manager's.