Communities (Admin)

Upload community business card photo (Admin)

POST/manage/communities/:id/card-photo

Upload a photo to use as the community's business card background as multipart/form-data (field name cardPhoto) and get the stored URL. The photo is auto-oriented, scaled down to 1600px on its longer side and converted to WebP. This call does not change the community; pass the returned URL as cardPhoto.url to PUT /manage/communities/:id to save it. Admins only.

AuthLogin required

Path parameters

idstringrequired

Community ID.

Request body

cardPhotofilerequired

Image file (multipart/form-data)

Notes

Images are sent as multipart/form-data. JPEG, PNG and GIF are supported, up to 5MB. Exceeding the limit returns 400 (errorCode 10042).

Returns 403 when you are not an admin of the community, and 404 when the community does not exist.

Response

FieldTypeDescription
cardPhotoUrlstringURL of the uploaded photo.
Request
curl https://api.4s.link/manage/communities/ID/card-photo \
-X POST \
-H "Authorization: Bearer 4s_at_..." \
-F "file=@image.png"
Example response
{
"cardPhotoUrl": "https://.../communities/c1a2b3c4-.../card-photo/1759500000000-abc123.webp"
}