Get metadata of a specific attached file¶
GET https://api.copper.com/developer_api/v1/{{entity_type}}/{{entity_id}}/files/{{file_id}}
This API endpoint gets the detailed metadata for a file for a given entity type and id and the file id. File id can be found using the "List attached files of an entity record", where {{entity_type}}, {{entity_id}}, and {{file_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¶
Get metadata of a specific attached file on an existing lead¶
curl --location --request GET "https://api.copper.com/developer_api/v1/leads/210110/files/2556402" \
--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"
{
"id": 2556402,
"is_deleted": false,
"file_name": "picture.png",
"file_size": 3113,
"content_type": "binary/octet-stream",
"creator_id": 46748,
"date_created": 1558049825,
"date_modified": 1558049826
}