# Create a dashboard

> Source: https://elaichi.ai/docs/api-reference/dashboards/dashboard/createdashboard/

`POST /dashboard`

Resource: **Dashboard** · API: **Dashboards**

## Request body

- **`name`** _(string)_
- **`description`** _(string)_
- **`definition`** _(unknown)_

## Response body

- **`id`** _(string)_
- **`owner_user_id`** _(string)_
- **`name`** _(string)_
- **`description`** _(string)_
- **`revision`** _(integer)_
- **`page_count`** _(integer)_
- **`widget_count`** _(integer)_
- **`source_summary`** _(object)_
  - **`collection_ids`** _(array<string>)_
  - **`toolbox_ids`** _(array<string>)_
- **`created_at`** _(string)_
- **`updated_at`** _(string)_
- **`updated_by`** _(string,null)_
- **`can_share`** _(boolean)_
- **`can_manage`** _(boolean)_
- **`can_transfer`** _(boolean)_
- **`can_revoke_share`** _(boolean)_
- **`can_see_shares`** _(boolean)_
- **`owner_display_name`** _(string,null)_
- **`owner_avatar_url`** _(string,null)_
  The person's picture: their stored profile picture, else a Gravatar URL (`d=404`, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
- **`access_via`** _(string)_
- **`access_summary`** _(unknown)_
- **`status`** _(string)_
  draft_only: never published, so only editors can open it. published_with_changes: live, with a pending draft.
  Allowed: `published`, `draft_only`, `published_with_changes`
- **`ever_published`** _(boolean)_
- **`has_draft`** _(boolean)_
  A pending draft exists. Only a caller with `can_manage` is ever shown the draft itself.
- **`live_changed_since_draft`** _(boolean)_
  The live dashboard was saved after the pending draft began, so publishing would replace that save. Only ever true for a caller with `can_manage`; the Elaichi app warns in words and sends `live_revision` on publish only after the person confirms.
- **`draft_revision`** _(integer)_
  The guard on `PUT /dashboard/{id}/draft`. Moves on every draft save, publish and discard.
- **`updated_via`** _(string,null)_
  How the last edit was made; null for edits that predate the draft layer.
  Allowed: `console`, `agent`, `mcp`, `api`, `null`
- **`updated_client`** _(string,null)_
  The connected AI client's display name ("Claude") when `updated_via` is `mcp`; null when that client is unknown. Never an internal id.
- **`source_preview`** _(array<object>)_
  At most three sources the caller can read. The total is `source_summary`; the full set is `sources` on the detail.
  - **`name`** _(string)_
  - **`resource_type`** _(string)_
    Allowed: `collection`, `toolbox`, `automation`
  - **`slug`** _(string,null)_
    The connector slug when the source has exactly one; null otherwise, never guessed.
  - **`logo`** _(string,null)_
- **`definition`** _(unknown)_
- **`sources`** _(array<object>)_
  - **`resource_type`** _(string)_
  - **`resource_id`** _(string)_
  - **`name`** _(string,null)_
  - **`caller_can_read`** _(boolean)_
  - **`widget_count`** _(integer)_
- **`labels`** _(object)_
  - **`widgets`** _(unknown)_
- **`public_links`** _(unknown)_
- **`provenance`** _(unknown)_
- **`updated_by_name`** _(string,null)_
- **`draft`** _(object,null)_
  The pending draft, present only for a caller with `can_manage`; everyone else sees the published `definition`.
- **`draft_changes`** _(object)_
  - **`count`** _(integer)_
  - **`items`** _(array<unknown>)_
  - **`more`** _(integer)_
  - **`ever_published`** _(boolean)_
- **`can_publish`** _(boolean)_
  `can_manage` and there is a draft to publish.
- **`publish_blocked_reason`** _(string,null)_
  Why publishing would fail right now (a widget that does not validate), else null. A source the publisher cannot read is checked by the publish itself.
- **`can_discard_draft`** _(boolean)_
  `can_manage`, there is a draft, and the dashboard has been published (a never-published dashboard has no live version to go back to).
- **`can_agent_edit`** _(boolean,null)_
- **`agent_edit_blocked_by`** _(string,null)_
  Allowed: `assistant_disabled`, `llm_not_configured`, `not_permitted`, `null`

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/dashboard' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"your_name","description":"your_description"}'
```

### JavaScript

```javascript
const body = {
  "name": "your_name",
  "description": "your_description"
};

const response = await fetch('https://api.elaichi.ai/dashboard', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/dashboard"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "name": "your_name",
    "description": "your_description"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```
