Conversations

Create or update a conversation

Creates a conversation, or updates conversation details.

To update conversation details, you only need to send the subset of fields you want to update. In that respect, even though you update a conversation with an HTTP PUT request method, the update acts similar to an HTTP PATCH request method.

Note: You can't remove participants from a conversation by providing a list of participants that excludes some existing participants. To remove participants from a conversation, use the participation endpoint.

put/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.

Request body

subjectstring nullable

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

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.

customobject nullable

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

photoUrlstring nullable

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

Example request

{
  "participants": [
    "alice",
    "zayneb"
  ],
  "subject": "Studio headphones",
  "welcomeMessages": [
    "Hello there!",
    "I'm currently out of town, leave a message and I'll respond ASAP :)"
  ],
  "custom": {
    "productId": "012345"
  },
  "photoUrl": "https://example.com/productpictures/012345.jpg"
}

Response

Empty response

object required

Empty response

Changes

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