Image Uploads
POST /api/v1/posts/:id/images
Upload endpoint for post images.
Headers
Authorization: Bearer snpk_<keyId>_<secret>Content-Type: multipart/form-data
Upload intent
Set upload intent with either:
- query:
?intent=contentor?intent=og - multipart field:
intent=content|og
Default is content.
If intent=og, the uploaded URL is written to metadata.og.image automatically.
File rules
- Must be an image MIME type (
image/*) - Max size:
content: up to5MBog: up to2MB
Example
curl -X POST "https://subnano.me/api/v1/posts/<postId>/images?intent=og" \
-H "Authorization: Bearer $SUBNANO_PUBLISH_KEY" \
-F "file=@/path/to/og-image.jpg"
Success response:
{
"intent": "og",
"url": "https://<project>.supabase.co/storage/v1/object/public/post-media/...",
"path": "<profileId>/<postId>/og/<filename>.jpg"
}
For a full create -> upload -> patch -> publish walkthrough, see: