Postonus
APIReferenceUploads

Get a signed URL to upload a file

POST
/uploads/initiate

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
scenarioId*string
Value in"post_attachments""user_avatar"
fileName*string
Length1 <= length
fileType*string
Value in"image/jpeg""image/png""image/webp""image/gif""image/avif""video/mp4""video/webm""video/quicktime"
fileSize*number
Range0 < value <= 524288000
checksum*string
Match^[A-Za-z0-9+/]{43}=$

Response Body

OK

application/json
  1. response
uploadType*unknown
uploadId*string
Formatuuid
signedUrl*string
requiredHeaders*
expiresAt*string
Formatdate-time
Example Request
curl -X POST 'https://app.postonus.com/api/v1/uploads/initiate' \  -H 'Content-Type: application/json' \  -d '{  "scenarioId": "post_attachments",  "fileName": "string",  "fileType": "image/jpeg",  "fileSize": 1,  "checksum": "string"}'
Example Response
{  "uploadType": "single",  "uploadId": "ef523ba8-509e-47af-8e2c-5fa751596497",  "signedUrl": "string",  "requiredHeaders": {    "property1": "string",    "property2": "string"  },  "expiresAt": "2019-08-24T14:15:22Z"}