---
title: "Get total users over time"
description: "Returns the total user count as a time series. Set the time range through query parameters; this endpoint ignores the request body."
---

<a id="playground-button:docs/apis/metrics/get-total-users-over-time"></a>

**POST** `https://api.respan.ai/api/dashboard/total-users/`

Returns the total user count as a time series. Set the time range through query parameters; this endpoint ignores the request body.

## Servers

`https://api.respan.ai`: Respan API Server

<a id="request.auth"></a>

## Authentication

<a id="request.auth.Authorization"></a>

### RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer &lt;RESPAN_API_KEY&gt;. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -&gt; Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: `bearer`; format: `Respan API key`.


```http
Authorization: Bearer $RESPAN_API_KEY
```


**Or:**

### DashboardJwt

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

HTTP scheme: `bearer`; format: `Dashboard JWT`.


```http
Authorization: Bearer $RESPAN_DASHBOARD_JWT
```


<a id="response"></a>

## Responses

### 200

Successful response.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | - |
| <a id="response.body.data"></a>`data` | `array<object>` | Required in parent | - |
| `data[]` | `object` | Array item | - |
| `data[].date_group` | `string` | Required in parent | Format: `date-time` |
| `data[].total_users` | `integer` | Required in parent | - |
| <a id="response.body.summary"></a>`summary` | `object` | Required in parent | Reference: `#/components/schemas/DashboardTotalUsersSummary`<br />Additional properties are allowed |
| `summary.total_users` | `integer` | Optional | Unique user count for the time range. |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "required": [
    "data",
    "summary"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "date_group",
          "total_users"
        ],
        "properties": {
          "date_group": {
            "type": "string",
            "format": "date-time"
          },
          "total_users": {
            "type": "integer"
          }
        }
      }
    },
    "summary": {
      "$ref": "#/components/schemas/DashboardTotalUsersSummary"
    }
  }
}
```

</details>

<a id="response.error"></a>

### 403

The API key is missing, invalid or expired.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | - |
| `detail` | `string` | Required in parent | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
```

</details>

##### Example


```json
{
  "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
```


## OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

<!-- openapi-operation:start -->
<details class="api-schema-source">
<summary>OpenAPI operation</summary>


```json
{
  "summary": "Get total users over time",
  "operationId": "getTotalUsers",
  "tags": [
    "Dashboard"
  ],
  "description": "Returns the total user count as a time series. Set the time range through query parameters; this endpoint ignores the request body.",
  "responses": {
    "200": {
      "description": "Successful response.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "data",
              "summary"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "date_group",
                    "total_users"
                  ],
                  "properties": {
                    "date_group": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total_users": {
                      "type": "integer"
                    }
                  }
                }
              },
              "summary": {
                "$ref": "#/components/schemas/DashboardTotalUsersSummary"
              }
            }
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    }
  },
  "security": [
    {
      "RespanApiKey": []
    },
    {
      "DashboardJwt": []
    }
  ]
}
```

</details>
<!-- openapi-operation:end -->

<!-- openapi-path-item:start -->
<details class="api-schema-source">
<summary>OpenAPI path metadata</summary>


```json
{}
```

</details>
<!-- openapi-path-item:end -->

<!-- openapi-components:start -->
<details class="api-schema-source">
<summary>Referenced OpenAPI components</summary>


```json
{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "schemas": {
    "DashboardTotalUsersSummary": {
      "type": "object",
      "properties": {
        "total_users": {
          "type": "integer",
          "description": "Unique user count for the time range."
        }
      },
      "additionalProperties": true
    }
  },
  "securitySchemes": {
    "DashboardJwt": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Dashboard JWT",
      "description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
      "x-fern-bearer": {
        "name": "dashboardJwt",
        "env": "RESPAN_DASHBOARD_JWT"
      }
    },
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}
```

</details>
<!-- openapi-components:end -->
