Attaching File to Company



Is it possible to upload or link a file to the attachment section of a company using the API. We have several attached files in our other CRM that I’m trying to transfer over.


@seb_fairchild I can’t seem to get this to work, are you sure that’s the right format for the attachments? I don’t see an attachments property returned in the associations after adding the engagement.

    object(stdClass)#121768 (5) {
      array(1) {
      array(0) {
      array(0) {
      array(0) {
      array(0) {



You can only add attachments to an engagement with the parameter type:NOTE. If the engagement is a note you should get an attachments array in the response even if the engagement doesn’t have an attachment.



@seb_fairchild I’m using type:NOTE, I’ll come up with an example just using curl.



Here’s an example curl request:

curl -v -X POST -H "Content-Type: application/json" -A "SearchSpring HubSpot API" -d '{"engagement":{"active":true,"ownerId":null,"type":"NOTE","timestamp":1469116690000},"associations":{"contactIds":[29280],"attachments":[{"id":4241968539}]},"metadata":{"body":"<strong>IMPORTED FROM NUTSHELL<\/strong>"}}' 

The response I’m getting does not have the attachments array:

{"engagement":{"id":131442414,"portalId":492396,"active":true,"createdAt":1469118333628,"lastUpdated":1469118333628,"ownerId":0,"type":"NOTE","timestamp":1469116690000},"associations":{"contactIds":[29280],"companyIds":[],"dealIds":[],"ownerIds":[],"workflowIds":[]},"metadata":{"body":"<strong>IMPORTED FROM NUTSHELL</strong>"}}


Any response to this? I’ve provided a reproducible test case.


Hey @James_Bathgate

attachments should not be part of the associations object.

try this payload instead:

  "engagement": {
    "active": true,
    "type": "NOTE"
  "associations": {
    "contactIds": [
    "companyIds": [],
    "dealIds": [],
    "ownerIds": [],
    "workflowIds": []
  "attachments": [
      "id": 4241968539
  "metadata": {
    "body": "<strong>IMPORTED FROM NUTSHELL</strong>"



@seb_fairchild That works, thank you.