---
title: "Create media upload url"
method: POST
path: "/v1/media"
tags: ["Media"]
---

# Create media upload url

`POST /v1/media`

## Request

- Base URL: `https://platform.hootsuite.com`
- URL: `https://platform.hootsuite.com/v1/media`
- Auth: OAuth 2
  - Authorization code: `https://platform.hootsuite.com/oauth2/auth`
  - Token URL: `https://platform.hootsuite.com/oauth2/token`

Creates an Amazon S3 upload URL that can be used to transfer media to Hootsuite which ensures the media is available when a scheduled message is sent to the social network.
Hootsuite will generate thumbnails and key frames and return a unique media identifier that can be passed when creating a message.
Subsequent uploads to an upload URL will be accepted by Amazon but immediately deleted by Hootsuite and only the first valid media file uploaded will be used.
The MIME type and size provided in this call must match the MIME type and size of the media uploaded.

After requesting an upload URL, make a `PUT` request to the `uploadUrl` returned, an example cURL request would look like the following, replace the fields as appropriate:

```
curl --location --request PUT 'https://hootsuite-video.s3.amazonaws.com/production/12255244_01942650-3d42-42b8-a191-aa84eb45d105.mp4?AWSAccessKeyId=AKIAIM7ASX2JTE3ZFAAA&Expires=1471978770&Signature=b%2B196oEHxySdmE%2FC34ZRL6pXSAI%3D' \
  --header 'Content-Type: video/mp4' \
  --header 'Content-Length: 383631' \
  --data 'SOURCE-MEDIA-LOCATION'
```

Hootsuite will remove uploaded media 90 days after using the media in a message.

## Headers

- `Authorization` string, required

## Request body

- MediaUploadUrlRequest
  - `sizeBytes` integer: Size in bytes of the media file to be uploaded.
  - `mimeType` string: MIME type of the media to be uploaded. Supported media types are video/mp4, image/gif, image/jpeg, image/jpg, image/png.

## Response `200`

Success

- MediaUploadUrlResponseEnvelope: The response data wrapper for a Media Upload Url.
  - `data` MediaUploadUrl
    - `id` string: The media identifier.
    - `uploadUrl` string: An S3 URL to upload media to Hootsuite.
    - `uploadUrlDurationSeconds` integer: The number of seconds until the upload url is no longer valid.

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/hootsuite/apis/hootsuite-rest-api.md) - [All operations](https://skmtc.dev/hootsuite/apis/hootsuite-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hootsuite/apis/hootsuite-rest-api/revisions/adac53bd28bb?raw)
