Chilkat Online Tools

PureBasic / Support API / List Suspended Tickets

Back to Collection Items

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    CkHttp::setCkBasicAuth(http, 1)
    CkHttp::setCkLogin(http, "login")
    CkHttp::setCkPassword(http, "password")

    queryParams.i = CkJsonObject::ckCreate()
    If queryParams.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(queryParams,"sort_by","<string>")
    CkJsonObject::ckUpdateString(queryParams,"sort_order","<string>")

    CkHttp::ckSetRequestHeader(http,"Accept","application/json")

    resp.i = CkHttp::ckQuickRequestParams(http,"GET","https://example.zendesk.com/api/v2/suspended_tickets",queryParams)
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        ProcedureReturn
    EndIf

    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttpResponse::ckGetBodySb(resp,sbResponseBody)

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(jResp,sbResponseBody)
    CkJsonObject::setCkEmitCompact(jResp, 0)

    Debug "Response Body:"
    Debug CkJsonObject::ckEmit(jResp)

    respStatusCode.i = CkHttpResponse::ckStatusCode(resp)
    Debug "Response Status Code = " + Str(respStatusCode)
    If respStatusCode >= 400
        Debug "Response Header:"
        Debug CkHttpResponse::ckHeader(resp)
        Debug "Failed."
        CkHttpResponse::ckDispose(resp)

        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        CkStringBuilder::ckDispose(sbResponseBody)
        CkJsonObject::ckDispose(jResp)
        ProcedureReturn
    EndIf

    CkHttpResponse::ckDispose(resp)

    ; Sample JSON response:
    ; (Sample code for parsing the JSON response is shown below)

    ; {
    ;   "suspended_tickets": [
    ;     {
    ;       "attachments": [
    ;         {
    ;           "content_type": "<string>",
    ;           "content_url": "<string>",
    ;           "deleted": "<boolean>",
    ;           "file_name": "<string>",
    ;           "height": "<string>",
    ;           "id": "<integer>",
    ;           "inline": "<boolean>",
    ;           "malware_access_override": "<boolean>",
    ;           "malware_scan_result": "<string>",
    ;           "mapped_content_url": "<string>",
    ;           "size": "<integer>",
    ;           "url": "<string>",
    ;           "width": "<string>",
    ;           "thumbnails": [
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             },
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             }
    ;           ]
    ;         },
    ;         {
    ;           "content_type": "<string>",
    ;           "content_url": "<string>",
    ;           "deleted": "<boolean>",
    ;           "file_name": "<string>",
    ;           "height": "<string>",
    ;           "id": "<integer>",
    ;           "inline": "<boolean>",
    ;           "malware_access_override": "<boolean>",
    ;           "malware_scan_result": "<string>",
    ;           "mapped_content_url": "<string>",
    ;           "size": "<integer>",
    ;           "url": "<string>",
    ;           "width": "<string>",
    ;           "thumbnails": [
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             },
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             }
    ;           ]
    ;         }
    ;       ],
    ;       "author": {
    ;         "email": "<string>",
    ;         "id": "<integer>",
    ;         "name": "<string>"
    ;       },
    ;       "brand_id": "<integer>",
    ;       "cause": "<string>",
    ;       "cause_id": "<integer>",
    ;       "content": "<string>",
    ;       "created_at": "<dateTime>",
    ;       "id": "<integer>",
    ;       "message_id": "<string>",
    ;       "recipient": "<string>",
    ;       "subject": "<string>",
    ;       "ticket_id": "<integer>",
    ;       "updated_at": "<dateTime>",
    ;       "url": "<string>",
    ;       "via": {
    ;         "channel": "<string>",
    ;         "source": {
    ;           "from": {
    ;             "address": "<string>",
    ;             "id": "<integer>",
    ;             "name": "<string>",
    ;             "title": "<string>"
    ;           },
    ;           "rel": "<string>",
    ;           "to": {
    ;             "address": "<string>",
    ;             "name": "<string>"
    ;           }
    ;         }
    ;       }
    ;     },
    ;     {
    ;       "attachments": [
    ;         {
    ;           "content_type": "<string>",
    ;           "content_url": "<string>",
    ;           "deleted": "<boolean>",
    ;           "file_name": "<string>",
    ;           "height": "<string>",
    ;           "id": "<integer>",
    ;           "inline": "<boolean>",
    ;           "malware_access_override": "<boolean>",
    ;           "malware_scan_result": "<string>",
    ;           "mapped_content_url": "<string>",
    ;           "size": "<integer>",
    ;           "url": "<string>",
    ;           "width": "<string>",
    ;           "thumbnails": [
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             },
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             }
    ;           ]
    ;         },
    ;         {
    ;           "content_type": "<string>",
    ;           "content_url": "<string>",
    ;           "deleted": "<boolean>",
    ;           "file_name": "<string>",
    ;           "height": "<string>",
    ;           "id": "<integer>",
    ;           "inline": "<boolean>",
    ;           "malware_access_override": "<boolean>",
    ;           "malware_scan_result": "<string>",
    ;           "mapped_content_url": "<string>",
    ;           "size": "<integer>",
    ;           "url": "<string>",
    ;           "width": "<string>",
    ;           "thumbnails": [
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             },
    ;             {
    ;               "content_type": "<string>",
    ;               "content_url": "<string>",
    ;               "deleted": "<boolean>",
    ;               "file_name": "<string>",
    ;               "height": "<string>",
    ;               "id": "<integer>",
    ;               "inline": "<boolean>",
    ;               "malware_access_override": "<boolean>",
    ;               "malware_scan_result": "<string>",
    ;               "mapped_content_url": "<string>",
    ;               "size": "<integer>",
    ;               "url": "<string>",
    ;               "width": "<string>"
    ;             }
    ;           ]
    ;         }
    ;       ],
    ;       "author": {
    ;         "email": "<string>",
    ;         "id": "<integer>",
    ;         "name": "<string>"
    ;       },
    ;       "brand_id": "<integer>",
    ;       "cause": "<string>",
    ;       "cause_id": "<integer>",
    ;       "content": "<string>",
    ;       "created_at": "<dateTime>",
    ;       "id": "<integer>",
    ;       "message_id": "<string>",
    ;       "recipient": "<string>",
    ;       "subject": "<string>",
    ;       "ticket_id": "<integer>",
    ;       "updated_at": "<dateTime>",
    ;       "url": "<string>",
    ;       "via": {
    ;         "channel": "<string>",
    ;         "source": {
    ;           "from": {
    ;             "address": "<string>",
    ;             "id": "<integer>",
    ;             "name": "<string>",
    ;             "title": "<string>"
    ;           },
    ;           "rel": "<string>",
    ;           "to": {
    ;             "address": "<string>",
    ;             "name": "<string>"
    ;           }
    ;         }
    ;       }
    ;     }
    ;   ]
    ; }

    ; Sample code for parsing the JSON response...
    ; Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    v_Email.s
    Id.s
    Name.s
    brand_id.s
    cause.s
    cause_id.s
    content.s
    created_at.s
    id.s
    message_id.s
    recipient.s
    subject.s
    ticket_id.s
    updated_at.s
    url.s
    Channel.s
    Address.s
    FromId.s
    FromName.s
    Title.s
    Rel.s
    ToAddress.s
    ToName.s
    j.i
    count_j.i
    content_type.s
    content_url.s
    deleted.s
    file_name.s
    height.s
    inline.s
    malware_access_override.s
    malware_scan_result.s
    mapped_content_url.s
    size.s
    width.s
    k.i
    count_k.i

    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"suspended_tickets")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        v_Email = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].author.email")
        Id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].author.id")
        Name = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].author.name")
        brand_id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].brand_id")
        cause = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].cause")
        cause_id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].cause_id")
        content = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].content")
        created_at = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].created_at")
        id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].id")
        message_id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].message_id")
        recipient = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].recipient")
        subject = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].subject")
        ticket_id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].ticket_id")
        updated_at = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].updated_at")
        url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].url")
        Channel = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.channel")
        Address = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.from.address")
        FromId = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.from.id")
        FromName = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.from.name")
        Title = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.from.title")
        Rel = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.rel")
        ToAddress = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.to.address")
        ToName = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].via.source.to.name")
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"suspended_tickets[i].attachments")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            content_type = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].content_type")
            content_url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].content_url")
            deleted = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].deleted")
            file_name = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].file_name")
            height = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].height")
            id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].id")
            inline = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].inline")
            malware_access_override = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].malware_access_override")
            malware_scan_result = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].malware_scan_result")
            mapped_content_url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].mapped_content_url")
            size = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].size")
            url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].url")
            width = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].width")
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"suspended_tickets[i].attachments[j].thumbnails")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                content_type = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].content_type")
                content_url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].content_url")
                deleted = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].deleted")
                file_name = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].file_name")
                height = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].height")
                id = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].id")
                inline = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].inline")
                malware_access_override = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].malware_access_override")
                malware_scan_result = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].malware_scan_result")
                mapped_content_url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].mapped_content_url")
                size = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].size")
                url = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].url")
                width = CkJsonObject::ckStringOf(jResp,"suspended_tickets[i].attachments[j].thumbnails[k].width")
                k = k + 1
            Wend
            j = j + 1
        Wend
        i = i + 1
    Wend


    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(queryParams)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure

Curl Command

curl  -u login:password -G -d "sort_by=%3Cstring%3E"
	-d "sort_order=%3Cstring%3E"
	-H "Accept: application/json"
https://example.zendesk.com/api/v2/suspended_tickets

Postman Collection Item JSON

{
  "name": "List Suspended Tickets",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v2/suspended_tickets?sort_by=<string>&sort_order=<string>",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "suspended_tickets"
      ],
      "query": [
        {
          "key": "sort_by",
          "value": "<string>",
          "description": "The field to sort the ticket by, being one of `author_email`, `cause`, `created_at`, or `subject`."
        },
        {
          "key": "sort_order",
          "value": "<string>",
          "description": "The order in which to sort the suspended tickets.  This can take value `asc` or `desc`."
        }
      ]
    },
    "description": "#### Allowed For\n\n* Unrestricted agents\n\n#### Sorting\n\nYou can sort the tickets with the `sort_by` and `sort_order` query string parameters.\n"
  },
  "response": [
    {
      "name": "Success response",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v2/suspended_tickets?sort_by=<string>&sort_order=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "suspended_tickets"
          ],
          "query": [
            {
              "key": "sort_by",
              "value": "<string>",
              "description": "The field to sort the ticket by, being one of `author_email`, `cause`, `created_at`, or `subject`."
            },
            {
              "key": "sort_order",
              "value": "<string>",
              "description": "The order in which to sort the suspended tickets.  This can take value `asc` or `desc`."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"suspended_tickets\": [\n    {\n      \"attachments\": [\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\",\n          \"thumbnails\": [\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            },\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            }\n          ]\n        },\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\",\n          \"thumbnails\": [\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            },\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            }\n          ]\n        }\n      ],\n      \"author\": {\n        \"email\": \"<string>\",\n        \"id\": \"<integer>\",\n        \"name\": \"<string>\"\n      },\n      \"brand_id\": \"<integer>\",\n      \"cause\": \"<string>\",\n      \"cause_id\": \"<integer>\",\n      \"content\": \"<string>\",\n      \"created_at\": \"<dateTime>\",\n      \"id\": \"<integer>\",\n      \"message_id\": \"<string>\",\n      \"recipient\": \"<string>\",\n      \"subject\": \"<string>\",\n      \"ticket_id\": \"<integer>\",\n      \"updated_at\": \"<dateTime>\",\n      \"url\": \"<string>\",\n      \"via\": {\n        \"channel\": \"<string>\",\n        \"source\": {\n          \"from\": {\n            \"address\": \"<string>\",\n            \"id\": \"<integer>\",\n            \"name\": \"<string>\",\n            \"title\": \"<string>\"\n          },\n          \"rel\": \"<string>\",\n          \"to\": {\n            \"address\": \"<string>\",\n            \"name\": \"<string>\"\n          }\n        }\n      }\n    },\n    {\n      \"attachments\": [\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\",\n          \"thumbnails\": [\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            },\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            }\n          ]\n        },\n        {\n          \"content_type\": \"<string>\",\n          \"content_url\": \"<string>\",\n          \"deleted\": \"<boolean>\",\n          \"file_name\": \"<string>\",\n          \"height\": \"<string>\",\n          \"id\": \"<integer>\",\n          \"inline\": \"<boolean>\",\n          \"malware_access_override\": \"<boolean>\",\n          \"malware_scan_result\": \"<string>\",\n          \"mapped_content_url\": \"<string>\",\n          \"size\": \"<integer>\",\n          \"url\": \"<string>\",\n          \"width\": \"<string>\",\n          \"thumbnails\": [\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            },\n            {\n              \"content_type\": \"<string>\",\n              \"content_url\": \"<string>\",\n              \"deleted\": \"<boolean>\",\n              \"file_name\": \"<string>\",\n              \"height\": \"<string>\",\n              \"id\": \"<integer>\",\n              \"inline\": \"<boolean>\",\n              \"malware_access_override\": \"<boolean>\",\n              \"malware_scan_result\": \"<string>\",\n              \"mapped_content_url\": \"<string>\",\n              \"size\": \"<integer>\",\n              \"url\": \"<string>\",\n              \"width\": \"<string>\"\n            }\n          ]\n        }\n      ],\n      \"author\": {\n        \"email\": \"<string>\",\n        \"id\": \"<integer>\",\n        \"name\": \"<string>\"\n      },\n      \"brand_id\": \"<integer>\",\n      \"cause\": \"<string>\",\n      \"cause_id\": \"<integer>\",\n      \"content\": \"<string>\",\n      \"created_at\": \"<dateTime>\",\n      \"id\": \"<integer>\",\n      \"message_id\": \"<string>\",\n      \"recipient\": \"<string>\",\n      \"subject\": \"<string>\",\n      \"ticket_id\": \"<integer>\",\n      \"updated_at\": \"<dateTime>\",\n      \"url\": \"<string>\",\n      \"via\": {\n        \"channel\": \"<string>\",\n        \"source\": {\n          \"from\": {\n            \"address\": \"<string>\",\n            \"id\": \"<integer>\",\n            \"name\": \"<string>\",\n            \"title\": \"<string>\"\n          },\n          \"rel\": \"<string>\",\n          \"to\": {\n            \"address\": \"<string>\",\n            \"name\": \"<string>\"\n          }\n        }\n      }\n    }\n  ]\n}"
    }
  ]
}