# Attachment

Represents a relation between a Salesforce record and a file or folder.

> Kind: Apex type · Updated: 2026-07-01

An Attachment represents a relation between a Salesforce record and a file or folder. It is returned by Client.createAttachments() and Client.getAttachments(), and referenced when removing a relation via Client.deleteAttachments().

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | optional | CloudFiles Id of the attachment. |
| resource | <a href="#/apex-type-resource">Resource</a> | optional | Resource object which is attached to the record. |
| objectId | String | optional | Id of the Salesforce record the resource is attached to. |
