POST api/Homes/{id}/media
Inserts the given media to crm. Note: Requires a valid access token to be provided in the request's auth header.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
Id of home. |
string |
Required |
Body Parameters
Media to insert.
CrmMedia| Name | Description | Type | Additional information |
|---|---|---|---|
| MediaId |
Id of media. |
integer |
Optional |
| Tags |
List of tags related to this media. |
Collection of string |
Optional |
| Data |
Base64 encoded string of the media data. |
string |
Optional |
| Name |
Name of media. |
string |
Required |
| Caption |
Caption of media. |
string |
Optional |
| MediaKey |
Key for media . |
string |
Optional |
| Ordinal |
Ordinal position of media in ablum. |
integer |
Optional |
| MimeType |
Mime type of the data. |
string |
Optional |
| Url |
Relative Url to the content. |
string |
Optional |
| Latitude |
Latitude the media was taken in. |
decimal number |
Optional |
| Longitude |
Longitude the media was taken in. |
decimal number |
Optional |
| IsAnnotation |
Indicates if the file is an annotation. |
boolean |
Optional |
| IsThumbnail |
Indicates if the file is a thumbnail. |
boolean |
Optional |
| Height |
Height of the media. |
integer |
Optional |
| Width |
Width of the media. |
integer |
Optional |
| Reference |
Used to reference the entity in CRM. |
EntityReference |
Optional |
| SystemDate |
Current system date of the client that created this object. |
date |
Optional |
| CapturedDate |
Date and time the client created this object. |
date |
Optional |
Request Formats
application/json, text/json
{
"MediaId": 1,
"Tags": [
"sample string 1",
"sample string 2"
],
"Data": "sample string 2",
"Name": "sample string 3",
"Caption": "sample string 4",
"MediaKey": "sample string 5",
"Ordinal": 6,
"MimeType": "sample string 7",
"Url": "sample string 8",
"Latitude": 1.1,
"Longitude": 1.1,
"IsAnnotation": true,
"IsThumbnail": true,
"Height": 1,
"Width": 1,
"Reference": {
"Id": "8dc6a8e8-423d-4568-8417-1c826df60545",
"LogicalName": "sample string 2",
"Name": "sample string 3"
},
"SystemDate": "2025-10-30T10:29:21.3469057-05:00",
"CapturedDate": "2025-10-30T10:29:21.3469057-05:00"
}
Response Information
Resource Description
Returns media inserted.
CrmMedia| Name | Description | Type | Additional information |
|---|---|---|---|
| MediaId |
Id of media. |
integer |
Optional |
| Tags |
List of tags related to this media. |
Collection of string |
Optional |
| Data |
Base64 encoded string of the media data. |
string |
Optional |
| Name |
Name of media. |
string |
Required |
| Caption |
Caption of media. |
string |
Optional |
| MediaKey |
Key for media . |
string |
Optional |
| Ordinal |
Ordinal position of media in ablum. |
integer |
Optional |
| MimeType |
Mime type of the data. |
string |
Optional |
| Url |
Relative Url to the content. |
string |
Optional |
| Latitude |
Latitude the media was taken in. |
decimal number |
Optional |
| Longitude |
Longitude the media was taken in. |
decimal number |
Optional |
| IsAnnotation |
Indicates if the file is an annotation. |
boolean |
Optional |
| IsThumbnail |
Indicates if the file is a thumbnail. |
boolean |
Optional |
| Height |
Height of the media. |
integer |
Optional |
| Width |
Width of the media. |
integer |
Optional |
| Reference |
Used to reference the entity in CRM. |
EntityReference |
Optional |
| SystemDate |
Current system date of the client that created this object. |
date |
Optional |
| CapturedDate |
Date and time the client created this object. |
date |
Optional |
Response Formats
application/json, text/json
{
"MediaId": 1,
"Tags": [
"sample string 1",
"sample string 2"
],
"Data": "sample string 2",
"Name": "sample string 3",
"Caption": "sample string 4",
"MediaKey": "sample string 5",
"Ordinal": 6,
"MimeType": "sample string 7",
"Url": "sample string 8",
"Latitude": 1.1,
"Longitude": 1.1,
"IsAnnotation": true,
"IsThumbnail": true,
"Height": 1,
"Width": 1,
"Reference": {
"Id": "1f3656d4-6ba0-4e19-81a4-81c67aae1bb1",
"LogicalName": "sample string 2",
"Name": "sample string 3"
},
"SystemDate": "2025-10-30T10:29:21.3469057-05:00",
"CapturedDate": "2025-10-30T10:29:21.3469057-05:00"
}