Get Zendesk Ticket Attachments
get_ticket_attachmentsFetch files attached to a ticket's comments, returning images embedded inline and other files as references with name, id, content type, size, and download URL.
Instructions
Download the files attached to a ticket's comments so you can look at them: images come back embedded inline, other files as text references (file name, id, content type, size, download URL). Use it to see an attached image, or a file's name, size and download URL (only images come back with their content); to learn which files a comment carries, list_ticket_comments already shows their ids. Pass those ids as attachment_ids to fetch only them, or omit it to collect the attachments of the ticket's comments, read up to a page cap (10 pages of 100 comments by default); past it the response says later comments were not scanned, and attachment_ids fetches their files. An image over the per-image size limit or past the embedded-image cap comes back as a reference saying why, and once the response size budget is spent the remaining files are counted as omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | Yes | Ticket ID — the numeric id of the ticket whose attachments to fetch. Obtain it from search_tickets or list_tickets. | |
| attachment_ids | No | Attachment IDs to fetch directly (e.g. extracted from a previous list_ticket_comments or get_ticket(include_comments=true) call). When provided, skips the comments fetch entirely. When omitted, the attachments of the ticket's comments are returned, read up to a page cap: on a very long thread the scan stops there, and the response says so. |