# Branch chat session

```http
POST https://api.synup.com/api/v4/social-post-ideas/branch-chat-session
```

Creates a new chat session branched from an existing one (`parentSessionId`), anchored to a subject (`subjectType` required, `subjectId` optional). Use this to explore an alternative direction without losing the original conversation.

Source: https://developer.synup.com/api/social-post-ideas/branch-chat-session

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Synup-Version` | string | required | API version date (YYYY-MM-DD). |

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `parentSessionId` | string | required |  |
| `subjectType` | string | required |  |
| `subjectId` | string | optional |  |

## Example request

```bash
curl -X POST 'https://api.synup.com/api/v4/social-post-ideas/branch-chat-session' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "parentSessionId": "7f3c1a2e-...",
  "subjectType": "idea"
}'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized - Invalid or missing API key |
