> ## 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.

# REST API Integration

> Connect to Dashtray using HTTP requests

# REST API Integration

Dashtray provides a complete REST API for sending notifications, managing API keys, and querying statistics.

## API Base URL

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

## Authentication

All requests require an API key in the `Authorization` header:

```bash theme={null}
Authorization: Bearer sk_test_...
```

See [Authentication](/authentication) for details.

## Content Type

All requests must include:

```bash theme={null}
Content-Type: application/json
```

## Response Format

All responses are JSON. Success payloads are wrapped in a named field (`notification`, `notifications`, `alerts`, `stats`, `apiKey`, `apiKeys`):

```json theme={null}
{
  "ok": true,
  "notification": { ... }
}
```

Error responses:

```json theme={null}
{
  "ok": false,
  "error": "Human-readable description",
  "code": "VALIDATION_ERROR",
  "statusCode": 400
}
```

## Rate Limiting

Rate limits are per API key, per minute, by plan (100 / 1,000).
Exceeding the limit returns `429` with a `Retry-After: 60` header.

## API Endpoints

### Notifications

* `POST /api/v1/notifications/send` - Send a notification
* `GET /api/v1/notifications` - List notifications with pagination

### Alerts

* `GET /api/v1/alerts` - List alerts for templates

### Statistics

* `GET /api/v1/stats` - Get account statistics

### API Keys

* `POST /api/v1/api-keys/generate` - Generate a new API key
* `GET /api/v1/api-keys` - List your API keys
* `DELETE /api/v1/api-keys/{keyId}` - Revoke an API key

## Example: Send a Notification

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

Response:

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

## Next Steps

* 📖 Read the [API Reference](/api-reference/endpoints)
* 🔧 See [Error Handling](/api-reference/errors)
* 🤖 Explore [MCP Integration](/integration/mcp)


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