saveAttachment
saveAttachment
Overview
This method saves an attachment against a record, as an alternative to the regular web-based attachment upload function.
This method requires the Attachments:Save permission to be associated with your role.
Permissions
The permission for this api is stored in [gb_api_permissions]permission as 'Attachments:Save'.
Only roles with a stored link to this permission in [gb_role_api_permissions] can run this api.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/gb/attachments https://api.{{environment}}.catch-e.com/gb/attachments https://api.test.catch-e.com/gb/attachments Input Fields (Header)
Input Fields (Form Data)
The request body is sent as multipart form data (multipart/form-data).
Response Details
Success
201 - Created
Returns the saved attachment.
{ "attachment_id": "1234", "table_name": "fm_approvals", "record_id": "5678", "filename": "invoice", "extension": "pdf", "md5": "[MD5-HASH]", "file_size": 204800, "notes": "Supplier invoice", "user_id": "1234", "created": "2026-01-15T09:30:00Z", "duplicate_check": false, "status_flag": "active", "_links": { "self": { "href": "https://api.catch-e.loc/gb/attachments/1234" } } } Error Response Details
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Not Found" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Not Acceptable" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unsupported Media Type", "status": 415, "detail": "Not Acceptable" } { "warning_messages": {}, "validation_messages": { "fieldName": { "validationExceptionCode": "A textual description of the validation exception" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" }