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

# Get dashboard data

> Retrieve aggregated dashboard data including statistics,
pipeline summary, recent activity, and charts.

This endpoint is optimized for performance and returns
pre-computed metrics where possible.




## OpenAPI

````yaml openapi.json get /accounts/{account_id}/dashboard
openapi: 3.1.0
info:
  title: Roulette API
  version: 1.0.0
  description: >
    The Roulette API provides programmatic access to manage your VC deal flow,

    companies, contacts, and related data.


    ## Authentication


    All API requests require authentication using a Bearer token. Include your
    API key

    in the `Authorization` header:


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    You can generate API keys from your account settings in the Roulette
    dashboard.


    ## Rate Limiting


    API requests are rate limited to ensure fair usage. Current limits:

    - 1000 requests per minute per API key

    - 100 requests per second per API key


    Rate limit headers are included in all responses:

    - `X-RateLimit-Limit`: Maximum requests per window

    - `X-RateLimit-Remaining`: Requests remaining in current window

    - `X-RateLimit-Reset`: Unix timestamp when the window resets


    ## Pagination


    List endpoints support cursor-based pagination using the following query
    parameters:

    - `page`: Page number (default: 1)

    - `limit`: Items per page (default: 25, max: 100)


    Paginated responses include pagination metadata:

    ```json

    {
      "data": [...],
      "pagination": {
        "page": 1,
        "limit": 25,
        "has_next": true,
        "has_prev": false
      }
    }

    ```


    **Note**: For performance reasons, total counts (`total`, `total_pages`) are
    not included.

    Use `has_next` and `has_prev` to determine if more pages exist.


    ## Errors


    The API uses standard HTTP status codes and returns errors in a consistent
    format:


    ```json

    {
      "success": false,
      "error": "Human readable error message",
      "data": null
    }

    ```


    Common status codes:

    - `400` Bad Request - Invalid parameters or request body

    - `401` Unauthorized - Missing or invalid API key

    - `403` Forbidden - Valid API key but insufficient permissions

    - `404` Not Found - Resource not found

    - `429` Too Many Requests - Rate limit exceeded

    - `500` Internal Server Error - Server-side error
  termsOfService: https://www.useroulette.com/terms
  contact:
    name: Roulette API Support
    email: support@useroulette.com
    url: https://www.useroulette.com/support
  license:
    name: Proprietary
    url: https://www.useroulette.com/license
servers:
  - url: https://www.useroulette.com/api/v1
    description: Production server
  - url: http://localhost:3000/api/v1
    description: Local development server
security:
  - BearerAuth: []
tags:
  - name: Companies
    description: >
      Manage companies in your deal flow pipeline. Companies represent potential

      investment opportunities with associated pitch decks, contacts, and
      metadata.
  - name: Company Statuses
    description: |
      Manage deal flow stages/statuses for organizing companies through your
      investment pipeline (e.g., "Initial Review", "Due Diligence", "Closed").
  - name: Company Settings
    description: |
      Configure custom fields and settings for company tracking.
  - name: Contacts
    description: |
      Manage contacts associated with companies, including founders, executives,
      and other key personnel.
  - name: Form Submissions
    description: |
      Access form submissions from integrated platforms like Tally.
  - name: Emails
    description: |
      Manage emails linked to companies and contacts.
  - name: Meeting Minutes
    description: |
      Store and retrieve meeting notes and minutes related to companies.
  - name: Shared Links
    description: |
      Create and manage secure shareable links for company portfolios.
  - name: Integrations
    description: |
      Configure third-party integrations (Tally, Specter, etc.).
  - name: Investor Dashboard
    description: |
      Configure and manage investor-facing portfolio dashboards.
  - name: Dashboard
    description: |
      Access aggregated dashboard data and analytics.
  - name: Team Members
    description: |
      View team members and their roles within your account.
  - name: Short URLs
    description: |
      Create shortened URLs with optional password protection.
paths:
  /accounts/{account_id}/dashboard:
    get:
      tags:
        - Dashboard
      summary: Get dashboard data
      description: |
        Retrieve aggregated dashboard data including statistics,
        pipeline summary, recent activity, and charts.

        This endpoint is optimized for performance and returns
        pre-computed metrics where possible.
      operationId: getDashboard
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - name: chart_days
          in: query
          required: false
          description: Number of days to include in chart data
          schema:
            type: integer
            minimum: 7
            maximum: 365
            default: 30
      responses:
        '200':
          description: Dashboard data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardResponse'
              example:
                success: true
                data:
                  stats:
                    total_companies: 150
                    companies_this_month: 12
                    active_deals: 45
                    meetings_this_week: 8
                  pipeline_summary:
                    - status_id: uuid-1
                      status_name: Initial Review
                      color: '#6B7280'
                      count: 45
                    - status_id: uuid-2
                      status_name: Due Diligence
                      color: '#3B82F6'
                      count: 23
                    - status_id: uuid-3
                      status_name: Partner Meeting
                      color: '#8B5CF6'
                      count: 15
                  recent_activity:
                    - id: activity-1
                      type: company_added
                      description: TechStartup Inc was added to pipeline
                      company_id: company-uuid
                      company_name: TechStartup Inc
                      created_at: '2024-01-20T14:30:00Z'
                    - id: activity-2
                      type: status_changed
                      description: AI Platform moved to Due Diligence
                      company_id: company-uuid-2
                      company_name: AI Platform
                      created_at: '2024-01-20T10:15:00Z'
                  charts:
                    companies_over_time:
                      - date: '2024-01-20'
                        count: 3
                      - date: '2024-01-19'
                        count: 5
                      - date: '2024-01-18'
                        count: 2
                    source_breakdown:
                      - source: email
                        count: 45
                      - source: referral
                        count: 38
                      - source: form
                        count: 25
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    AccountIdParam:
      name: account_id
      in: path
      required: true
      description: The unique identifier of the account/team
      schema:
        type: string
        format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    DashboardResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/DashboardData'
    DashboardData:
      type: object
      properties:
        stats:
          type: object
          properties:
            total_companies:
              type: integer
              description: Total number of companies
              example: 150
            companies_this_month:
              type: integer
              description: Companies added this month
              example: 12
            active_deals:
              type: integer
              description: Companies in active pipeline stages
              example: 45
            meetings_this_week:
              type: integer
              description: Meetings scheduled this week
              example: 8
        pipeline_summary:
          type: array
          items:
            type: object
            properties:
              status_id:
                type: string
                format: uuid
              status_name:
                type: string
              color:
                type: string
              count:
                type: integer
          description: Company counts by pipeline stage
        recent_activity:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              type:
                type: string
                enum:
                  - company_added
                  - company_updated
                  - status_changed
                  - email_received
                  - meeting_scheduled
              description:
                type: string
              company_id:
                type: string
                format: uuid
                nullable: true
              company_name:
                type: string
                nullable: true
              created_at:
                type: string
                format: date-time
          description: Recent activity feed
        charts:
          type: object
          properties:
            companies_over_time:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                    format: date
                  count:
                    type: integer
              description: Daily company additions
            source_breakdown:
              type: array
              items:
                type: object
                properties:
                  source:
                    type: string
                  count:
                    type: integer
              description: Companies by source
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Human-readable error message
          example: Invalid request body
        data:
          type: 'null'
          example: null
        authType:
          type: string
          enum:
            - api_key
            - session
          example: api_key
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Invalid or expired API key
            data: null
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Resource not found
            data: null
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        API key authentication. Generate keys from your account settings.

        Include in header: `Authorization: Bearer YOUR_API_KEY`

````