younifyd
Menu

List Ticket Comments

List Comments

GET/api/v2/tickets/{ticket_id}/comments

Use it in a workflow

  1. Add a step and choose the Zendesk connector.
  2. Pick the List Ticket Comments action (under Ticket Comments).
  3. Fill in the fields below, then reference the result from later steps as {{listTicketComments.response.data}}.

Request

Path parameters

ticket_idinteger (int64)required

The ID of the ticket

Query parameters

include_inline_imagesboolean

Default is false. When true, inline images are also listed as attachments in the response

includestring

Accepts "users". Use this parameter to list email CCs by side-loading users. Example: `?include=users`. **Note**: If the comment source is email, a deleted user will be represented as the CCd email address. If the comment source is anything else, a deleted user will be represented as the user name.

per_pageinteger

Number of records to return per page. Note: Default and maximum values vary by endpoint. Check endpoint-specific documentation for limits.

sort_orderstring

Sort order. Defaults to "asc"

One ofascdesc

pageobject

Cursor-based pagination parameters (JSON:API style). Supports nested parameters: - `page[size]` - Number of records per page (default varies by endpoint, typically 100) - `page[after]` - Cursor token to fetch records after this position - `page[before]` - Cursor token to fetch records before this position Example: `?page[size]=50&page[after]=eyJvIjoiaWQiLCJ2IjoiYVFFPSJ9`

afterstring

Cursor token for fetching next page

beforestring

Cursor token for fetching previous page

sizeinteger

Number of records per page

Response

Returns 200 with an object. Read it in later steps with {{listTicketComments.response.data.<field>}}.

commentsarray<object>
add_short_urlboolean

Internal flag for adding short URLs to the comment

attachmentsarray<object>

Attachments, if any. See [Attachment](/api-reference/ticketing/tickets/ticket-attachments/)

audit_idinteger (int64)

The id of the ticket audit record. See [Show Audit](/api-reference/ticketing/tickets/ticket_audits/#show-audit)

author_idinteger (int64)

The id of the comment author. If null or omitted on create, defaults to the authenticated user. See [Author id](#author-id)

bodystring

The comment string. See [Bodies](#bodies)

channel_backstring

Internal channel back identifier for the comment

channel_source_idstring

Internal channel source identifier for the comment

created_atstring (date-time)

The time the comment was created

html_bodystring

The comment formatted as HTML. See [Bodies](#bodies)

idinteger (int64)

Automatically assigned when the comment is created

metadataobject

System information (web client, IP address, etc.) and comment flags, if any. See [Comment flags](#comment-flags)

plain_bodystring

The comment presented as plain text. See [Bodies](#bodies)

publicboolean

true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it

translate_tostring

The locale code to translate the comment body to.

typestring

`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)

uploadsarray<string>

List of tokens received from [uploading files](/api-reference/ticketing/tickets/ticket-attachments/#upload-files) for comment attachments. The files are attached by creating or updating tickets with the tokens. See [Attaching files](/api-reference/ticketing/tickets/tickets/#attaching-files) in Tickets

viaobject2 fields

Describes how the object was created. See the [Via object reference](/documentation/ticketing/reference-guides/via-object-reference)

json
{
  "comments": [
    {
      "attachments": [
        {
          "content_type": "text/plain",
          "content_url": "https://company.zendesk.com/attachments/crash.log",
          "file_name": "crash.log",
          "id": 498483,
          "size": 2532,
          "thumbnails": []
        }
      ],
      "author_id": 123123,
      "body": "Thanks for your help!",
      "created_at": "2009-07-20T22:55:29Z",
      "id": 1274,
      "metadata": {
        "system": {
          "client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36",
          "ip_address": "1.1.1.1",
          "latitude": -37.000000000001,
          "location": "Melbourne, 07, Australia",
          "longitude": 144.0000000000002
        },
        "via": {
          "channel": "web",
          "source": {
            "from": {},
            "rel": "web_widget",
            "to": {}
          }
        }
      },
      "public": true,
      "type": "Comment"
    }
  ]
}

Need more? See the Zendesk guide for connection setup and behaviour shared by every action.