Attaching files to ticket comments via API

Last updated: November 4, 2026

Overview

You can now attach files like PDFs or images to ticket comments using the API. This is useful for workflows that involve third-party systems—such as network monitoring tools—that automatically create tickets and need to include attachments.

Steps

To attach a file to a ticket comment via the API, follow the steps below.

  1. Create a ticket comment.
    Use the CreateTicketComment mutation to create a comment on the ticket you want to attach the file to.

  2. Generate an upload URL for the file.
    Use the CreateTicketCommentAttachmentUploadUrl mutation. 

    A successful call will return:

    • File key: Used to reference the uploaded file

    • URL: The pre-signed URL where the file must be uploaded

  3. Upload the file.
    Use the provided URL from Step 2 to upload your file using a standard HTTP PUT request. Make sure the content type matches the file format.

  4. Create the ticket comment attachment.
    Use the CreateTicketCommentAttachments mutation.

    Provide:

    • file key: From Step 2

    • file name: e.g., error-log.pdf

    • file type: e.g., application/pdf