Note
  • 16 Jun 2022
  • 2 Minutes to read
  • Dark
    Light

Note

  • Dark
    Light

Article summary

Note

Note of the ticket.

Note JSON Format

Note is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the ticket note.
ticketIdselfIncrementIdId of the ticket which the note belongs to.
agentIdguidId of the agent who sent the note.
createdTimedatetimeTime when the note was created.
textstringContent of the note. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
attachmentsattachments[]Reference to NoteAttachment.
noteMentionsnoteMentions[]Reference to NoteMention.

NoteAttachment JSON Format:

NameTypeDescription
idguidId of the attachment.
noteIdguidId of the note which the attachment belongs to.
fileKeystringUnique key in file service.
namestringName of the attachment.
sizeintegerSize of the attachment.
typestringType of the attachment. Allowed values are "video", "audio", "image", "file".
urlstringDownload URL of the attachment.

NoteMention JSON Format:

NameTypeDescription
isReadByAgentboolWhether the mention has been read by agent or not.
noteIdguidId of the note which the mention belongs to.
idguidId of the mention.
agentIdguidId of the mentioned agent.
ticketIdselfIncrementIdId of the ticket which the note belongs to.

Get a single Note

GET ticketing/notes/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "ticketingNoteAttachment", "ticketingNoteMention", "agent".
  • Response:

Note

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/notes/4d103607-f113-4884-8f7e-735f6fefdbf9 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "4d103607-f113-4884-8f7e-735f6fefdbf9",
  "ticketId": "11",
  "agentId": "28ae8e63-4b5c-4504-a8fe-004eb34fdd15",
  "createdTime": "2021-04-26T10:52:24.336Z",
  "text": "data:text/plain;base64,MTEx",
  "attachments": [
      {
          "id": "ebab1bdc-e74c-4e7d-aa35-810393199e9b",
          "noteId": "4d103607-f113-4884-8f7e-735f6fefdbf9",
          "fileKey": "isqo-ngLG1Vw7Uh0ieeIGXSjVoAX2DhmQKeWmi7",
          "name": "my file",
          "size": 10,
          "type": "file",
          "url": "http://myfile/url"
      }
  ],
  "noteMentions": [
      {
          "isReadByAgent": false,
          "noteId": "4d103607-f113-4884-8f7e-735f6fefdbf9",
          "id": "277ed089-94de-4751-926e-bcae2fde95d4",
          "agentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b",
          "ticketId": "11"
      }
  ]
} 

Get the list of Note

GET ticketing/tickets/{id}/notes

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "ticketingNoteAttachment", "ticketingNoteMention", "agent".
  • Response:

An array of Note

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/tickets/4d103607-f113-4884-8f7e-735f6fefdbf9/notes \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "id": "4d103607-f113-4884-8f7e-735f6fefdbf9",
      "ticketId": "11",
      "agentId": "28ae8e63-4b5c-4504-a8fe-004eb34fdd15",
      "createdTime": "2021-04-26T10:52:24.336Z",
      "text": "data:text/plain;base64,MTEx",
      "attachments": [
          {
              "id": "ebab1bdc-e74c-4e7d-aa35-810393199e9b",
              "noteId": "4d103607-f113-4884-8f7e-735f6fefdbf9",
              "fileKey": "isqo-ngLG1Vw7Uh0ieeIGXSjVoAX2DhmQKeWmi7",
              "name": "my file",
              "size": 10,
              "type": "file",
              "url": "http://myfile/url"
          }
      ],
      "noteMentions": [
          {
              "isReadByAgent": false,
              "noteId": "4d103607-f113-4884-8f7e-735f6fefdbf9",
              "id": "277ed089-94de-4751-926e-bcae2fde95d4",
              "agentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b",
              "ticketId": "11"
          }
      ]
  }
] 

Create a new Note

POST ticketing/notes

  • Parameters:

NameTypeinRequiredDescription
ticketIdselfIncrementIdbodyyesId of the ticket which the note belongs to.
textstringbodynoContent of the note. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
attachmentsattachments[]bodynoThe list of note attachment.
  • Response:

Note

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/notes \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"ticketId":"11","text":"data:text/plain;base64,MTEx","attachments":[{"fileKey":"isqo-ngLG1Vw7Uh0ieeIGXSjVoAX2DhmQKeWmi7","name":"my file","size":10,"type":"file","url":"http://myfile/url"}],"noteMentions":[{"isReadByAgent":false,"agentId":"bdf96bad-890f-4af5-8f4e-42d2cc29e61b","ticketId":"11"}]}' 

Response:

HTTP/1.1 201 Created

{
  "id": "4d103607-f113-4884-8f7e-735f6fefdbf9",
  "ticketId": "11",
  "agentId": "28ae8e63-4b5c-4504-a8fe-004eb34fdd15",
  "createdTime": "2021-04-26T10:52:24.336Z",
  "text": "data:text/plain;base64,MTEx",
  "attachments": [
      {
          "id": "ebab1bdc-e74c-4e7d-aa35-810393199e9b",
          "noteId": "4d103607-f113-4884-8f7e-735f6fefdbf9",
          "fileKey": "isqo-ngLG1Vw7Uh0ieeIGXSjVoAX2DhmQKeWmi7",
          "name": "my file",
          "size": 10,
          "type": "file",
          "url": "http://myfile/url"
      }
  ],
  "noteMentions": [
      {
          "isReadByAgent": false,
          "noteId": "4d103607-f113-4884-8f7e-735f6fefdbf9",
          "id": "277ed089-94de-4751-926e-bcae2fde95d4",
          "agentId": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b",
          "ticketId": "11"
      }
  ]
} 

Was this article helpful?

What's Next