> ## Documentation Index
> Fetch the complete documentation index at: https://cloro.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Citation pills

> Schema for inline citation pills returned by the Microsoft Copilot endpoint, with each cited source attached to the visible pill chip it appears on.

This section documents the **citationPills** data returned by the [Microsoft Copilot endpoint](/api-reference/endpoint/monitor-copilot). Citation pills are part of the Copilot response — no separate API call is needed.

## Example request

```json theme={null}
{
  "prompt": "best laptops for programming",
  "country": "US"
}
```

This produces a response containing the `citationPills` array documented below.

## Overview

Copilot streams citation events alongside its answer text. Consecutive citation events are grouped into one visible chip; the `result.citationPills` array exposes those chips denormalized: each entry is one **(pill, source)** pair carrying a per-source `label` (the source's own title from the citation event), a `citationPillId` that groups entries from the same chip, and the per-source `url`/`domain`/`description`/`position`.

When a pill cites N sources, the array contains N entries sharing the same `citationPillId` but carrying different per-source `label`, `url`, and `domain`. Group by `citationPillId` to recover the pill-level structure.

The field is omitted from `result` when the answer has no pills.

## Citation pill structure

| Field            | Type    | Description                                                                                                                                                                                                     |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label`          | string  | Per-source title from the citation event (e.g. `"Microsoft 365 Documentation"`). Always present; may be an empty string when the event ships no title — read `domain` / `url` for source identity in that case. |
| `citationPillId` | integer | 1-based ordinal shared by all entries from the same chip.                                                                                                                                                       |
| `url`            | string  | Direct URL of the cited source.                                                                                                                                                                                 |
| `domain`         | string  | Host extracted from `url`, for grouping and display.                                                                                                                                                            |
| `description`    | string  | Source snippet from the citation event when Copilot ships one. Omitted when absent.                                                                                                                             |
| `position`       | integer | 1-based position of this source in the sibling [`result.sources`](/api-reference/endpoint/copilot/sources) array.                                                                                               |

## Response example

```json theme={null}
{
  "success": true,
  "result": {
    "text": "Here are several laptops for programming...",
    "sources": [
      {
        "position": 1,
        "url": "https://docs.microsoft.com/",
        "label": "Microsoft 365 Documentation",
        "description": "Official development documentation"
      },
      {
        "position": 2,
        "url": "https://github.com/microsoft/vscode",
        "label": "VS Code on GitHub",
        "description": "Visual Studio Code repository"
      }
    ],
    "citationPills": [
      {
        "label": "Microsoft 365 Documentation",
        "citationPillId": 1,
        "url": "https://docs.microsoft.com/",
        "domain": "docs.microsoft.com",
        "description": "Official development documentation",
        "position": 1
      },
      {
        "label": "VS Code on GitHub",
        "citationPillId": 1,
        "url": "https://github.com/microsoft/vscode",
        "domain": "github.com",
        "description": "Visual Studio Code repository",
        "position": 2
      }
    ]
  }
}
```
