---
title: "Element <attachment>"
source: https://dev.pageseeder.com/api/elements/element_attachment.html
description: "API Element reference for <attachment>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~293
---

# \<attachment\>

## Summary

An attachment to a comment.

The `<attachment>` element wraps a single `<uri>` element to indicate that the URI is attached to the comment.

## Usage context

| Permitted content | `<uri>` |
| --- | --- |
| Permitted parent | `<comment>` |

## Attributes

This element has no attributes.

## Examples

## Example

```lang-xml

<attachment>
  <uri id="197142"
       scheme="https"
       host="example.com"
       port="443"
       path="/ps/example/test/attachments/2016/07/Facts.pdf"
       decodedpath="/ps/dev/ps/attachments/2016/07/Facts.pdf"
       external="false"
       mediatype="application/pdf"
       created="2016-07-22T15:04:43+10:00"
       modified="2016-07-22T15:04:43+10:00"
       size="1136435">
    <displaytitle>Albatross Facts</displaytitle>
  </uri>
</attachment>
```

## Schema

### XML schema

```lang-xml

<xs:element name="attachment" type="attachment"/>

<xs:complexType name="attachment">
  <xs:sequence>
    <xs:element name="uri" type="uri"/>
  </xs:sequence>
</xs:complexType>
```

### Relax schema

```lang-relax

element attachment {
   uri
}
```

## Compatibility

No change since initial API release.

