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

# Get all files for a customer grouped by group_id



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json get /v1/customers/{id}/files
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/customers/{id}/files:
    get:
      tags:
        - Customer
      summary: Get all files for a customer grouped by group_id
      operationId: customer.files
      parameters:
        - name: id
          in: path
          required: true
          description: The customer identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        group_id:
                          type: string
                        description:
                          type: string
                        files:
                          type: array
                          items:
                            $ref: '#/components/schemas/FileResource'
                      required:
                        - group_id
                        - description
                        - files
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        const: Customer not found
                    required:
                      - message
                required:
                  - success
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    FileResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        type:
          type: string
        mime_type:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
        formatted_size:
          type: string
        group_id:
          type:
            - string
            - 'null'
        fileable_type:
          type:
            - string
            - 'null'
        fileable_id:
          type:
            - integer
            - 'null'
        temporary_url:
          type:
            - string
            - 'null'
        temporary_thumbnail_url:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - description
        - type
        - mime_type
        - size
        - formatted_size
        - group_id
        - fileable_type
        - fileable_id
        - temporary_url
        - temporary_thumbnail_url
        - created_at
        - updated_at
        - deleted_at
      title: FileResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````