ressource.socialbetadocumentation
API referenceMedia

Add files to a source in one of its communities

Multipart: `files` (repeat the field, up to 5), `organization_id` (a community the source is shared in, that the caller is a member of) and an optional `note` (≤ 280 characters, kept on each file). Each file succeeds or fails on its own: `attachments` lists the ones added, `errors` the others with why. 201 when at least one was added, 200 when none were — except when every file hit a usage limit (the per-source cap, the day's uploads, the storage budget): 429 `rate_limited`, with `Retry-After` when the limit is a window. A source the caller cannot open is 404; a community they are not in, or the caller owning the source (their files are `/sources/{id}/attachments`), is 403. Accepted types: image/jpeg, image/jpg, image/png, image/gif, image/webp, image/avif, image/bmp, image/tiff, image/heic, image/heif, image/x-icon, image/vnd.microsoft.icon, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown (no SVG, no ZIP). At most 10 MB each.

POST
/api/v1/sources/{id}/community-attachments

Sends a real request with your token. Prefer a read-only token; it is kept in this browser's storage.

Multipart: files (repeat the field, up to 5), organization_id (a community the source is shared in, that the caller is a member of) and an optional note (≤ 280 characters, kept on each file). Each file succeeds or fails on its own: attachments lists the ones added, errors the others with why. 201 when at least one was added, 200 when none were — except when every file hit a usage limit (the per-source cap, the day's uploads, the storage budget): 429 rate_limited, with Retry-After when the limit is a window. A source the caller cannot open is 404; a community they are not in, or the caller owning the source (their files are /sources/{id}/attachments), is 403. Accepted types: image/jpeg, image/jpg, image/png, image/gif, image/webp, image/avif, image/bmp, image/tiff, image/heic, image/heif, image/x-icon, image/vnd.microsoft.icon, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown (no SVG, no ZIP). At most 10 MB each.

Authorization

headerAuthorizationBearer <token>

A personal access token (rsk_…) or a Supabase access token.

Path Parameters

id*string
Length1 <= length

Request Body

multipart/form-data
  1. body
files*array<>
Items1 <= items <= 5
organization_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
note?string
Lengthlength <= 280

Response Body

Nothing added — see errors

curl -X POST 'https://www.ressource.social/api/v1/sources/string/community-attachments' \  -F 'files=[  "string"]' \  -F 'organization_id=7c60d51f-b44e-4682-87d6-449835ea4de6'
Empty