Skip to content

Delete a file

`DELETE https://api.copper.com/developer_api/v1/{{entity_type}}/{{entity_id}}/files/{{file_id}}

This API endpoint allows the user to delete a file that was previously uploaded, where {{entity_type}} and {{entity_id}} are replaced with the following:

Field Type Details Default
entity_type* string Must be one of: "leads", "people", "opportunities", "companies", "projects"
entity_id* number ID of the entity record
file_id* number ID of the attached file

* indicates a required field

Example Requests

Delete a file

curl --location --request DELETE "https://api.copper.com/developer_api/v1/{{entity_type}}/{{entity_id}}/files/{{file_id}}" \
  --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
  --header "X-PW-Application: developer_api" \
  --header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
  --header "Content-Type: application/json"
{
  "removed": true,
  "resource": {
    "id": 473015532,
    "type": "filedocument"
  }
}