Skip to main content

Messages

Obtain higher security with our messaging system, surpassing the vulnerabilities of email communication over public networks. Messages remain safeguarded and are seamlessly accessed through our REST API, allowing you to retrieve them on demand while upholding the utmost confidentiality.

Flow chart

The diagram below illustrates the information flow encompassing the ITX end user, ITX backend, your backend, and finally, your end user. It is crucial to note that direct communication between our servers and the end user must be avoided. Instead, your backend should manage all authentication processes, bridging interactions between your end user and backend, as well as between your backend and our own backend systems.

Sending messages

Messages are created by sending a multipart/form-data POST request to /rest/itxems/message. The endpoint accepts two fields in the form: data and files. data is required, must contain JSON and have Content-Type set to application/json. The expected data model is described in the Open API specification. files is an optional array of files (0-indexed) which can be used to add both inline and embedded attachments to the message. All embedded images must have a Content-Type that's included in the image/* content type. For example image/jpeg. Embedded images must also be referred to within the body field.

ITX will substitute all files[x] origins with direct hyperlinks to our dedicated storage servers. An example of this is src="rest/core/corefile/i/388537". To access these resources, proper authentication is required. Consequently, you will need to employ your own backend as a proxy for GET requests, ensuring that authentication is added.

Example:

<img width="100px" src="files[0]" />

Example sending a message (from customer) with 1 embedded image and 1 PDF attachment:

POST <endpoint>/rest/itxems/message
Content-Type: multipart/form-data; boundary=7515efc9e7db416d86cea913c1a949ff
Content-Length: 8642

--7515efc9e7db416d86cea913c1a949ff
Content-Disposition: form-data; name="data"
Content-Type: application/json
{
"eeexId": 3378825,
"direction": 2,
"subject": "Jeg har et spørsmål",
"body": "<p>Hei!<br>Kan dere se på dette...?<br>Mvh. ITX<br><img width='100px' src='files[0]'></p>",
"createCase": true
}
--7515efc9e7db416d86cea913c1a949ff
Content-Disposition: form-data; name="files"; filename="itx_logo.png"
Content-Type: image/png
...DATA...
--7515efc9e7db416d86cea913c1a949ff
Content-Disposition: form-data; name="files"; filename="sample.pdf"
Content-Type: application/pdf
...DATA...
--7515efc9e7db416d86cea913c1a949ff--

Supported attributes

NameTypeRequiredDescription
eactIdnumberNoPrimary identifier of the message. Should be provided when sending / updating message drafts
conversationEactIdnumberNoPrimary identifier of the first message in the conversation
replyToEactIdnumberNoPrimary identifier of the reply to activity. Should be provided when replying to a specific message
corpIdnumberNoCorporation corpId. Defaults to users selected corporation
eeexIdnumberyesEntity extension eeexId (customer ID)
contactEeexIdnumbernoContact person entity extension eeexId (contact person ID)
directionnumberyesMessage direction. 1 - OUT, or to customer, 2 - IN, or from customer
subjectstringyesMessage subject
bodystringyesHTML message body
isDraftbooleannoSet to true when saving drafts. Drafts should not be delivered to the recipient on the API consumer side
userIdnumbernoUsed ID of the message sender/receiver. Must be set when sending drafts created by another user than the executing user
caseEactIdnumberif createCase is falseCase eactId that the message should be connected to
createCasebooleanif caseEactId is not setAutomaticly create a new case connected to the sent message. Entity extension eeexId must be set
caseStatusEmstIdnumbernoStatus for the case (emstId). Can be used to automaticly close the created case
caseCategoryCtnoIdnumbernoDefined which category (ctnoId) the created case should have
caseQueueUcquIdnumbernoDefined which queue (ucquId) the created case should have

Retrieving messages

Used to search for messages. Check OpenAPI specification for complete data models

POST <endpoint>/rest/itxems/message/search

Supported attributes:

AttributeTypeRequiredDescription
eactIdnumbernoPrimary identifier of the message
conversationEactIdnumbernoPrimary identifier of the first message in the conversation, so that this id is equal to the eactId for the first message. Must be specified when retrieving messages in a specific conversation.
corpIdnumbernoCorporation
eeexIdnumbernoEntity extension (customer / prospect etc.)
contactEeexIdnumbernoContact entity extension
directionnumbernoMessage direction. 1 - OUT, or to customer, 2 - IN, or from customer
isDraftbooleannoIf set, retrieves only drafts or delivered messages
userIdnumbernoSender/reciever User
getConversationsbooleannoDefines if only first (conversation initating) messages should be retrieved
getContentbooleannoSet to true if to retrieve HTML content
limitFromnumbernoPagination, number of messages to skip from result
limitTonumbernoPagination, page size
getTotalActivityCountbooleannoIf set, total found entries will be returned in response header ITX-Total-Found