> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://customerhub.com/api/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://customerhub.com/api/_mcp/server.

# Add Participants

POST https://api.customerhub.com/web_api/conversations/{id}/participants
Content-Type: application/json

Add one or more members to an existing conversation. A `direct` conversation is promoted to a `group` conversation the first time someone new is added.

**Authentication:** Required — Bearer token; the caller must already be a participant of the conversation.

**Request body:**
- `recipient_ids` (optional) — Array of user IDs to add
- `recipient_id` (optional) — Single user ID; only used when `recipient_ids` is absent or empty

One of the two is required. Ids are de-duplicated and the caller's own id is always stripped from the list.

**Behavior:**
- A `direct` conversation is promoted to `group` when a participant is added
- Recipients who are already participants are skipped, so repeat calls are idempotent
- Segment conversations cannot be modified — their membership follows the segment
- Every recipient must pass the app's direct-message policy

**Message history:** Governed by the app setting `chat_history_for_new_participants` (`full` by default, or `from_join`). When it is `from_join` — and also whenever a `direct` conversation is promoted to `group` — each new participant is stamped with `metadata.history_from`, and only sees messages created at or after that timestamp. Under `full`, new participants see the entire backlog.

**Response:** `data` — The conversation list item (same shape as the segment conversation response), reloaded after the change.

**Side effects:** Creates a `ConversationParticipant` for each added recipient; may change `conversation_type` from `direct` to `group`.

**Errors:**
- `403` — `Adding people to chats is turned off for this community` (the app setting `chat_add_participants_enabled` is off)
- `403` — `Segment chats follow their segment membership`
- `403` — `Not authorized` (the caller is not a participant)
- `403` — `Direct messages are not allowed in this community` (a recipient fails the direct-message policy)
- `404` — `Conversation not found`
- `404` — `Recipient not found` (one or more ids do not resolve to a user in this app)
- `422` — `recipient_id is required` (no usable recipient ids in the body)

Reference: https://customerhub.com/api/api-reference/conversations-message-center/add-participants

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required) — Conversation ID

### Body (application/json)

This endpoint expects an object.

- `recipient_ids` (list of integer, optional)

## Response

### 200

OK

## Examples

**Request**

```json
{
  "recipient_ids": [
    42,
    43
  ]
}
```

**Response**

```json
{
  "data": {
    "conversation_type": "group",
    "cosmic_id": "grp8",
    "cosmic_tier": 1,
    "id": 8,
    "last_message": {
      "body": "Welcome aboard",
      "created_at": "2026-07-20T10:15:00.000Z",
      "id": 91
    },
    "last_message_at": "2026-07-20T10:15:00.000Z",
    "participant": null,
    "participants_count": 3,
    "participants_preview": [
      {
        "avatar_url": null,
        "id": 1,
        "name": "John",
        "type": "User"
      },
      {
        "avatar_url": null,
        "id": 42,
        "name": "Jane",
        "type": "User"
      },
      {
        "avatar_url": null,
        "id": 43,
        "name": "Sam",
        "type": "User"
      }
    ],
    "segment": null,
    "title": "John, Jane, Sam",
    "unread_count": 0
  }
}
```

**SDK Code**

```python Conversations & Message Center_addParticipants_example
import requests

url = "https://api.customerhub.com/web_api/conversations/1/participants"

payload = { "recipient_ids": [42, 43] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Conversations & Message Center_addParticipants_example
const url = 'https://api.customerhub.com/web_api/conversations/1/participants';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"recipient_ids":[42,43]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Conversations & Message Center_addParticipants_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.customerhub.com/web_api/conversations/1/participants"

	payload := strings.NewReader("{\n  \"recipient_ids\": [\n    42,\n    43\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Conversations & Message Center_addParticipants_example
require 'uri'
require 'net/http'

url = URI("https://api.customerhub.com/web_api/conversations/1/participants")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"recipient_ids\": [\n    42,\n    43\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Conversations & Message Center_addParticipants_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.customerhub.com/web_api/conversations/1/participants")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"recipient_ids\": [\n    42,\n    43\n  ]\n}")
  .asString();
```

```php Conversations & Message Center_addParticipants_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.customerhub.com/web_api/conversations/1/participants', [
  'body' => '{
  "recipient_ids": [
    42,
    43
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Conversations & Message Center_addParticipants_example
using RestSharp;

var client = new RestClient("https://api.customerhub.com/web_api/conversations/1/participants");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"recipient_ids\": [\n    42,\n    43\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Conversations & Message Center_addParticipants_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["recipient_ids": [42, 43]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.customerhub.com/web_api/conversations/1/participants")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```