Adds Attachments To A Defect Resource.
adds_attachments_to_a_defect_resourceAttach a file to an existing defect in Procore by providing the defect, company, and project IDs. Creates an attachment record and returns the new attachment ID.
Instructions
Either provide a file_id already obtained from the File Access Service (FAS), or omit it to have FAS create a new file record. The response includes the file_id and, when FAS creates the record, an upload URL the client uses to upload the file content. company_id and project_id default to the values set by procore_set_config when omitted, and id must identify an existing parent record — resolve it with the matching list tool first. Creates the attachment and returns it with its new id (HTTP 201); calling it again creates another record. Failures come back as an error payload carrying the HTTP status — commonly 401 when the token has expired, 403 without tool permission, and 404 when an id does not resolve. Required parameters: id, company_id, project_id. Procore API (v2.0): Resource Management > Materials Management. Endpoint: POST /rest/v2.0/companies/{company_id}/projects/{project_id}/materials_mgmt/defects/{id}/attachments
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | URL path parameter — the ID of the defect | |
| company_id | Yes | URL path parameter — the company identifier | |
| project_id | Yes | URL path parameter — the project identifier |