ressource.socialbetadocumentation
API referenceMedia

Upload a file

Multipart: `file`, `bucket` (one of avatars, bookmark-thumbnails, bookmark-attachments, bug-reports), and optional `usage_context`, `alt_text`, `description`. The file is stored under the caller and recorded as their media; the answer carries a signed URL valid for an hour. 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. Past the storage or daily upload limit, 429.

POST
/api/v1/media

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

Multipart: file, bucket (one of avatars, bookmark-thumbnails, bookmark-attachments, bug-reports), and optional usage_context, alt_text, description. The file is stored under the caller and recorded as their media; the answer carries a signed URL valid for an hour. 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. Past the storage or daily upload limit, 429.

Authorization

headerAuthorizationBearer <token>

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

Request Body

multipart/form-data
  1. body
file*file
Formatbinary
bucket*string
Value in"avatars""bookmark-thumbnails""bookmark-attachments""bug-reports"
usage_context?|null
alt_text?|null
description?|null

Response Body

Stored

application/json
  1. response
media*
signed_url*string
curl -X POST 'https://www.ressource.social/api/v1/media' \  -F 'file=string' \  -F 'bucket=avatars'
{  "media": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "uploaded_by": "e134ce2c-a199-4e99-9c11-627b70a7ff28",    "original_filename": "string",    "storage_path": "string",    "bucket_name": "string",    "file_size": -9007199254740991,    "mime_type": "string",    "media_type": "string",    "usage_context": "string",    "alt_text": "string",    "description": "string",    "created_at": "string"  },  "signed_url": "string"}