Create Asset
What are Assets?
Kevel Assets provide cloud-based processing and hosting for media files. Assets complement Creatives, providing a building block for multimedia advertisements. While small pre-processed media (images, audio files) can be added directly to Creatives, Assets allow you to upload large master files directly to Kevel.
For more detailed information about Assets, please see the Assets documentation.
Uploading a File
You will receive an UploadURL after creating an Asset unless you have provided your own ContentURL. This is where you will be uploading your file to.
Upload a video
The URL expires 1 hour after creation and may only be used once. The Asset should be deleted and a new one created if the URL expires or an unintended file has been uploaded.
Use the UploadURL to upload in your client
Using cURL:
curl -v -X PUT -T myvideo.mp4 "$UPLOAD_URL"
The file will be processed once uploaded. You can keep track of its Status by retrieving the Asset:
A ContentURL is also provided to download/stream the uploaded file.
API Syntax
When using the Create Asset API call, it is important to understand the syntax required to make the request. There is a specific request format that must be followed to ensure the endpoint can process the request. The format is:
POST https://api.kevel.co//v1/advertiser/{advertiser_id}/asset
Where:
POST- the type of API request being made.https://api.kevel.co- the URL for the request.v1- the API version.advertiser/{advertiser_id}/asset- the API endpoint being called.
Parameters
- advertiser_id : int32 (required) - The ID of the Kevel Advertiser that the Asset belongs to.
- Name : string (required) - The Asset name.
- Type : string (enum, required) - The type of Asset. Allowed values:
video|image. - ContentURL : string - Optionally provide a link to your own externally hosted file instead of uploading a file to Kevel storage.
Example Responses
200
{
"Id": 12345,
"AdvertiserId": 56789,
"Name": "The Asset name",
"Status": "pending",
"Type": "video",
"UploadURL": "The direct upload URL",
"IsDeleted": false
}
400
Updated 10 months ago.