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

# Endpoints

> All Dashtray REST API endpoints

# API Endpoints

Complete reference for all Dashtray REST API endpoints.

Base URL: `https://api.dashtray.app`

All endpoints require an API key via the `Authorization: Bearer` header. See [Authentication](/authentication).

## Send Notification

Send a notification to your device.

```
POST /api/v1/notifications/send
```

**Request:**

```json theme={null}
{
  "title": "string (required)",
  "body": "string (required)"
}
```

**Response:**

```json theme={null}
{
  "ok": true,
  "notification": {
    "id": "notif_abc123",
    "title": "MCP - Build Complete",
    "body": "Deployment succeeded",
    "status": "delivered",
    "createdAt": 1692123456789
  }
}
```

<Note>
  The `title` is prefixed with `MCP - ` in the delivered notification.
</Note>

**Example:**

```bash theme={null}
curl -X POST https://api.dashtray.app/api/v1/notifications/send \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Build Complete",
    "body": "Deployment succeeded"
  }'
```

***

## List Notifications

Get your notification history with cursor-based pagination.

```
GET /api/v1/notifications?limit=10&cursor=<cursor>&search=<query>
```

**Query Parameters:**

* `limit` (integer) - Results per page (default: 50, max: 100)
* `cursor` (string) - Opaque pagination cursor from the previous response's `nextCursor`
* `search` (string) - Optional text filter on notification title/body

**Response:**

```json theme={null}
{
  "ok": true,
  "notifications": [
    {
      "id": "notif_abc123",
      "title": "MCP - Build Complete",
      "body": "Deployment succeeded",
      "status": "delivered",
      "createdAt": 1692123456789
    }
  ],
  "pagination": {
    "nextCursor": "n_abc456",
    "isDone": false
  }
}
```

Keep requesting with `nextCursor` until `isDone` is `true`.

**Example:**

```bash theme={null}
curl -X GET "https://api.dashtray.app/api/v1/notifications?limit=5" \
  -H "Authorization: Bearer sk_test_..."
```

***

## Get Alerts

List your notification alerts/templates.

```
GET /api/v1/alerts
```

**Response:**

```json theme={null}
{
  "ok": true,
  "alerts": [
    {
      "id": "alert_abc123",
      "name": "Build Success",
      "icon": "rocket",
      "color": "#10B981",
      "isActive": true,
      "notificationCount": 42,
      "lastTriggeredAt": 1692123456789,
      "createdAt": 1692000000000
    }
  ]
}
```

**Example:**

```bash theme={null}
curl -X GET https://api.dashtray.app/api/v1/alerts \
  -H "Authorization: Bearer sk_test_..."
```

***

## Get Stats

Get your account statistics and current plan.

```
GET /api/v1/stats
```

**Response:**

```json theme={null}
{
  "ok": true,
  "stats": {
    "plan": "pro",
    "totalNotificationsAllTime": 15230,
    "notificationsThisMonth": 1523,
    "notificationsThisDay": 42,
    "alertsCount": 5,
    "historyLimitDays": 365
  }
}
```

**Example:**

```bash theme={null}
curl -X GET https://api.dashtray.app/api/v1/stats \
  -H "Authorization: Bearer sk_test_..."
```

***

## Generate API Key

Create a new API key for programmatic access.

```
POST /api/v1/api-keys/generate
```

**Request:**

```json theme={null}
{
  "name": "string (required)"
}
```

**Response (201):**

```json theme={null}
{
  "ok": true,
  "apiKey": {
    "id": "key_abc123",
    "name": "Build Bot",
    "keyPreview": "sk_test_a1b2c3d4",
    "fullKey": "sk_test_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
    "createdAt": 1692123456789
  }
}
```

<Warning>
  The `fullKey` is only returned when created. Save it immediately as you won't see it again.
</Warning>

**Example:**

```bash theme={null}
curl -X POST https://api.dashtray.app/api/v1/api-keys/generate \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Build Bot"}'
```

***

## List API Keys

Get all your API keys (without revealing the full keys).

```
GET /api/v1/api-keys
```

**Response:**

```json theme={null}
{
  "ok": true,
  "apiKeys": [
    {
      "id": "key_abc123",
      "name": "Build Bot",
      "keyPreview": "sk_test_a1b2c3d4",
      "createdAt": 1692123456789,
      "lastUsedAt": 1692200000000,
      "revokedAt": null
    }
  ]
}
```

**Example:**

```bash theme={null}
curl -X GET https://api.dashtray.app/api/v1/api-keys \
  -H "Authorization: Bearer sk_test_..."
```

***

## Revoke API Key

Permanently disable an API key.

```
DELETE /api/v1/api-keys/{keyId}
```

**Path Parameters:**

* `keyId` (string) - The key ID to revoke

**Response:**

```json theme={null}
{
  "ok": true
}
```

<Warning>
  Revoked keys cannot be restored. Generate a new key if needed.
</Warning>

**Example:**

```bash theme={null}
curl -X DELETE https://api.dashtray.app/api/v1/api-keys/key_abc123 \
  -H "Authorization: Bearer sk_test_..."
```

***

## Rate Limits

Per-key, per-minute limits by plan:

| Plan | Requests / minute |
| - | - |
| Starter | 100 |
| Pro | 1,000 |

When exceeded, requests return `429` with `Retry-After: 60`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.