Skip to content

Delete multiple document attachments in bulk with a JSON or CSV input file. This works for version-specific attachments and attachments at the document level.

  • The maximum input file size is 1GB.
  • The values in the input must be UTF-8 encoded.
  • CSVs must follow the standard format.
  • The maximum batch size is 500.
DELETE/api/{version}/objects/documents/attachments/batch
NameDescription
Content-Typeapplication/json or text/csv
Acceptapplication/json (default) or text/csv or application/xml

Prepare a CSV or JSON input file.

NameDescription
idThe attachment ID to delete.
document_id__vOptional: The source document id value.
external_id__vOptional: Identify documents by their external ID instead of regular id. You must also add the idParam=external_id__v query parameter.
curl -X DELETE -H "Authorization: {SESSION_ID}" \ -H "Content-Type: text/csv" \ -H "Accept: text/csv" \ --data-binary @"C:\Vault\Documents\delete_attachments.csv" \ https://myvault.veevavault.com/api/v18.1/objects/documents/attachments/batch
{ "responseStatus": "SUCCESS", "data": [ { "responseStatus": "SUCCESS", "id": 26 } ] }

On SUCCESS, the response returns the id of all successfully deleted attachments. You can only delete the latest version of an attachment.