POST
/attachments/upload-imageUpload a workspace, space, or user image
Uploads an image to use as a user avatar, space icon, or workspace icon. Send the image as multipart form data and set type to the intended use; include spaceId when setting a space icon.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Multipart form data containing the image and its intended use. Include file and type; include spaceId when the type is space_icon.
filestringrequired
Image file to upload (JPEG, PNG, etc.).
spaceIdstringoptional
Required when `type` is `space_icon`. Identifies which space to set the icon for.
typestringrequired
Type of image. `avatar`: user profile picture. `space_icon`: space logo. `workspace_icon`: workspace logo.
200Returns the result of the image upload.
dataunknownoptional
Response payload
statusintegeroptional
successbooleanoptional
400Returned when the upload request fails validation, including when `type` is invalid or a required `spaceId` is missing.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the authenticated user is not permitted to set the specified image.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
Error handling
A 400 is returned when the upload fails validation or type is not one of the accepted values: avatar, space_icon, or workspace_icon. Include spaceId when type is space_icon. A 403 is returned when the authenticated user is not permitted to set the specified image.