curl --request POST \
--url https://postonce.to/api/public/v1/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "launch-image.png",
"content_type": "image/png"
}
'{
"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=..."
}
}
}{
"error": {
"code": "invalid_filename",
"message": "filename is required."
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key.",
"hint": "<string>"
}
}Media
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
https://postonce.to/api/public
/
v1
/
media
/
uploads
curl --request POST \
--url https://postonce.to/api/public/v1/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "launch-image.png",
"content_type": "image/png"
}
'{
"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=..."
}
}
}{
"error": {
"code": "invalid_filename",
"message": "filename is required."
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key.",
"hint": "<string>"
}
}Authorizations
Scoped API key issued in PostOnce Settings. OAuth authorization grants are not currently supported.
Body
application/json
Response
Signed upload URL created successfully.
Show child attributes
Show child attributes
