---
schema_version: "1"
id: 65219fd6621079834e772bf0edae4255e57da8e5be9ce814062e67aad937acf9
title: Content - Image (Connect API)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/mc-core/references/generated-api-specs/mc-next-image-content.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/references/mc-next-image-content
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0a1939dce916cfb290de2400e8d49bd2d3815c6d1a24d247ec64a28d2fae94af
products:
  - Marketing Cloud Next
  - Marketing Cloud
---
Content - Image (Connect API)

# Content - Image (Connect API)

Create and retrieve image content in a Marketing Cloud Next content workspace by using Connect API.

| Supported Use Case | HTTP Verb | URI |
| --- | --- | --- |
| Create image content | [POST](/docs/marketing/marketing-cloud-growth/references/mc-next-image-content?meta=createImage) | /services/data/{apiVersion}/connect/cms/contents |
| Retrieve image content | [GET](/docs/marketing/marketing-cloud-growth/references/mc-next-image-content?meta=getImage) | /services/data/{apiVersion}/connect/cms/contents/{contentId} |
| Update an image content variant | [PUT](/docs/marketing/marketing-cloud-growth/references/mc-next-image-content?meta=updateImageVariant) | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |
| Delete an image content variant | [DELETE](/docs/marketing/marketing-cloud-growth/references/mc-next-image-content?meta=deleteImageVariant) | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |

**Version:** v68.0

## Servers

*   `https://{subdomain}.my.salesforce.com`
    *   `subdomain (default (no default)) The unique API subdomain for your Salesforce org.`

## Operations

### POST Create an image in a content folder.

`POST /services/data/{apiVersion}/connect/cms/contents`

Operation ID: `createImage`.

#### Parameters

*   `Authorization` (header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. Replace `YOUR_ACCESS_TOKEN` with your authentication token.
    
    _Example_
    
    ```
    Bearer YOUR_ACCESS_TOKEN
    ```
    
*   `apiVersion` (path, string, required) The Salesforce API version, such as `v68.0`.

#### Request body (required)

Media type: `application/json`. Schema: `ImageRequest`.

#### Responses

*   **201** The image content was created.
    
    Media type: `application/json`. Schema: `ImageResponse`.
    
*   **400** The request is invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **401** The access token is missing
    
    Media type: `application/json`. Schema: `Error`.
    
*   **403** You don't have permission to perform this action.
    
    Media type: `application/json`. Schema: `Error`.
    

### GET Retrieve information about an image, such as its title, description, file size, and MIME type.

`GET /services/data/{apiVersion}/connect/cms/contents/{contentId}`

Operation ID: `getImage`.

#### Parameters

*   `Authorization` (header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. Replace `YOUR_ACCESS_TOKEN` with your authentication token.
    
    _Example_
    
    ```
    Bearer YOUR_ACCESS_TOKEN
    ```
    
*   `apiVersion` (path, string, required) The Salesforce API version, such as `v68.0`.
*   `contentId` (path, string, required) The ID of the image content item.

#### Responses

*   **200** The image content was retrieved.
    
    Media type: `application/json`. Schema: `ImageResponse`.
    
*   **401** The access token is missing
    
    Media type: `application/json`. Schema: `Error`.
    
*   **404** The requested content item or variant wasn't found.
    
    Media type: `application/json`. Schema: `Error`.
    

### PUT Update a variant of an image.

`PUT /services/data/{apiVersion}/connect/cms/contents/variants/{variantId}`

Operation ID: `updateImageVariant`.

#### Parameters

*   `Authorization` (header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. Replace `YOUR_ACCESS_TOKEN` with your authentication token.
    
    _Example_
    
    ```
    Bearer YOUR_ACCESS_TOKEN
    ```
    
*   `apiVersion` (path, string, required) The Salesforce API version, such as `v68.0`.
*   `variantId` (path, string, required) The ID of the managed content variant.

#### Request body (required)

Media type: `application/json`. Schema: `VariantUpdateRequest`.

#### Responses

*   **200** The image content variant was updated.
    
    Media type: `application/json`. Schema: `ImageResponse`.
    
*   **400** The request is invalid.
    
    Media type: `application/json`. Schema: `Error`.
    
*   **401** The access token is missing
    
    Media type: `application/json`. Schema: `Error`.
    
*   **404** The requested content item or variant wasn't found.
    
    Media type: `application/json`. Schema: `Error`.
    

### DELETE Delete an image content variant.

`DELETE /services/data/{apiVersion}/connect/cms/contents/variants/{variantId}`

Operation ID: `deleteImageVariant`.

#### Parameters

*   `Authorization` (header, string, required) A unique, time-limited token that you can use to issue requests to Connect API. Replace `YOUR_ACCESS_TOKEN` with your authentication token.
    
    _Example_
    
    ```
    Bearer YOUR_ACCESS_TOKEN
    ```
    
*   `apiVersion` (path, string, required) The Salesforce API version, such as `v68.0`.
*   `variantId` (path, string, required) The ID of the managed content variant.

#### Responses

*   **204** The image content variant was deleted. The response doesn't contain any content.
*   **401** The access token is missing
    
    Media type: `application/json`. Schema: `Error`.
    
*   **404** The requested content item or variant wasn't found.
    
    Media type: `application/json`. Schema: `Error`.
    

## Schemas

### ImageRequest

*   `contentSpaceOrFolderId` (_string_, required) The ID of the content workspace or folder that contains the image.
*   `contentType` (_string_, required) The image content type.  
    Allowed values: `sfdc_cms__image`.
*   `contentBody` (_ImageBody_, required)

_Example_

```
{
  "contentSpaceOrFolderId": "0Zuxx00000003M5CAI",
  "contentType": "sfdc_cms__image",
  "contentBody": {
    "sfdc_cms:title": "Product Hero Image",
    "sfdc_cms:description": "Hero banner for product page",
    "altText": "Product lifestyle shot",
    "sfdc_cms:media": {
      "source": {
        "type": "file",
        "ref": "069xx00000000001AAA",
        "size": 245760,
        "mimeType": "image/jpeg"
      }
    }
  }
}
```

### ImageResponse

*   `managedContentId` (_string_) The managed content ID.
*   `managedContentVariantId` (_string_) The managed content variant ID.
*   `contentKey` (_string_) The content key.
*   `contentBody` (_ImageBody_)

_Example_

```
{
  "managedContentId": "20YSB000004SkOz2AK",
  "managedContentVariantId": "9PsSB0000045XAj0AM",
  "contentKey": "MCJUR5WKNRHZFP7NAUQOMMNJ7CI4",
  "contentBody": {
    "sfdc_cms:title": "Product Hero Image",
    "sfdc_cms:description": "Hero banner for product page",
    "altText": "Product lifestyle shot",
    "sfdc_cms:media": {
      "source": {
        "type": "file",
        "ref": "069xx00000000001AAA",
        "size": 245760,
        "mimeType": "image/jpeg"
      }
    }
  }
}
```

### Error

*   `errorCode` (_string_, required) The error code.
*   `message` (_string_, required) A description of the error.

### VariantUpdateRequest

*   `contentBody` (_ImageBody_, required)

_Example_

```
{
  "contentBody": {
    "sfdc_cms:title": "Updated Product Hero Image",
    "altText": "Updated product lifestyle shot",
    "sfdc_cms:media": {
      "source": {
        "type": "url",
        "url": "https://example.com/images/product-hero.jpg"
      }
    }
  }
}
```

### ImageBody

*   `sfdc_cms:title` (_string_) The image title.
*   `sfdc_cms:description` (_string_) A description of the image.  
    Maximum length: 255.
*   `altText` (_string_) Alternative text that describes the image.
*   `sfdc_cms:media` (_MediaSource_, required)
*   `thumbnail` (_MediaSource_)

### MediaSource

*   `source` (_FileSource | UrlSource_, required)
    
    One of: `FileSource`, `UrlSource`.
    

### FileSource

*   `type` (_string_, required)  
    Allowed values: `file`.
*   `ref` (_string_, required) The Salesforce file ID.
*   `size` (_integer_) The file size in bytes.
*   `mimeType` (_string_) The image MIME type.  
    Allowed values: `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `image/svg+xml`.

### UrlSource

*   `type` (_string_, required)  
    Allowed values: `url`.
*   `url` (_string (uri)_, required) The URL of the image.