Records›Upload Documents

Upload Documents

Attach a file to a record. This endpoint uses multipart form-data, not JSON.

POSThttps://secure-api.setshape.com/api/upload/lead/document/{crmid}

Replace {crmid} with your CRM ID, the Shape system ID that belongs to your API key. Send your Authorization: YOUR_API_AUTHORIZATION_KEY header. See Authentication.

This request must be multipart/form-data. Send the file in the document field (file is also accepted).

Body parameters

Field Requirement Description
leadid Required Shape record ID.
document Required The file to upload.

Example request

curl --request POST 
  --url "https://secure-api.setshape.com/api/upload/lead/document/YOUR_CRM_ID" 
  --header "Authorization: YOUR_API_AUTHORIZATION_KEY" 
  --form "leadid=281944" 
  --form "document=@/path/to/file.pdf"

To list a record’s documents and get download links, see Get Record Documents. To remove documents, see Delete Record Documents.