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

# List tenants

> Retrieves every tenant associated to the user.



## OpenAPI

````yaml https://api.contracting.kukkingu.software/api/v1/docs.json get /api/v1/tenants
openapi: 3.1.0
info:
  title: Contracting Backend API
  version: 0.1.0
  description: API documentation for the Contracting backend service.
servers:
  - url: https://api.contracting.kukkingu.software
    description: API server
security:
  - bearerAuth: []
paths:
  /api/v1/tenants:
    get:
      tags:
        - Tenants
      summary: List tenants
      description: Retrieves every tenant associated to the user.
      parameters:
        - schema:
            description: Optional search term to filter tenants by name.
            type: string
          in: query
          name: search
          description: Optional search term to filter tenants by name.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier of the tenant.
                          example: tnt_cx0o4i8f0g950ul9gijig905
                        name:
                          type: string
                          minLength: 1
                          maxLength: 255
                          description: Tenant name.
                          example: My Acme Corp
                        description:
                          type: string
                          description: Detailed tenant description.
                          example: A leading provider of business solutions.
                        createdAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          description: Timestamp when the tenant was created.
                          example: '2023-10-05T14:48:00.000Z'
                        updatedAt:
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          description: Timestamp when the tenant was last updated.
                          example: '2023-10-05T14:48:00.000Z'
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                      description: Tenant resource returned by the API.
                    description: List of tenants returned by the API.
                required:
                  - data
                additionalProperties: false
                description: Standard success response payload wrapped in a data property.
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    default: Unauthorized
                    description: Machine-readable error code.
                    example: Unauthorized
                    type: string
                  message:
                    default: Unauthorized
                    description: Human-readable error message.
                    example: Unauthorized
                    type: string
                required:
                  - error
                  - message
                additionalProperties: false
                description: Error response for requests without valid authentication.
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    default: NotFound
                    description: Machine-readable error code.
                    example: NotFound
                    type: string
                  message:
                    default: Not Found
                    description: Human-readable error message.
                    example: Not Found
                    type: string
                required:
                  - error
                  - message
                additionalProperties: false
                description: Error response when the requested resource does not exist.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````