Conversations

Get a conversation

Gets a specific conversation.

get/v1/{appId}/conversations/{conversationId}

Request

Path parameters

appIdstring required
Example:abcd1234

A unique identifier of your TalkJS app. You can find your app ID on the Settings page of your dashboard.

conversationIdstring required
Example:0123456789abcdef

A unique identifier of a conversation.

Response

Conversation fetched successfully.

idstring

A unique identifier of a conversation. You determine the conversation ID yourself. For more information on setting a conversation ID, see: Conversation ID.

subjectstring nullable

An optional conversation subject that is displayed in the chat header. To delete any existing value, set this property to null.

customobject

Custom field for a conversation. To delete any existing value, set this property to null.

createdAtinteger

Timestamp for when this conversation was edited, expressed as the number of milliseconds since the UNIX epoch (1970-1-1, 00:00:00 UTC).

topicIdstring

Identifier of the topic of this conversation.

topicId is deprecated. Instead, use id to set a unique identifier of a conversation, and use subject to set the subject of a conversation.

photoUrlstring nullable

An optional URL to an image that is shown as the photo for the conversation in the chat header.

welcomeMessagesstring[]

An array of messages that are sent directly at the start of a conversation. Welcome messages set at conversation level appear as system messages.

Example response

{
  "id": "1629972494",
  "participants": {
    "alice": {
      "access": "ReadWrite",
      "notify": "MentionsOnly"
    },
    "zayneb": {
      "access": "ReadWrite",
      "notify": true
    }
  },
  "subject": "Studio headphones",
  "custom": {
    "productId": "454545"
  },
  "createdAt": 1525249255419,
  "topicId": "customer_support",
  "photoUrl": "https://example.com/productpictures/012345.jpg",
  "welcomeMessages": [
    "Hello there!",
    "I'm currently out of town, leave a message and I'll respond ASAP :)"
  ],
  "lastMessage": {
    "id": "msg_123ABcdefghiJKlmNOpqRS",
    "type": "UserMessage",
    "origin": "web",
    "location": [
      51.44442681184582,
      5.4733118103642395
    ],
    "text": "Hi, how are you?",
    "custom": {
      "priority": "high"
    },
    "attachment": {
      "dimensions": {
        "height": 1125,
        "width": 516
      },
      "size": 51552,
      "url": "https://example.com/attachment.jpg"
    },
    "conversationId": "0123456789",
    "createdAt": 1697711905431,
    "senderId": "alice",
    "editedAt": 1629972494633,
    "referencedMessageId": "msg_012ABcdefghiJKlmNOpqRS",
    "readBy": [
      "zayneb"
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.