image field of a post’s content object. Uploaded files are stored in your instance’s configured storage backend — local disk by default, or Cloudflare R2 if configured.
POST /public/v1/upload
Upload a media file to the Volta media library. The file is stored and made available for use in posts. You can reference the returnedid in the image array when scheduling a post with POST /public/v1/posts.
Request
This endpoint usesmultipart/form-data rather than JSON. Do not set Content-Type: application/json for this request — let your HTTP client set the multipart boundary automatically.
The media file to upload. Attach it as a form field named
file.Supported file types
| Type | Extensions |
|---|---|
| Image | png, jpg, jpeg, gif |
| Video | mp4 |
Example
Response
The unique identifier for the uploaded file. Pass this value in the
image array when creating a post.The publicly accessible URL of the uploaded file.
Using the uploaded media in a post
After uploading, reference the returnedid in the image array of your post content:
If you are using the
@postsider/node SDK, the client.upload(file, extension) method handles buffer-to-form-data conversion for you automatically. Pass a Node.js Buffer and the file extension string (e.g. 'png'), and the SDK handles the multipart encoding and MIME type mapping. See the SDK Reference for details.