---
title: "Create or update a conversation"
method: PUT
path: "/v1/{appId}/conversations/{conversationId}"
tags: ["Conversations"]
---

# Create or update a conversation

`PUT /v1/{appId}/conversations/{conversationId}`

## Request

- Base URL: `https://api.talkjs.com`
- URL: `https://api.talkjs.com/v1/{appId}/conversations/{conversationId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/talkjs/apis/talkjs-api/docs/v1/:appId/conversations/:conversationId/put.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `appId` string, required
- `conversationId` string, required

## Request body

- ConversationCreateOrUpdateData: Details of a conversation that can be set when creating or updating a conversation.
  - `participants` unknown[]: An array of user IDs for users that are participants of this conversation.
    - unknown
  - `subject` string, nullable: An optional conversation subject that's displayed in the chat header. To delete any existing value, set this property to `null`.
  - `welcomeMessages` string[]: An array of messages that are sent directly at the start of a conversation. Welcome messages set at conversation level appear as [system messages](https://talkjs.com/docs/Reference/Concepts/System_Messages/).
  - `custom` object, nullable: Custom field for a conversation. To delete any existing value, set this property to `null`.
  - `photoUrl` string, nullable: An optional URL to an image that is shown as the photo for the conversation in the chat header.

## Response `200`

Empty response

- object: Empty response

## Other responses

- `400`: Bad request
- `401`: Authorization information is missing or invalid.
- `404`: Resource not found
- `415`: Unsupported media type
- `429`: Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/talkjs/apis/talkjs-api.md) - [All operations](https://skmtc.dev/talkjs/apis/talkjs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talkjs/apis/talkjs-api/revisions/9d4acc9cfa43?raw)
