PUT api/Media/{id}

Updates the given media to crm, excluding the data field. All fields are updated except Data, CapturedDate and Tags. Note: Requires a valid access token to be provided in the request's auth header.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Id of media to update.

string

Required

Body Parameters

Media to update.

CrmMedia
NameDescriptionTypeAdditional 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

Sample:
{
  "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": "b2113e1f-7074-467f-9da9-4ce1de992002",
    "LogicalName": "sample string 2",
    "Name": "sample string 3"
  },
  "SystemDate": "2025-05-23T17:13:36.3233859-05:00",
  "CapturedDate": "2025-05-23T17:13:36.3233859-05:00"
}

Response Information

Resource Description

Returns media updated.

CrmMedia
NameDescriptionTypeAdditional 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

Sample:
{
  "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": "70f9484f-20e5-407c-b5de-4828f618bd34",
    "LogicalName": "sample string 2",
    "Name": "sample string 3"
  },
  "SystemDate": "2025-05-23T17:13:36.3233859-05:00",
  "CapturedDate": "2025-05-23T17:13:36.3233859-05:00"
}