Create upload URL
Creates a signed upload URL and media_id. Upload raw file bytes with PUT to data.upload.signedUrl, then call get_media with that media_id and pass the returned data.public_url as media[].url when creating a post or draft. URL creation alone does not upload bytes. Treat the signed URL as a temporary credential; do not open it in a browser.
post/v1/media/uploads
Request
- Base URL: https://postonce.to/api/public
- URL: https://postonce.to/api/public/v1/media/uploads
- Auth: HTTP bearer
Request body
Example request
{
"filename": "launch-image.png",
"content_type": "image/png"
}Response
Signed upload URL created successfully.
Example response
{
"data": {
"content_type": "image/png",
"media_id": "cHVibGljLWFwaS91c2VyLTEyMy8xNzQzNDM0NTY3LWxhdW5jaC1pbWFnZS5wbmc",
"path": "public-api/user-123/1743434567-launch-image.png",
"upload": {
"path": "public-api/user-123/1743434567-launch-image.png",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"signedUrl": "https://swgrcbzlaeshsmygubik.supabase.co/storage/v1/object/upload/sign/social-media/public-api/user-123/1743434567-launch-image.png?token=..."
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.