delete_attachment
Deletes a specified attachment from a case after validating user authentication and privileges. Updates case history on success.
Instructions
Remove the specified attachment from a case. The API validates user authentication and privileges to delete the attachment based on attachment category configuration. Users can delete attachments they uploaded or any attachment of categories they have delete privileges for. After successful deletion, the case history is updated. If an attachment is linked to multiple Link-Attachment objects, only the specific link is removed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attachmentID | Yes | Full ID of the attachment to delete. Format example: "LINK-ATTACHMENT ONNS8O-TESTAPP-WORK B-2001!20211115T061748.900 GMT". This is the complete Link-Attachment instance pzInsKey that uniquely identifies the attachment in the Pega system. The attachment must exist and the user must have delete privileges for the attachment category. | |
| sessionCredentials | No | Optional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken. |