Attach files to one of the caller's sources
Multipart: `files` (repeat the field, up to 10). Each file succeeds or fails on its own: `attachments` lists the ones attached, `errors` the others with why. 201 when at least one was attached, 200 when none were. Someone else's source is 404. Accepted types: image/jpeg, image/jpg, image/png, image/gif, image/webp, image/svg+xml, 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, application/zip, application/x-zip-compressed. At most 50 MB.
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 10). Each file succeeds or fails on its own: attachments lists the ones attached, errors the others with why. 201 when at least one was attached, 200 when none were. Someone else's source is 404. Accepted types: image/jpeg, image/jpg, image/png, image/gif, image/webp, image/svg+xml, 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, application/zip, application/x-zip-compressed. At most 50 MB.
AuthorizationBearer <token>A personal access token (rsk_…) or a Supabase access token.
id*string1 <= lengthmultipart/form-data- body
files*array<>1 <= itemsNothing attached — see errors
curl -X POST 'https://www.ressource.social/api/v1/sources/string/attachments' \ -F 'files=[ "string"]'Add files to a source in one of its communities POST
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.
Remove an attachment and its file DELETE
Owner only: someone else's attachment is 404.