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

# Listar demandados

> Your organization's defendants (demandados) with their case counts and any data you imported about them. Newest first. Cursor-paginated.



## OpenAPI

````yaml legal/openapi.json GET /v1/defendants
openapi: 3.1.0
info:
  title: Croma Legal API
  version: 1.0.0
  description: >-
    Read-only access to your organization's litigation portfolio in Croma Legal:
    cases (processes), actuaciones, defendants, portfolio analytics and bulk
    exports. Every request is scoped to the organization that owns the API key.
servers:
  - url: https://api.legal.usecroma.com
security:
  - bearerAuth: []
tags:
  - name: Processes
    description: Cases in your portfolio.
  - name: Actuaciones
    description: Court filings and events across every case.
  - name: Defendants
    description: Demandados and the cases linked to them.
  - name: Analytics
    description: Aggregates over the portfolio.
  - name: Exports
    description: Bulk CSV / JSONL files.
  - name: Jobs
    description: Async job status.
paths:
  /v1/defendants:
    get:
      tags:
        - Defendants
      summary: List defendants
      description: >-
        Your organization's defendants (demandados) with their case counts and
        any data you imported about them. Newest first. Cursor-paginated.
      operationId: list_defendants
      parameters:
        - name: q
          in: query
          required: false
          description: Partial match on the identification number (cédula or NIT).
          schema:
            type: string
        - name: name
          in: query
          required: false
          description: Partial, case-insensitive match on the name.
          schema:
            type: string
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque pagination cursor from a previous response's `next_cursor`.
            Omit for the first page.
          schema:
            type: string
        - name: page_size
          in: query
          required: false
          description: Rows per page (default 25, max 100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        '200':
          description: Successful response
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left before you are throttled.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: ISO 8601 timestamp when the window resets.
              schema:
                type: string
                format: date-time
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                  - has_more
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Defendant'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: Cursor for the next page. `null` when `has_more` is false.
                  has_more:
                    type: boolean
              example:
                data:
                  - id: 9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d
                    identification_number: '1234567890'
                    name: CLIENTE DE EJEMPLO
                    metadata:
                      valor_acumulado: 18500000
                    process_count: 2
                    created_at: '2024-04-02T15:21:07.000Z'
                next_cursor: 9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d
                has_more: true
        '401':
          description: Missing or invalid API key
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  type: authentication_error
                  code: invalid_api_key
                  message: Invalid or missing API key.
        '429':
          description: Rate limit exceeded
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  type: rate_limit_error
                  code: rate_limited
                  message: Rate limit exceeded. Try again in 42 seconds.
        '500':
          description: Unexpected internal error
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: >-
                    Internal error. Contact support with the X-Request-Id if it
                    persists.
      security:
        - bearerAuth: []
      externalDocs:
        description: Guide and examples
        url: https://docs.usecroma.com/legal/pagination
components:
  schemas:
    Defendant:
      type: object
      required:
        - id
        - identification_number
        - process_count
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Internal defendant id. Use it with `GET
            /v1/defendants/{defendant_id}/processes`.
        identification_number:
          type: string
          description: Cédula or NIT.
        name:
          type:
            - string
            - 'null'
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            Data your organization imported about the defendant. Free-form;
            `null` when none.
        process_count:
          type: integer
          description: Number of cases in your portfolio linked to this defendant.
        created_at:
          type: string
          format: date-time
          description: When the defendant record was created.
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              description: >-
                Broad category: invalid_request_error, authentication_error,
                not_found_error, rate_limit_error, api_error.
            code:
              type: string
              description: Machine-readable specific code.
            message:
              type: string
              description: Human-readable explanation, safe to surface in UI.
            param:
              type: string
              description: Field that triggered the error. Present on validation errors.
            details:
              type: object
              description: Free-form structured detail.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Use Authorization: Bearer YOUR_API_KEY'

````