Create an asset
This method creates an asset by uploading an image file or providing a publicly accessible URL.
Note the following about creating assets:
- The platform will automatically delete assets not associated with any entity 72 hours after creation.
- You can associate a single asset with multiple entities.
The images you wish to use must meet the following requirements:
- Format: JPEG and PNG.
- Dimension: Must be at least 64 x 64 pixels.
- Size: Must not exceed 5MB.
Ensure URLs point directly to the raw image file without requiring user interaction.
Upload options:
- Local file: Set the
method
parameter todirect
and use thefile
parameter to specify the image file. - Publicly accessible URL: Set the
method
parameter tourl
and use theurl
parameter to specify the URL of your image file.
Headers
Request
Specifies the upload method for the asset. Use direct
to upload a local image file or url
for a publicly accessible URL.
Specify this parameter to upload a file from your local file system. This parameter is required when method
is set to file
.
Specify this parameter to upload a file from a publicly accessible URL. This parameter is required when method
is set to url
.
Response
The date and time, in RFC 3339 format (“YYYY-MM-DDTHH:mm:ssZ”), when the asset was created.