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

# List Datasets

> Retrieve a list of datasets or create a new dataset.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url "https://api.roe-ai.com/v1/datasets/?organization_id=YOUR_ORG_ID" \
    --header "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>


## OpenAPI

````yaml GET /v1/datasets/
openapi: 3.1.0
info:
  title: Roe AI API
  version: 1.0.0
  description: Complete API documentation for Roe AI platform
servers:
  - url: https://api.roe-ai.com
    description: Production API
security: []
paths:
  /v1/datasets/:
    get:
      tags:
        - v1
      summary: List datasets or create a new dataset.
      description: Retrieve a list of datasets or create a new dataset.
      operationId: v1_datasets_list
      parameters:
        - in: query
          name: organization_id
          schema:
            type: string
          description: >-
            Filter datasets by organization ID. If not provided, it lists the
            user's personal datasets.
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - in: query
          name: search
          schema:
            type: string
          description: >-
            Search datasets by name or creator name (case-insensitive contains
            match).
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetList'
          description: Successfully retrieved list of datasets.
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetList'
          description: Successfully created dataset.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Access forbidden if not on a plan.
components:
  schemas:
    PaginatedDatasetList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Dataset'
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
      required:
        - message
    Dataset:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 1024
        creator:
          oneOf:
            - $ref: '#/components/schemas/UserInfo'
            - type: 'null'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        organization:
          type: string
          format: uuid
      required:
        - created_at
        - creator
        - id
        - name
    UserInfo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        email:
          type: string
          format: email
          title: Email address
          maxLength: 254
        first_name:
          type: string
          maxLength: 150
        last_name:
          type: string
          maxLength: 150
        display_name:
          type: string
          readOnly: true
      required:
        - display_name
        - email
        - id

````