# Update a attachment by ID Updates an existing attachment record. Endpoint: PUT /v1/api/attachment/{id} Version: 1.2.4 Security: X-Api-Key ## Path parameters: - `id` (string, required) Attachment ID ## Request fields (application/json): - `accountId` (string) Account ID associated with the attachment. Example: "507f1f77bcf86cd799439011" - `name` (string) Name of the attachment. Example: "receipt.pdf" - `mimeType` (string) MIME type of the attachment. Example: "application/pdf" - `originalUrl` (string) Original URL of the attachment. Example: "https://example.com/original/receipt.pdf" - `url` (string) CDN URL of the attachment. Example: "https://cdn.example.com/receipt.pdf" - `path` (string) Storage path of the attachment. Example: "/attachments/2025/01/receipt.pdf" ## Response 200 fields (application/json): - `id` (string) Unique identifier for the Attachment. Example: "o1p2q3r4s5t6u7v8w9x0y1z2" - `createdAt` (string) Timestamp when the Attachment was created. Example: "2025-12-07T19:31:48.436+00:00" - `updatedAt` (string) Timestamp when the Attachment was last updated. Example: "2025-12-07T19:35:48.436+00:00" - `companyId` (string) Company ID associated with the Attachment. Example: "o1p2q3r4s5t6u7v8w9x0y1z2" - `accountId` (string) Account ID associated with the attachment. Example: "507f1f77bcf86cd799439011" - `name` (string) Name of the attachment. Example: "receipt.pdf" - `mimeType` (string) MIME type of the attachment. Example: "application/pdf" - `originalUrl` (string) Original URL of the attachment. Example: "https://example.com/original/receipt.pdf" - `url` (string) CDN URL of the attachment. Example: "https://cdn.example.com/receipt.pdf" - `path` (string) Storage path of the attachment. Example: "/attachments/2025/01/receipt.pdf" ## Response 400 fields (application/json): - `statusCode` (number, required) HTTP status code Example: 400 - `message` (string, required) Error message describing what went wrong Example: "Validation failed: Field `schemaField` is required." - `error` (string, required) Error type/name Enum: "Bad Request", "Unauthorized", "Forbidden", "Not Found", "Conflict", "Unprocessable Entity", "Internal Server Error" ## Response 404 fields (application/json): - `statusCode` (number, required) HTTP status code Example: 404 - `message` (string, required) Error message describing what went wrong Example: "The resource was not found." - `error` (string, required) Error type/name Enum: "Bad Request", "Unauthorized", "Forbidden", "Not Found", "Conflict", "Unprocessable Entity", "Internal Server Error"