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

# Update connection files

> Update the files of a connection

## Supported file types

This endpoint is used for uploading SSL certificates for PostgreSQL and MySQL connections.


## OpenAPI

````yaml POST /team/{team_id}/connections/{connection_id}/files
openapi: 3.0.1
info:
  title: Chartbrew API reference
  description: The OpenAPI specification for Chartbrew
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.chartbrew.com
security:
  - bearerAuth: []
paths:
  /team/{team_id}/connections/{connection_id}/files:
    post:
      description: Add files to a connection (like SSL certificates)
      parameters:
        - name: team_id
          in: path
          description: ID of the team
          required: true
          schema:
            type: string
        - name: connection_id
          in: path
          description: ID of the connection
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                sslCa:
                  type: string
                  format: binary
                  description: SSL CA certificate file
                sslCert:
                  type: string
                  format: binary
                  description: SSL certificate file
                sslKey:
                  type: string
                  format: binary
                  description: SSL key file
      responses:
        '200':
          description: Updated connection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
        '400':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: No files were uploaded
        '401':
          description: Not authorized
      security:
        - bearerAuth: []
components:
  schemas:
    Connection:
      type: object
      properties:
        id:
          type: integer
        team_id:
          type: integer
        project_ids:
          type: array
          items:
            type: string
        oauth_id:
          type: string
          format: uuid
        name:
          type: string
        type:
          type: string
          enum:
            - mongodb
            - api
            - mysql
            - postgres
            - realtimedb
            - firestore
            - googleAnalytics
            - customerio
        subType:
          type: string
          description: Used for connections based on main types
          enum:
            - timescaledb
            - supabasedb
            - rdsPostgres
            - rdsMysql
            - api
            - mongodb
            - api
            - mysql
            - postgres
            - realtimedb
            - firestore
            - googleAnalytics
            - customerio
        active:
          type: boolean
          default: true
        host:
          type: string
        dbName:
          type: string
        port:
          type: string
        username:
          type: string
        password:
          type: string
        srv:
          type: boolean
          default: false
        options:
          type: object
        connectionString:
          type: string
          description: Used for MongoDB, Postgres, and MySQL connections
        authentication:
          type: object
          description: Used for API connections
          properties:
            type:
              type: string
              enum:
                - bearer_token
                - basic_auth
            token:
              type: string
            user:
              type: string
            pass:
              type: string
        firebaseServiceAccount:
          type: object
          description: JSON object containing the Firebase service account credentials
        ssl:
          type: boolean
          default: false
        sslMode:
          type: string
          default: require
        sslCa:
          type: string
        sslCert:
          type: string
        sslKey:
          type: string
        schema:
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````