Uploads a file to a specified media group associated with a given account. This is a multipart/form-data POST operation. Required parameters include 'account_id' and 'media_group_id'. Optional parameters include 'width', 'height', and 'maintain_aspect_ratio'. The JSON response representing the uploaded media asset.
{ "file": "File /* The binary media file to be uploaded. Should be included in the request body. Required. */"}
| Name | Type | Required Field | Description |
|---|---|---|---|
| account_id | integer | True | The numeric ID of the of the account |
| height | integer | False | The height of the media in pixels. Type: integer (int32). Should be included in the query string. Optional. |
| maintain_aspect_ratio | boolean | False | Aspect ratio is the proportional relationship between an image's width and height as the image expands of shrinks |
| media_group_id | integer | True | The ID of the media group to associate the uploaded file with. Type: integer (int64). Should be included in the query string. Required. |
| width | integer | False | The width of the media in pixels. Type: integer (int32). Should be included in the query string. Optional. |
Change the name of a file/media.
Body:{ "file_name": "Complex_Challenges.pdf", "media_id": 23}
| Name | Type | Required Field | Description |
|---|---|---|---|
| file_name | string | True | File Name of the media |
| media_id | integer | True | The numeric ID of the of the media |
This endpoint accepts the ID (number) of a Word Document and generates a PDF file from it and then stores it into the same media_group of the Document
Body:{ "media_id": 23}
| Name | Type | Required Field | Description |
|---|---|---|---|
| media_id | integer | True | The numeric ID of the of the media/file |
This endpoint accepts HTML code and generate a PDF file from it and then stores it into the specified media_group
Body:{ "file_name": "PDF_Template1", "html_content": "<!DOCTYPE html>\n<html>\n<body>\n\n<h1>My First Heading</h1>\n<p>My first paragraph.</p>\n\n</body>\n</html>", "media_group_id": 113}
| Name | Type | Required Field | Description |
|---|---|---|---|
| file_name | string | True | Simple FileName of this template |
| html_content | string | True | HTML code that should used to create a PDF template |
| media_group_id | integer | True | Identification of the media_group |
This endpoint accepts the ID (number) of an Image and generates a PDF file from it and then stores it into the same media_group of the Image
Body:{ "media_id": 23}
| Name | Type | Required Field | Description |
|---|---|---|---|
| media_id | integer | True | The numeric ID of the of the media/file |
Retrieves a file from the media storage using a unique file key. This is a GET operation. The output is a binary stream representing the file content.
Retrieves a file from the media storage using a unique mediaId. This is a GET operation. The output is a binary stream representing the file content.
| Name | Type | Required Field | Description |
|---|---|---|---|
| media_id | integer | True | The numeric ID of the of the media |
Generate image thumbnails with dimensions (in pixels) and aspect ratio.
Body:{ "height": 200, "maintain_aspect_ratio": false, "media_group_id": 113, "media_id": 23, "width": 200}
| Name | Type | Required Field | Description |
|---|---|---|---|
| height | integer | True | Image height (in pixels) |
| maintain_aspect_ratio | boolean | False | Aspect ratio is the proportional relationship between an image's width and height as the image expands of shrinks |
| media_group_id | integer | True | Identification of the media_group |
| media_id | integer | True | The numeric ID of the of the media |
| width | integer | True | Image width (in pixels) |
Retrieves the variations (thumbnails, etc..) for a specific media item. This is a GET operation. The JSON response contains media properties such as path, MIME type, and dimensions.
| Name | Type | Required Field | Description |
|---|---|---|---|
| media_id | integer | True | The numeric ID of the of the media |
Retrieves metadata for a specific media item by its ID. This is a GET operation. The JSON response contains media properties such as path, MIME type, and dimensions.
| Name | Type | Required Field | Description |
|---|---|---|---|
| media_id | integer | True | The numeric ID of the of the media |
Deletes a media item identified by its ID. This is a DELETE operation. Returns HTTP 200 if successful, or 204 if the item is already removed.
| Name | Type | Required Field | Description |
|---|---|---|---|
| media_id | integer | True | The numeric ID of the of the media |
| delete_all_media_versions | boolean | False | This flag determines if a parent file (or media file) should be deleted including it's file variations |