---
title: "List all contexts"
method: GET
path: "/v2/contexts"
tags: ["Contexts"]
---

# List all contexts

`GET /v2/contexts`

Retrieve a paginated list of all contexts, optionally filtered by type and key pattern.
      **type** and **id** are optional fields, if provided, only contexts with the matching type and id will be returned.
      **search** is an optional field, if provided, only contexts with the matching key pattern will be returned.
      Checkout all possible parameters in the query section below for more details

## Query parameters

- `after` string
- `before` string
- `limit` number
- `orderDirection` 'ASC' | 'DESC'
- `orderBy` string
- `includeCursor` boolean
- `id` string
- `search` string

## Response `200`

OK

- ListContextsResponseDto
  - `data` GetContextResponseDto[], required — List of returned Contexts
    - `type` string, required — Context type (e.g., tenant, app, workspace)
    - `id` string, required — Unique identifier for this context
    - `data` object, required — Custom data associated with this context
    - `createdAt` string, required — Creation timestamp
    - `updatedAt` string, required — Last update timestamp
  - `next` string, nullable, required — The cursor for the next page of results, or null if there are no more pages.
  - `previous` string, nullable, required — The cursor for the previous page of results, or null if this is the first page.
  - `totalCount` number, required — The total count of items (up to 50,000)
  - `totalCountCapped` boolean, required — Whether there are more than 50,000 results available

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `413` — Payload Too Large
- `414` — URI Too Long
- `415` — Unsupported Media Type
- `422` — Unprocessable Entity
- `429` — The client has sent too many requests in a given amount of time.
- `500` — Internal Server Error
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

[API](https://skmtc.net/novu/apis/deprecated-novu-api-use-openapi-json-yaml-instead.md) · [All operations](https://skmtc.net/novu/apis/deprecated-novu-api-use-openapi-json-yaml-instead/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/novu/deprecated-novu-api-use-openapi-json-yaml-instead/revisions/0aeabb0041fd/schema)
