1. Home
  2. Integrations
  3. API
  4. Delete Record Attachments

Delete Record Attachments

API endpoint to delete attachments from an existing record.

Note: This API documentation is intended to give the reader an overview of the APIs capabilities and how to access them. When trying to write API calls, we strongly recommend you use the API documentation directly associated with the specific API key you will be calling. That documentation includes examples with the actual IDs of the form and form elements, includes examples for each field available in the associated forms etc. This will allow direct copy-paste of the code snippets from the documentation into your code. If you were to try and use the examples in this documentation, you would have to modify them for the fields, form ID, etc.

HTTP request

PUT https://api.gwapps.com/v1/forms/formId/records/recordId/attachments/delete

start

Note: This endpoint is exclusive to delete attachments from record with File Picker fields, only these fields can be updated through this endpoint.

Parameters

ParameterDescriptionType
Required path parameters
formIdThe current formId 66b18359dc7659dc4cb98d15string
recordIdThe recordIdstring

Request Body

ParameterDescriptionType
Required parameters
Field Short Code*Each field in the form has a unique shortCode. You can find the Field Short Codes in form “Overview” section. You can also update your field Short Codes from the Field Properties in Form Designer.* Only File Picker fields are supported. Refer to form “Overview”.

Example Request

PUT https://api.gwapps.com/v1/forms/66b18359dc7659dc4cb98d15/records/recordId/attachments/delete

start

Note: Each short code for the file picker field will contain the array of file ids you want to delete from the record.

{
  "attachment1": [
    "file1.pdf",
    "file2.pdf"
  ],
  "attachment2": [
    "file3.pdf"
  ]
}

This article covers details for a specific API call/endpoint. Details of the overall Records API structure and calls/endpoints can be found in the GW Apps Records API article. Information on creating API Keys can be found within the API section of the Platform Settings, and in the Security > API Keys section of Edit App within each application.

Updated on August 27, 2024
Was this article helpful?

Related Articles