Message Thread endpoint

The Message Thread endpoint and fields are described below including details of the supported RESTful CRUD verbs. For details of the conventions of the API see the general conventions.

Endpoint path prefix:

/n/v1/messagethread/

messagethread was introduced in API version V1

Message Thread has not been marked for deprecation

See Message Thread for representation details.

Description

Message Thread endpoint allows integrations to create a chat thread with messages for discussion. They are message threads rather than chat threads because they are used for purposes beyond regular SMS style message threads. Message threads can be associated with almost any of the core concepts on the platform, e.g. a task discussion, a group for members to discuss subjects or the history of an invoice. Message threads for chats don't need to be associated with other concepts for example if using them for customer chat on your website for generating leads, you can create an anonymous identity for the session user and assign one of your sales team as a member of the group for notifications.

Verbs / methods

This endpoint supports the following CRUD operations in line with our API conventions. See the conventions section for more details.

CREATE HTTP POST

Request payload

Message Thread reference

{
  "name" : "Hello world chat",
  "group" : {
    "urn" : "822ff206-f4f8-412e-a648-2b4fab3fea10",
    "url" : "/n/v1/group/822ff206-f4f8-412e-a648-2b4fab3fea10"
  }
}

Response payload

Message Thread reference
Representation of a message thread which can be used for general chat or discussions associated with other concepts.

{
  "urn" : "91ec0651-f0fd-495e-a1c7-f3e1e018bf7f",
  "name" : "Hello world chat",
  "group" : {
    "urn" : "822ff206-f4f8-412e-a648-2b4fab3fea10",
    "url" : "/n/v1/group/822ff206-f4f8-412e-a648-2b4fab3fea10"
  },
  "tasks" : [ {
    "urn" : "365550cd-612b-4593-b4c5-ec30f25fc04d",
    "url" : "/n/v1/task/365550cd-612b-4593-b4c5-ec30f25fc04d",
    "blockedBy" : [ ],
    "blocking" : [ ],
    "associatedTasks" : [ ],
    "associatedEntities" : [ ],
    "associatedIdentities" : [ ],
    "associatedCompanies" : [ ]
  } ]
}

Response codes / scenarios

  • CREATE_SUCCESS

    API code CREATE_SUCCESS HTTP status code 201 : When the representation provided was successfully created return HTTP created (201). Note that when other context like authorisation and permissions are satisfied but the representation is invalid or missing required information typically a error representation with details of the missing information may be returned instead with REPRESENTATION_MISSING_REQUIRED_FIELD api error for example

  • INVALID_REPRESENTATION

    API code INVALID_REPRESENTATION HTTP status code 400 : When creating or updating a representation and the provided representation is invalid. May include an error representation with details of the issue

  • BAD_REQUEST

    API code BAD_REQUEST HTTP status code 400 : When the request is invalid or malformed the general bad request response can be returned.

READ HTTP GET

Response example

Message Thread
Representation of a message thread which can be used for general chat or discussions associated with other concepts.

{
  "urn" : "91ec0651-f0fd-495e-a1c7-f3e1e018bf7f",
  "name" : "Hello world chat",
  "group" : {
    "urn" : "822ff206-f4f8-412e-a648-2b4fab3fea10",
    "url" : "/n/v1/group/822ff206-f4f8-412e-a648-2b4fab3fea10"
  },
  "tasks" : [ {
    "urn" : "365550cd-612b-4593-b4c5-ec30f25fc04d",
    "url" : "/n/v1/task/365550cd-612b-4593-b4c5-ec30f25fc04d",
    "blockedBy" : [ ],
    "blocking" : [ ],
    "associatedTasks" : [ ],
    "associatedEntities" : [ ],
    "associatedIdentities" : [ ],
    "associatedCompanies" : [ ]
  } ]
}

Response codes / scenarios

  • READ_SUCCESS

    API code READ_SUCCESS HTTP status code 200 : On read when the request is successful. The returned representation is given with the relevant 2XX HTTP code without further detail.

  • NOT_FOUND

    API code NOT_FOUND HTTP status code 404 : When the request referenced a representation or a concept that was not found including other request context requirements. Note that if a request is missing other concepts including authorisation, permissions or restrictions on the visibility HTTP not found (404) will typically be returned. Note that when creating a representation if the owner or other references can't be resolved the endpoint may return not found.

UPDATE HTTP PUT

Response example

Message Thread
Representation of a message thread which can be used for general chat or discussions associated with other concepts.

{
  "urn" : "91ec0651-f0fd-495e-a1c7-f3e1e018bf7f",
  "name" : "Hello world chat",
  "group" : {
    "urn" : "822ff206-f4f8-412e-a648-2b4fab3fea10",
    "url" : "/n/v1/group/822ff206-f4f8-412e-a648-2b4fab3fea10"
  },
  "tasks" : [ {
    "urn" : "365550cd-612b-4593-b4c5-ec30f25fc04d",
    "url" : "/n/v1/task/365550cd-612b-4593-b4c5-ec30f25fc04d",
    "blockedBy" : [ ],
    "blocking" : [ ],
    "associatedTasks" : [ ],
    "associatedEntities" : [ ],
    "associatedIdentities" : [ ],
    "associatedCompanies" : [ ]
  } ]
}

Response codes / scenarios

  • UPDATE_SUCCESS

    API code UPDATE_SUCCESS HTTP status code 202 : When creation was successful and the representation was created. Returns HTTP accepted (202) response and typically includes the representation of the created representation for reference. Note that CREATE / UPDATE can trigger async operations after the representation is accepted which can update state.

  • INVALID_REPRESENTATION

    API code INVALID_REPRESENTATION HTTP status code 400 : When creating or updating a representation and the provided representation is invalid. May include an error representation with details of the issue

  • BAD_REQUEST

    API code BAD_REQUEST HTTP status code 400 : When the request is invalid or malformed the general bad request response can be returned.