# List dashboards

The dashboards in this workspace, in the order of their tabs, with their blocks. GET /dashboards/{key} says what one shows now.

A dashboard the user asks your agent to build: it shows as its own tab on the Dashboard in mySDR (the tabs are only dashboards; mySDR builds the first one, Overview with the key `mysdr_overview`, from the first data) and refreshes by itself. You describe it; mySDR draws it from the live Leads and Companies tables and the activity log, with the same filters as GET /tables/leads, so a block counts the same rows as the table. No HTML or code: a dashboard is a list of blocks of five types. Changing or removing it is something the user asks your agent, not a button in mySDR. These routes are the tools `save_dashboard`, `list_dashboards`, `get_dashboard` and `delete_dashboard` of the assistant server.

## Authentication

Send `Authorization: Bearer gtk_…`. Create the key under **API keys in the menu**. Every `gtk_` key can call these routes, also while the Signals API is closed. A missing, invalid or revoked key is **401**.

## Response

- **`object`** `string` · **required** — Always `list`. One of: `list`.
- **`total`** `integer` · **required** — How many there are (at most 10).
- **`data`** `object[]` · **required** — The dashboards, as POST /dashboards gives them, without `results`.
- **`dashboard_url`** `string` · **required** — The tab of the first dashboard, or Companies when there is none.

## Credits

Free. This call never uses credits.

## Errors

- **401** `authentication_error` — The Authorization header is missing, or the key is unknown or revoked.
- **403** `permission_error` — API access is not part of your plan, or your account is suspended.
- **429** `rate_limit_error` — More than 60 requests per minute, or more than 3 at the same time, on one key. Wait for the Retry-After header.
- **503** `service_unavailable` — The API is temporarily unavailable. Retry later.
- **500** `internal_error` — Something went wrong on our side.

## Example

### cURL

```bash
curl "https://mysdr.app/api/v1/dashboards" \
  -H "Authorization: Bearer $MYSDR_API_KEY"
```

### JavaScript

```javascript
const response = await fetch('https://mysdr.app/api/v1/dashboards', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.MYSDR_API_KEY}`
  }
});
const body = await response.json();
```

### Python

```python
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://mysdr.app/api/v1/dashboards",
    headers={
    "Authorization": f"Bearer {os.environ['MYSDR_API_KEY']}"
    },
    method="GET",
)
with urllib.request.urlopen(request) as response:
    body = json.load(response)
```

### Example response

```json
{
  "object": "list",
  "total": 1,
  "data": [
    {
      "object": "dashboard",
      "key": "pipeline_q4",
      "name": "Pipeline Q4",
      "description": "Where Q4 stands, every morning.",
      "position": 1,
      "blocks": [
        {
          "type": "metric",
          "title": "Meetings booked",
          "source": "leads",
          "filters": {
            "lifecycle": [
              "meeting"
            ]
          }
        },
        {
          "type": "metric",
          "title": "Reply rate, 30 days",
          "source": "activity",
          "filters": {
            "types": [
              "email_replied",
              "linkedin_replied"
            ]
          },
          "divide_by": {
            "types": [
              "email_sent",
              "linkedin_message_sent"
            ]
          },
          "compare": true
        },
        {
          "type": "chart",
          "title": "Leads per stage",
          "source": "leads",
          "filters": {
            "lifecycle": [
              "open"
            ]
          },
          "group_by": "stage"
        },
        {
          "type": "chart",
          "title": "Emails and replies per day",
          "source": "activity",
          "filters": {
            "types": [
              "email_sent",
              "email_replied"
            ],
            "period": "last_30_days"
          },
          "group_by": "day"
        },
        {
          "type": "table",
          "title": "Open deals in HubSpot",
          "source": "leads",
          "filters": {
            "field_filters": [
              {
                "key": "hubspot",
                "equals": "open_deal"
              }
            ]
          },
          "columns": [
            "name",
            "company",
            "lifecycle",
            "next_action",
            "field.hubspot"
          ],
          "sort": {
            "by": "next_action",
            "order": "asc"
          },
          "limit": 25
        }
      ],
      "via": "Claude",
      "created_at": "2026-10-27T08:00:00.000Z",
      "updated_at": "2026-10-27T08:00:00.000Z",
      "dashboard_url": "https://mysdr.app/en/gtm/views/pipeline_q4"
    }
  ],
  "dashboard_url": "https://mysdr.app/en/gtm/views/pipeline_q4"
}
```
