POST/file/get-signed-upload-urls

Generates pre-signed URLs for uploading media files (images, videos, or PDFs) directly to S3.

https://api.postfa.st/Auth: pf-api-keyRate limit: 350 requests per day, 150 per minuteMaximum 250 MB per video, 10 MB per image, and 60 MB per document (PDF, DOC, DOCX, PPT, PPTX).

Uploading to S3

After obtaining the signedUrl and key, perform an HTTP PUT request to the signedUrl with the raw file data as the request body. The Content-Type header in this PUT request must match the contentType used to generate the signed URL.

Request body

contentTypestringrequired

The MIME type of the file. Supported image types: image/jpeg, image/png, image/gif, image/webp. Supported video types: video/mp4, video/webm, video/mov, video/quicktime. Supported document types (for LinkedIn document posts only): application/pdf, application/msword (.doc), application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx), application/vnd.ms-powerpoint (.ppt), application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx).

countnumberrequired

Number of signed URLs to generate. Min 1. Max 8 for images, max 1 for videos, max 1 for documents (PDF, DOC, DOCX, PPT, PPTX).

Response

201 Created An array of objects, each containing:

keystringoptional

The S3 object key for upload.

signedUrlstringoptional

The pre-signed S3 URL for the PUT request.