---
schema_version: "1"
id: e546bcc3ec85a289af2a95f4c68b3d0a3429afa06cfcdd29cbb049618fe57401
title: ConnectApi.ContentAttachmentInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_contentAtt.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_contentAtt.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8c77f96f4ef878a435e7f1366d9068e9e2b79f1894980c2550ef04d2920967bc
description: Used to attach existing content to a comment or feed item.
---
# ConnectApi.ContentAttachmentInput

Used to attach existing content to a comment or feed item.

![Important](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/images/icon_note_important.png)

#### Important

This class isn’t available in version 32.0 and later. In version 32.0 and later, use [ConnectApi.ContentCapabilityInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_content_capability.htm "Attach or update a file on a comment. Use this class to attach a new file or update a file that has already been uploaded to Salesforce.").

Subclass of [ConnectApi.FeedItemAttachmentInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_FeedItemAtt.htm "Used to attach a file to a feed item.").

| Property | Type | Description | Available Version |
| --- | --- | --- | --- |
| contentDocumentId | String | ID of the existing content. | 28.0–31.0 |