Skip to main content
The Attachment API provides clean, routable URLs for downloading files attached to case notes and jobs. Files are served directly with the correct Content-Type headers and access is enforced per-request.

Download an attachment

GET /attachment/<uuid> Downloads a file by its UUID. The response streams the file content with the correct Content-Type header and a Content-Disposition: attachment header to trigger a browser download. Required permission: api.system.attachment.view
Authentication: Bearer token required
uuid
string
required
UUID of the attachment to download. Obtain this from a case note attachment list (GET /api/jobs/case-note-attachments) or job document list (GET /api/jobs/documents?action=list).
curl -X GET "https://propops.yourcompany.com/attachment/a1b2c3d4-e5f6-7890-abcd-ef0123456789" \
  -H "Authorization: Bearer <token>" \
  --output downloaded-file.pdf
On success the response body is the raw file content. HTTP status 200 is returned with headers:
Content-Type: application/pdf
Content-Disposition: inline; filename="Gas_Safety_Certificate_JOB1042.pdf"
Content-Length: 142032
Error responses are plain text (not JSON):
StatusBody
400Attachment UUID is required
403You do not have permission to download this attachment
403Invalid security key
404Attachment not found
404File not found on server

Download a thumbnail

GET /attachment/<uuid>/thumbnail Returns a thumbnail-sized JPEG version of an image attachment. Thumbnails are generated automatically on upload and cached on disk. Required permission: api.system.attachment.view
Authentication: Bearer token required
uuid
string
required
UUID of the image attachment.
curl -X GET "https://propops.yourcompany.com/attachment/a1b2c3d4-e5f6-7890-abcd-ef0123456789/thumbnail" \
  -H "Authorization: Bearer <token>" \
  --output thumbnail.jpg
On success the response body is a JPEG image:
Content-Type: image/jpeg
Content-Length: 8192
Thumbnail generation is only supported for image files (JPEG, PNG). Requesting a thumbnail for a non-image attachment (e.g. PDF) returns the original file instead.

Cache busting

You can append a version query parameter to the URL to bust browser caches when a file is replaced:
GET /attachment/<uuid>?v=1718360400
The query parameter is stripped before the UUID is resolved and does not affect the response.

Attachment sources

Attachments can be linked from several resources. Use the corresponding endpoints to list available UUIDs:
SourceList endpoint
Case note attachmentsGET /api/jobs/case-note-attachments?case_note_uuid=<uuid>
Job documentsGET /api/jobs/documents?action=list&job_uuid=<uuid>
Job photosGET /api/jobs/photos?action=list&job_uuid=<uuid>
Agent branch documentsGET /api/agents/document-thumbnail?branch_id=<id>