# updateConversationBranchSelection

```graphql
mutation UpdateConversationBranchSelection($conversationId: ID!, $input: UpdateConversationBranchSelectionInput!) {
  updateConversationBranchSelection(conversationId: $conversationId, input: $input) {
    messageId
  }
}
```

Select which branch is the current path of a conversation after the user switches branches, so that later messages continue from the selected message; returns the ID of the selected message.

## Arguments

| Name              | Type                                    | Required | Description                                            |
| ----------------- | --------------------------------------- | -------- | ------------------------------------------------------ |
| `conversationId`  | ID!                                     | Yes      |                                                        |
| `input`           | UpdateConversationBranchSelectionInput! | Yes      |                                                        |
| `input.messageId` | ID!                                     | Yes      | Message to select; it must belong to the conversation. |

## Variables

```json
{
  "conversationId": "string",
  "input": {
    "messageId": "string"
  }
}
```

## Responses

| Status | Description                                                     |
| ------ | --------------------------------------------------------------- |
| 200    | The BranchSelection! in data.updateConversationBranchSelection. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation UpdateConversationBranchSelection($conversationId: ID!, $input: UpdateConversationBranchSelectionInput!) {\n  updateConversationBranchSelection(conversationId: $conversationId, input: $input) {\n    messageId\n  }\n}",
  "variables": {
    "conversationId": "string",
    "input": {
      "messageId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "updateConversationBranchSelection": {
      "messageId": "string"
    }
  }
}
```
