# Create a new video creative

Create a new video creative - V3.
### Uploading a video file
To upload a video, supply the `fileName` field in the request body
(see the **Create with fileName** sample in the *Request samples* panel).
The response then includes a pre-signed S3 `uploadUrl` (valid for
`expiresIn` seconds), which the client uses to `PUT` the file directly to S3:

```bash
curl -X PUT \
    -H "x-amz-acl: public-read" \
    -H "x-amz-meta-creative: {{CREATIVE_ID}}" \
    -H "Content-Type: {{UPLOADED_FILE_CONTENT_TYPE}}" \
    --upload-file "{{UPLOADED_FILE_PATH/File.mp4}}" \
    "{{S3_PRESIGNED_URL}}"
```
The `x-amz-acl: public-read` and `x-amz-meta-creative: <creativeId>` headers
are required (both are signed into the pre-signed URL).

Endpoint: POST /v3.0/creatives
Version: v1.0

## Description:

  - `Uploading a video file` ()
    To upload a video, supply the fileName field in the request body(see the Create with fileName sample in the Request samples panel).The response then includes a pre-signed S3 uploadUrl (valid forexpiresIn seconds), which the client uses to PUT the file directly to S3: curl -X PUT \
    -H "x-amz-acl: public-read" \
    -H "x-amz-meta-creative: {{CREATIVE_ID}}" \
    -H "Content-Type: {{UPLOADED_FILE_CONTENT_TYPE}}" \
    --upload-file "{{UPLOADED_FILE_PATH/File.mp4}}" \
    "{{S3_PRESIGNED_URL}}"
curl -X PUT \
    -H "x-amz-acl: public-read" \
    -H "x-amz-meta-creative: {{CREATIVE_ID}}" \
    -H "Content-Type: {{UPLOADED_FILE_CONTENT_TYPE}}" \
    --upload-file "{{UPLOADED_FILE_PATH/File.mp4}}" \
    "{{S3_PRESIGNED_URL}}" The x-amz-acl: public-read and x-amz-meta-creative: <creativeId> headersare required (both are signed into the pre-signed URL).

## Request body:

  - `application/json` (unknown)
    Creative object to create

## Request fields (application/json):

  - `active` (boolean)

  - `advertiser` (integer, required)
    T1 Advertiser ID

  - `name` (string, required)
    Creative name (required, max 256 chars)

  - `concept` (integer, required)
    T1 Concept ID (mandatory for creation)

  - `startTime` (integer)
    Creative start date (Unix timestamp, must be >= 0 and < year 10000)

  - `endTime` (integer)
    Creative end date (Unix timestamp, must be >= startTime)

  - `clickthroughUrl` (string)
    Clickthrough URL (required unless customVAST or customVASTUrl is set)

  - `customVAST` (string)
    VAST XML content (mutually exclusive with customVASTUrl)

  - `customVASTUrl` (string)
    URL to VAST XML content (mutually exclusive with customVAST)

  - `viewabilityTemplate` (string)
    VAST XML template for BYOT viewability (must contain **VPAID_AD_PARAMETERS.URL** macro)

  - `landingUrl` (string)
    Declared landing page. If empty, landing URL will be fetched from VAST XML.

  - `eventPixels` (array)
    Additional pixels

  - `eventPixels.typ` (string, required)
    Pixel event type (must be a valid pixel type)

  - `eventPixels.url` (string, required)
    Pixel URL

  - `vendors` (array)
    T1 Vendor IDs

  - `vastVersion` (string)
    Enum: "VAST2", "VAST3", "VAST4"

  - `disabledVariants` (array)
    Disabled variant IDs

  - `externalIdentifier` (string)
    External Identifier (requires customVAST or customVASTUrl)

  - `clockNumber` (string)
    Clock Number for Clearcast (UK freewheel broadcasters)

  - `customVASTExtensionXML` (string)
    Custom VAST Extension XML

  - `fileName` (string)
    Optional. File name including extension (e.g. my-video.mp4).
When provided, a pre-signed S3 PUT URL is returned in the response.
Mutually exclusive with customVAST and customVASTUrl.
The S3 PUT request must include headers x-amz-acl: public-read and x-amz-meta-creative: .

## Response 201:

  - `201` (unknown)
    Creative created successfully

## Response 201 fields (application/json):

  - `creativeId` (integer)

  - `uploadUrl` (string)
    Pre-signed S3 PUT URL (only present when fileName was provided in the request).
Valid for expiresIn seconds. The PUT request must include headers
x-amz-acl: public-read and x-amz-meta-creative: .

  - `expiresIn` (integer)
    Seconds until uploadUrl expires (900). Only present when uploadUrl is set.

  - `status` (object)

  - `status.code` (string)

  - `status.message` (string)

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `field_error` (array)

  - `field_error.error` (string)

  - `field_error.index` (integer)
    Index in bulk request (for bulk operations)

  - `field_error.code` (string)

  - `field_error.name` (string)

  - `field_error.field` (string)

