--- title: "Add-MediaType" slug: "scripting-add-mediatype" updated: 2026-01-22T13:55:20Z published: 2026-01-22T13:55:20Z canonical: "help.agilityblue.com/scripting-add-mediatype" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Add-MediaType ## Summary Creates a new media type. ```powershell Add-MediaType    -Entry ``` Returns a [media type](https://apidocs.agilityblue.com/#559af567-0810-408a-8ca3-c4a21e1bfde0) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [Media Type](https://apidocs.agilityblue.com/#559af567-0810-408a-8ca3-c4a21e1bfde0) Object | Yes | | ## Examples ### Create a new media type ```powershell # Create a new media type # Create an object with the necessary fields to create the media type # Note: The name field is the only required system field for the media type object $entry = @{    Name = "SFTP File Share" } # Create the media type. The created entry will be returned back. $data = Add-MediaType -Entry $entry # Output some information to help indicate that the media type was created Write-Output "Media type $($data.MediaTypeId) ($($data.Name)) was created" # For debug purposes, convert the data to output as JSON so we can see all the fields Write-Output "" Write-Output "JSON Results:" $jsonOutput = $data | ConvertTo-Json -Depth 10 # Output the data Write-Output $jsonOutput ``` Execution results: ```json Media type 16 (SFTP File Share) was created JSON Results: {  "MediaTypeId": 16,  "Name": "SFTP File Share",  "NumberOfMediaLogs": 0,  "CreatedByFullName": "Max Miller",  "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "CreatedOn": "2024-04-18T12:50:06.3941473+00:00",  "CreatedBy": null,  "LastUpdatedByFullName": "Max Miller",  "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "LastUpdatedOn": "2024-04-18T12:50:06.3941473+00:00",  "LastUpdatedBy": null } ```