Human Capital Management REST API Developer Reference

Creating Attachments


URI /services/data/vXX.X/sobjects/attachment/
Description Insert new attachments

Input Parameters

For information about the supported attributes of the Attachment standard object that you can use in the POST request, see the online SOAP API Developer Guide.

Sample Code

// POST Request
 "Description":"Candidate Resume",
 "Body":" Zm9vIGJhcg==",

// POST Response
  "id" : "00Pj000000DwGFXEA3",
  "success" : true,
  "errors" : [ ]
This example shows creating an attachment using base64-encoded data for the attachment body. For an example of creating an attachment along with providing blob data for the record, see the Insert or Update Blob Data topic in the REST API Developer Guide.


You can access the REST Explorer by logging in to Salesforce Developer Workbench and browsing to Utilities | Rest Explorer.

© Copyright 2009–2019, inc. All rights reserved. Various trademarks held by their respective owners.