Attaches a file to a case.
Namespace
goss.CaseManagement.v1.api.case.caseAttachment.caseAttachmentCreate
Worker
serverlibrary
Parameters
| Required Properties | Type | Description |
|---|---|---|
| caseBusinessKey | String <businessKey> | The business key of the case |
| caseAttachmentToSave | Object | Details of the file |
| caseAttachmentToSave.id | String | The file reference |
| caseAttachmentToSave.filename | String | The file name |
| caseAttachmentToSave.field | String | A form field name, in the format from_FIELDNAME, which will make the file available to the case process variables |
| user | Object | Details of the user |
| user.siteUserName | String | The username of the person who raised the case, or a valid case manager |
| Optional Properties | Type | Description |
| n/a | n/a | n/a |
{
"caseAttachmentToSave": {
"filename": "Abc",
"field": "Abc",
"id": "Abc"
},
"caseBusinessKey": "0123-4567-8901-2345",
"user": {
"siteUserName": "Abc"
}
}
Rules
| Rule | Validation error |
|---|---|
| User must exist | Could not retrieve siteUser details |
| Case must exist | Could not retrieve case Case 1234-5678-9012-3456 |
| Case must be active | User aUser does not have permissions to add an attachment |
| User must be the case owner, a member of the case managers group or the case manager if one is assigned | User aUser does not have permissions to add an attachment |
Behaviour
If the validation rules pass
- Adds the attachment to the case
- A system note will be recorded to case history documenting the addition
Last modified on 11 September 2026
