Browse endpoints

Delete an attachment

DELETE /api/v1/attachments/{attachment_uuid} operationId: attachment.delete

Base: https://portal.watcheye.com.au/api/v1/attachments/{attachment_uuid}

Soft-delete any attachment on this account, whether it was uploaded by a portal user or an API key. A subsequent show, list or download call for the attachment returns 404. The deleted attachment is returned in the response as confirmation.

See the Soft Deletion section of the API guide for the recovery window.

Attachments on an archived entity cannot be deleted; the request is rejected with 409.

Path parameters

FieldDescription
attachment_uuidrequired string (uuid)

The attachment UUID

Responses

200

Attachment deleted (soft-delete - returned as confirmation)

application/json
FieldDescription
data object

An attachment: a file attached to an entity, such as a trust deed, an ASIC extract, a signed declaration or a contract. The contents are stored encrypted and are returned by the download endpoint.

Deleting an attachment is a soft-delete: subsequent show or list calls for it return 404. Attachments on an archived entity are archived with it and cannot be changed or deleted.

data.uuid string (uuid)

The attachment's UUID

Example: 3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d

data.attachment_number string

A short public identifier for the attachment, shown in the portal

Example: EA-3C-9A1-0B7

data.entity_uuid string (uuid)

UUID of the entity the attachment is on

data.program_uuid string (uuid)

UUID of the program the entity belongs to

data.filename string

The name of the file as uploaded

Example: Smith Family Trust Deed.pdf

data.category string

What the file is. Any text up to 100 characters; Other when none is given. A category that matches an existing one on the account (ignoring case and extra spaces) is stored with the existing spelling, so trust deed is stored as Trust Deed. The categories offered in the portal are: Trust Deed, Company Constitution, Partnership Agreement, ASIC Extract, Companies House Extract, Identity Document, Proof of Address, Statutory Declaration, Declaration, Contract / Agreement, Correspondence, Financial Statement and Other.

Example: Trust Deed

data.description string or null

An optional description of the file (max 2000 characters)

Example: Signed copy received from the trustee

data.mime_type string

The type of the file, detected from its contents

Example: application/pdf

data.format string

A readable name for the type of file

Enum: PDF, Image, Word, Excel, CSV, Text, RTF, Email, Other

Example: PDF

data.size_bytes integer

The size of the file in bytes

Example: 248113

data.sha256 string

SHA-256 hash of the file contents, as lowercase hex. Files with the same hash have identical contents.

Example: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08

data.created_by object or null

Identifies who uploaded the file. The type discriminator picks the shape of the remaining fields:

  • { type: "user", uuid, username } - a portal user uploaded the file.
  • { type: "api_key", uuid, label } - an API key on this account uploaded the file.
  • null - the user or API key that uploaded the file is no longer available.
data.created_by.type string

Discriminator for the actor type.

Enum: user, api_key

data.created_by.uuid string (uuid)

UUID of the user or API key that uploaded the file.

data.created_by.username string

Username of the portal user. Present only when type is user.

data.created_by.label string

Label of the API key. Present only when type is api_key.

data.archived_at string (date-time) or null

ISO 8601 timestamp at which the attachment was archived with its entity (null if not archived)

data.created_at string (date-time)

Example: 2025-01-01T00:00:00Z

data.updated_at string (date-time)

Example: 2025-01-01T00:00:00Z

api_reference string (uuid)
409

Conflict - the attachment is on an archived entity

application/json
FieldDescription
message string

Example: Attachments on an archived entity cannot be deleted

Standard error responses: 400 401 403 404 429 5XX See common error responses