> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# Hämta ett sammanslagningsförslag

GET https://api.elevenlabs.io/v1/convai/agents/{agent_id}/merge-proposals/{merge_proposal_id}

Hämta ett enskilt merge_proposal.

Reference: https://elevenlabs.io/docs/api-reference/agents/merge-proposals/get

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `agent_id` (string, required) — ID:t för en agent. Det returneras när agenten skapas.
- `merge_proposal_id` (string, required) — Unik identifierare för merge_proposal.

## Response

### 200

Lyckat svar

- `id` (string, required)
- `agent_id` (string, required)
- `source_branch_id` (string, required)
- `target_branch_id` (string, required)
- `source_tip_version_id_at_creation` (string, required)
- `title` (string, required)
- `created_at` (integer, required)
- `updated_at` (integer, required)
- `description` (string, optional, default: )
- `requested_reviewer_user_ids` (list of string, optional)
- `reviews` (list of MergeProposalReview, optional)
- `comments` (list of MergeProposalComment, optional)
- `outcome` (AgentMergeProposalResponseOutcome, optional)
- `author_user_id` (string, optional, nullable) — Användar-ID för merge_proposal:s författare.
- `access_info` (ResourceAccessInfo, optional, nullable) — Åtkomstinformation för merge_proposal, inklusive skaparen.

## Errors

### 422 Unprocessable Entity Error

Valideringsfel

- `detail` (list of ValidationError, optional)

## Types

### MergeProposalReview

- `user_id` (string, required)
- `state` (enum, required)
  - Allowed values: `approved`, `changes_requested`
- `submitted_at` (integer, required)
- `comment` (string, optional, default: )
- `reviewer_role` (enum, optional, nullable)
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`

### MergeProposalComment

- `id` (string, required)
- `user_id` (string, required)
- `body` (string, required)
- `created_at` (integer, required)

### AgentMergeProposalResponseOutcome

- `status`: `closed` (ClosedOutcome)
  - `at` (integer, required)
  - `by_user_id` (string, required, nullable)
  - `reason` (enum, required)
    - Allowed values: `withdrawn`, `rejected`, `branch_archived`
- `status`: `merged` (MergedOutcome)
  - `at` (integer, required)
  - `by_user_id` (string, required, nullable)
  - `version_id` (string, required)
- `status`: `open` (OpenOutcome)

### ResourceAccessInfo

- `is_creator` (boolean, required) — Om användaren som gör begäran är agentens skapare
- `creator_name` (string, required) — Namn på agentens skapare
- `creator_email` (string, required) — E-postadress till agentens skapare
- `role` (enum, required) — Rollen för användaren som gör begäran
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — Åtkomstnivån för anonyma användare. Om värdet är None delas resursen inte offentligt.
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — Varför den begärande användaren har åtkomst till den här resursen. 'creator' = anroparen är ägaren. 'explicit' = anroparen (eller en av deras arbetsytas grupper) finns listad i role_to_group_ids utöver den arbetsyteomfattande gruppen för alla. 'workspace_default' = den arbetsyteomfattande gruppen för alla finns listad i role_to_group_ids (alla icke-anonyma medlemmar i arbetsytan, inklusive administratörer, ser den här resursen). 'workspace_admin' = anroparen är administratör för arbetsytan och administratörsplatsen är den *enda* åtkomstvägen; reserverad för dokument som ingen annan kan se. Gör det möjligt för användargränssnittet att förklara varför en administratör som kringgår behörigheter ser ett dokument som inte uttryckligen har delats med dem.
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "id": "string",
  "agent_id": "string",
  "source_branch_id": "string",
  "target_branch_id": "string",
  "source_tip_version_id_at_creation": "string",
  "title": "string",
  "created_at": 1,
  "updated_at": 1,
  "description": "",
  "requested_reviewer_user_ids": [
    "string"
  ],
  "reviews": [
    {
      "user_id": "string",
      "state": "approved",
      "submitted_at": 1,
      "comment": "",
      "reviewer_role": "admin"
    }
  ],
  "comments": [
    {
      "id": "string",
      "user_id": "string",
      "body": "string",
      "created_at": 1
    }
  ],
  "outcome": {
    "status": "open"
  },
  "author_user_id": "string",
  "access_info": {
    "is_creator": true,
    "creator_name": "John Doe",
    "creator_email": "john.doe@example.com",
    "role": "admin",
    "access_source": "creator"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj';
const options = {method: 'GET'};

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

```go
package main

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

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj"

	req, _ := http.NewRequest("GET", url, nil)

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj")

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

request = Net::HTTP::Get.new(url)

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/merge-proposals/agtmprop_8901k4t9z5defmb8vh3e9361y7nj")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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()
```