Upload files for users

This API allows generation of upload URL for user photos and cover images. To set the photo on a user object,

  • Do a PUT to the response URL with image data returned.
  • The URL is valid for 5 minutes.
  • Call user update API (preferably PATCH) to set the photoFileId and coverImageId to the file IDs returned in this API response.

Example request:

{
  "useFor": "photo",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "mimeType": "image/jpeg",
  "size": 1024000
}
Body Params
string
enum
required

Purpose of the file upload:

  • photo: User profile photo (recommended: square images, preferably 200px x 200px)
  • coverImage: User cover image (recommended: 746px x 304px)
Allowed:
uuid
required

UUID of the user for whom the file is being uploaded

string
required

MIME type of the file to be uploaded. Supported formats:

  • image/png
  • image/jpg
  • image/jpeg
  • image/gif
number
required
1 to 4194304

Size of the file in bytes.

  • photo limit: 2097152 (2MB)
  • coverImage limit: 4194304 (4MB)
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json