Query parameters
| Parameter | Description | |
|---|---|---|
librarystring |
optional | One of sharepoint, msteams, google, onedrive, box, dropbox, cloudfiles, s3, azure, hubspot, azurefiles, sftp |
driveIdstring |
optional | Drive Id. Required when library is sharepoint or msteams. |
Header parameters
| Parameter | Description | |
|---|---|---|
Authorizationstring |
optional | Replace the API_Key placeholder with your actual API key. |
Request body
{
"resource": "{{resource-id}}",
"resourceType": "folder",
"source": "SALESFORCE",
"objectType": "contact",
"objectId": "003dL00001Xml6JQAR"
}Example request
curl --request POST \ --url 'https://api.cloudfiles.io/v1/attachments?library=string&driveId=string' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header 'authorization: Bearer API_Key' \ --data '"{\n \"resource\": \"{{resource-id}}\",\n \"resourceType\": \"folder\",\n \"source\": \"SALESFORCE\",\n \"objectType\": \"contact\",\n \"objectId\": \"003dL00001Xml6JQAR\"\n}"'
Response body
{
"id": "att_123",
"type": "external",
"objectId": "deal_456",
"objectType": "hubspot_deal",
"createdAt": "2026-07-05T10:00:00Z",
"createdBy": "usr_1"
}