# Show an attachment

`GET /attachments/{attachment_uuid}`

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

Returns the details of a single attachment by its UUID. Use the
[download](/docs/reference/attachment.download) endpoint for the file contents.

## Parameters

| Name | In | Type | Description |
|------|----|------|-------------|
| `attachment_uuid` | path | string (uuid) | **Required.** The attachment UUID |

## Responses

### 200 Attachment response

Content type: `application/json`

| Field | Type | Description |
|-------|------|-------------|
| `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](/docs/reference/attachment.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) |  |

**Sample response**

```json
{
    "data": {
        "uuid": "3f2b1c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "attachment_number": "EA-3C-9A1-0B7",
        "entity_uuid": "00000000-0000-0000-0000-000000000000",
        "program_uuid": "00000000-0000-0000-0000-000000000000",
        "filename": "Smith Family Trust Deed.pdf",
        "category": "Trust Deed",
        "description": "Signed copy received from the trustee",
        "mime_type": "application/pdf",
        "format": "PDF",
        "size_bytes": 248113,
        "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
        "created_by": {
            "type": "user",
            "uuid": "00000000-0000-0000-0000-000000000000",
            "username": "string",
            "label": "string"
        },
        "archived_at": "2024-01-01T00:00:00Z",
        "created_at": "2025-01-01T00:00:00Z",
        "updated_at": "2025-01-01T00:00:00Z"
    },
    "api_reference": "00000000-0000-0000-0000-000000000000"
}
```

Standard error responses: 400, 401, 403, 404, 429, 5XX (see [Common error responses](/docs/reference/general/common-error-responses.md))

