---
updatedAt: 2026-08-24T20:44:03.000Z
---

# Upload Media

The upload media endpoint is used to create a location to upload a video asset and an optional closed caption file (recommended to provide if video has spoken words). This location is short lived and expires in 15 minutes.

<Callout icon="📘" theme="info">
  ### URL: POST /api/v1/media/upload
</Callout>

# Request Parameters

<Table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Description
      </th>

      <th>
        Type
      </th>

      <th>
        Required
      </th>

      <th>
        Possible Values
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        advertiserId
      </td>

      <td>
        Id of the advertiser, uploading video asset
      </td>

      <td>
        integer
      </td>

      <td>
        Y
      </td>

      <td>
        Unique numeric   identifier
      </td>
    </tr>

    <tr>
      <td>
        mediaType    
      </td>

      <td>
        The value of mediaType is “video”

        **_Note:_** <ul><li>The file size must be ≤ 500mb</li><li>The file format must be .MP4 or .MOV</li><li>The aspect ratio should be 16:9</li><li>The dimensions must be 1280 x 720px – 3840 x 2160px​</li><li>The duration must be 5-45 seconds</li><li>Video codec must be H.264 or H.265</li><li>Audio codec must be AAC, MP3, PCM</li><li>Caption file format should be  .srt or .vtt</li><li>Number of media files associated with an advertiser account should not exceed the configurable limit owned by WMC. It is 200 currently. An error message will be returned if this number is exceeded.</li></ul>
      </td>

      <td>
        string
      </td>

      <td>
        Y
      </td>

      <td>
        Relevant string value representing the media type
      </td>
    </tr>
  </tbody>
</Table>

## Headers

| Header Name              | Description                                                                                                            | Required | Values                                                                                                                                           |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Authorization            | The token will provide you the access to the API. It is same for all advertisers you access through the API.           | Y        | Please utilize the generated `auth_token` shared with you at the time of partner onboarding from the Getting Started Guide                       |
| WM\_CONSUMER.ID          | We will provide you the consumer ID to access the API. It is same for all advertisers you access   through the API.    | Y        | Please use the generated `ConsumerId` shared with you at the time of partner onboarding. Refer to the Getting Started Guide for more information |
| WM\_SEC.AUTH\_SIGNATURE  | Auth signature as an API key.                                                                                          | Y        | Use the signature generator code from Getting Started Guide to generate this value                                                               |
| WM\_SEC.KEY\_VERSION     | We will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API. | Y        | 1                                                                                                                                                |
| WM\_CONSUMER.intimestamp | Timestamp for  which the auth signature is generated. Use Unix epoch format for the timestamp.                         | Y        | Use the signature generator code from Getting Started Guide to generate this value                                                               |
| Content-Type             | Format of the message body                                                                                             | Y        | application/json                                                                                                                                 |

## Sample Request 1

```curl
curl -X POST \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload' \
--header 'Authorization: Bearer <auth_token>' \ 
--header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1'  \ 
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'\
--header 'Content-Type: application/json' \
--data 
'{
  "mediaType": "video",
  "advertiserId": 500002
 }'
```

## Sample Request 2

```curl
curl -X POST \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload' \
--header 'Authorization: Bearer <auth_token>' \ 
--header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1'  \ 
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'\
--header 'Content-Type: application/json' \
--data 
'{
  "mediaType": "foo",
  "advertiserId": 500002
 }'
```

## Sample Request 3

```curl
curl -X POST \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload' \
--header 'Authorization: Bearer <auth_token>' \ 
--header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1'  \ 
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'\
--header 'Content-Type: application/json' \
--data 
'{
  "mediaType": "video",
  "advertiserId": 400001
 }'
```

# Response

| Element              | Description                                                                                                                                                | Type    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| code                 | Possible values of response code: success, failure                                                                                                         | string  |
| details              | Details of the error if value of response code is failure                                                                                                  | string  |
| mediaUploadRequestId | Id that is generated in response to receiving a request for uploading a video asset                                                                        | integer |
| uploadUrl            | The URL to upload the media.Note: The URL expires in 15 minutes. The upload location only supports PUT HTTP method to upload the media content             | string  |
| captionUrl           | The URL to upload the closed caption file.Note: The URL expires in 15 minutes.The upload location only supports PUT HTTP method to upload the caption file | string  |

## Sample Response 1

```json
[
   {
    "code": "success",
    "details": "",
    "mediaUploadRequestId": 600001,
    "uploadUrl": 
    "https://vds.stage.walmartimages.com/thunder/assets/media-service/wcnp-stage/videos/bae5b2d9-6ab3-496b-9ec1-e61cefb95838/video.mp4",
    "captionUrl": "https://vds.stage.walmartimages.com/thunder/assets/media-service/wcnp-stage/videos/bae5b2d9-6ab3-496b-9ec1-e61cefb95838/transcode/f2080d80-3ffb-4441-a479-22ce3cef5d76/text_vtt0000000000.vtt" 
   }
]
```

## Sample Response 2

```json

[
   {
      "code": "failure",
      "details": " Invalid Media Type ",
      "mediaUploadRequestId": 0 ,
      "uploadUrl": "",
      "captionUrl": "" 
   }
]
```

## Sample Response 3

```json
[
  {
      "code": "failure",
      "details": " Advertiser 400001 is not allowed to use this 
      feature",
      "mediaUploadRequestId": 0,
      "uploadUrl": "",
      "captionUrl": "" 
   }
]

```

## Sample Response 4

```json
[
  {
    "code": "failure",
    "details": "You have reached the limit of 200 videos, please 
                 delete unwanted ones among 200 videos that you own.",
    "mediaUploadRequestId": 0,
    "uploadUrl": "",
    "captionUrl": "" 
  }
]
```