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

# Get a copilot

GET https://api.scoutos.com/v2/copilots/{copilot_id}

Fetch copilot configuration by ID.

Reference: https://ref.scoutos.com/api-sdk/endpoints/copilots/get

## Authentication

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

## Request

### Path parameters

- `copilot_id` (string, required)

## Response

### 200

Successful Response

- `data` (PublicCopilotResponse, required)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### PublicCopilotResponse

- `copilot_id` (string, required)
- `copilot_config` (PublicCopilotConfig, required) — Public copilot configuration without sensitive fields.

### ValidationError

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

### PublicCopilotConfig

Public copilot configuration without sensitive fields.

- `workflow_id` (string, optional, nullable)
- `img_url` (string, optional, nullable, default: https://cdn.sanity.io/images/0cfe0chk/production/632552466286c4255bff73da9eb7b76b32411771-24x24.svg)
- `display_name` (string, optional, nullable, default: Copilot)
- `mode` (enum, optional, default: light)
  - Allowed values: `light`, `dark`
- `code_theme` (enum, optional, default: dark)
  - Allowed values: `light`, `dark`, `none`
- `colors` (map from string to string, optional)
- `fab` (map from string to PublicCopilotConfigFab, optional)
- `loading_text` (string, optional, nullable, default: Thinking...)
- `message_placeholder` (string, optional, nullable, default: Ask anything...)
- `initial_activity` (list of any, optional)
- `powered_by` (string, optional, nullable, default: )

### ValidationErrorLocItems

- string
- integer

### PublicCopilotConfigFab

- integer
- string

## Examples

**Response**

```json
{
  "data": {
    "copilot_id": "copilot-1234abcd",
    "copilot_config": {
      "workflow_id": "workflow-5678efgh",
      "img_url": "https://cdn.sanity.io/images/0cfe0chk/production/632552466286c4255bff73da9eb7b76b32411771-24x24.svg",
      "display_name": "Scout AI Assistant",
      "mode": "light",
      "code_theme": "dark",
      "colors": {
        "primary": "#0052cc",
        "secondary": "#edf2f7",
        "background": "#ffffff",
        "text": "#172b4d"
      },
      "fab": {
        "size": 56,
        "icon": "chat",
        "color": "#0052cc"
      },
      "loading_text": "Thinking...",
      "message_placeholder": "Ask me anything about your project...",
      "initial_activity": [
        {
          "type": "welcome_message",
          "content": "Hello! How can I assist you today?"
        }
      ],
      "powered_by": "ScoutOS AI"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.scoutos.com/v2/copilots/copilot_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```typescript
import { ScoutClient } from "scoutos";

const client = new ScoutClient({ apiKey: "YOUR_API_KEY" });
await client.copilots.get("copilot_id");

```

```go
package main

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

func main() {

	url := "https://api.scoutos.com/v2/copilots/copilot_id"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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.scoutos.com/v2/copilots/copilot_id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.scoutos.com/v2/copilots/copilot_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.scoutos.com/v2/copilots/copilot_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.scoutos.com/v2/copilots/copilot_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.scoutos.com/v2/copilots/copilot_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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