# Embeddables API

The **Embeddables API** lets you programmatically list all **Embeddables** in your workspace. This is useful for dynamically displaying available dashboards or automating certain management tasks.

API collection: https://github.com/embeddable-hq/embeddable-public-apis

```ts
// Important: Always call this server-side, never from client-side code
fetch('https://api.<region>.embeddable.com/api/v1/embeddables', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': `Bearer ${apiKey}` // Keep your API key secure
  }
})
  .then((res) => res.json())
  .then(console.log);
```

Learn more about `region` [here](https://docs.embeddable.com/deployment/deployment-regions).

**Example Response**:

```json
{
  "embeddables": [
    {
      "id": "1e01b46f-809c-45d5-8c33-2b5f5d7502bc",
      "name": "Marketing dash",
      "tags": ["Marketing"],
      "lastPublishedAt": {
        "latest": "2024-02-11T18:53:03.527633Z",
        "production": undefined, // hasn't yet been published to production
        "staging": "2024-02-11T18:53:03.527633Z",
        "development": "2024-02-10T12:55:03.563273Z",
      }
    },
    {
      "id": "d36785d6-6ef2-4d8a-bfce-ad09fbb97064",
      "name": "Product KPIs",
      "tags": ["OKRs", "Product"],
      "lastPublishedAt": {} // this hasn't yet been saved
    }
  ]
}
```

- **`id`**: A unique identifier for the Embeddable (a dashboard).  
- **`name`**: The display name your team set in the no-code builder.  
- **`tags`**: Optional labels for categorization or searching (support for `tags` is coming soon).
- **`lastPublishedAt`**: Shows timestamps for each environment (e.g. `production`) indicating when the dashboard was last published. If empty, it hasn't been published in that environment yet.

---
Source: https://docs.embeddable.com/deployment/embeddables-api
