# Method: advertisers.sdfuploadtasks.upload

- [HTTP request](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#body.request_body)
  - [JSON representation](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#body.response_body)
- [Authorization scopes](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#body.aspect)
- [Try it!](https://developers.google.com/display-video/api/sdf-upload/rest/v4/advertisers.sdfuploadtasks/upload#try-it)

Creates an SDF Upload Task. Returns an `https://developers.google.com/display-video/api/sdf-upload/rest/v4/sdfdownloadtasks.operations#Operation`.

An SDF Upload Task is a long-running, asynchronous operation. The `https://developers.google.com/display-video/api/sdf-upload/rest/v4/sdfdownloadtasks.operations#Operation.FIELDS.metadata` type of this operation is `https://developers.google.com/display-video/api/sdf-upload/rest/v4/SdfUploadTaskMetadata`. If the request is successful, the `https://developers.google.com/display-video/api/sdf-upload/rest/v4/sdfdownloadtasks.operations#Operation.FIELDS.response` type of the operation is `https://developers.google.com/display-video/api/sdf-upload/rest/v4/SdfUploadTask`. The response will not include the resulting files, which can then be retrieved using `https://developers.google.com/display-video/api/sdf-upload/rest/v4/media/download#google.bytestream.RestByteStream.GetMedia`.

The state of operation can be retrieved with `sdfuploadtask.operations.get`.

Any errors can be found in the `https://developers.google.com/display-video/api/sdf-upload/rest/v4/sdfdownloadtasks.operations#Operation.FIELDS.error`. Note that `https://developers.google.com/display-video/api/sdf-upload/rest/v4/sdfdownloadtasks.operations#Operation.FIELDS.error` is expected to be empty.

### HTTP request

- Upload URI, for media upload requests:  
  `POST https://displayvideo.googleapis.com/upload/v4/advertisers/{advertiserId}/sdfuploadtasks`
- Metadata URI, for metadata-only requests:  
  `POST https://displayvideo.googleapis.com/v4/advertisers/{advertiserId}/sdfuploadtasks`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `advertiserId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the advertiser to upload SDF for. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "filename": string, "sdfVersion": enum (`https://developers.google.com/display-video/api/sdf-upload/rest/v4/SdfConfig#SdfVersion`) } ``` |

| Fields ||
|---|---|
| `filename` | `string` Required. The filename of the asset, including the file extension. The filename must be UTF-8 encoded with a maximum size of 240 bytes. |
| `sdfVersion` | ``enum (`https://developers.google.com/display-video/api/sdf-upload/rest/v4/SdfConfig#SdfVersion`)`` Required. The SDF version of the uploaded file. If set to `SDF_VERSION_UNSPECIFIED`, this will default to the version specified by the identified advertiser. An advertiser inherits its SDF version from its partner unless configured otherwise. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/display-video/api/sdf-upload/rest/v4/sdfdownloadtasks.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/display-video`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).