Attach a file to a lead
Attach a file directly to a lead. First upload the file with the Files API, then pass its download url here with a filename. You can also pass the download_url of a file already in Close. Files can be at most 25 MB.
If the lead already has a file with the same name and contents, that file is updated instead of creating a copy, and its original date_created is kept. The response is 201 either way.
Returns 403 if you can’t see the lead, and 404 if it doesn’t exist.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
ID of the lead, e.g. lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty.
Request
Name to give the file on the lead, e.g. contract.pdf.
URL of the file to attach: the download URL from the Files API upload, or the download_url of a file already in Close. Must be a file you have access to, of at most 25 MB.
Deprecated: ignored. The content type is read from the uploaded file.
Response
Checksum of the file’s contents, usually its MD5 hash. A lead has at most one file with a given name and checksum.
MIME type of the file, e.g. application/pdf.
Unique ID of the file, prefixed with file_.
Type of the object in last_object_id.
File name, e.g. contract.pdf.