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

# Update Connection

> Update connection metadata (active toggle, tag assignment, business_name, abn, email).
Only the owning tenant may update a connection.

- Omitting a field leaves it unchanged.
- Sending null or [] for tags clears all tag assignments.
- Sending null for business_name, abn, or email clears that field.
- Sending null for active is not allowed (active is always a bool).



## OpenAPI

````yaml openapi_2024-03-26 patch /connection/{connection_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: '2024-03-26'
servers:
  - url: https://api.pathstack.io
    description: PathStack production environment
security: []
paths:
  /connection/{connection_id}:
    patch:
      tags:
        - Connections
      summary: Update Connection
      description: >-
        Update connection metadata (active toggle, tag assignment,
        business_name, abn, email).

        Only the owning tenant may update a connection.


        - Omitting a field leaves it unchanged.

        - Sending null or [] for tags clears all tag assignments.

        - Sending null for business_name, abn, or email clears that field.

        - Sending null for active is not allowed (active is always a bool).
      operationId: update_connection_connection__connection_id__patch
      parameters:
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Connection ID
            description: Connection ID of the Connection to be updated
          description: Connection ID of the Connection to be updated
        - name: x-api-version
          in: header
          required: false
          schema:
            type: string
            format: date
            default: '2024-03-26'
            title: X-Api-Version
          examples:
            default:
              value: '2024-03-26'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionSuccessResponse'
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 400
                        title: Error code
                      message:
                        type: string
                        example: Invalid JWT format
                        title: Error message
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 401
                        title: Error code
                      message:
                        type: string
                        example: >-
                          Authentication header is missing, or token is
                          invalid/expired.
                        title: Error message
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 403
                        title: Error code
                      message:
                        type: string
                        example: You do not have access to this resource
                        title: Error message
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 404
                        title: Error code
                      message:
                        type: string
                        example: Connection with ID <connection_id> not found
                        title: Error message
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 422
                        title: Error code
                      message:
                        type: string
                        example: Field required
                        title: Error message
                      loc:
                        items:
                          anyOf:
                            - type: string
                            - type: integer
                        type: array
                        title: Location
                      msg:
                        type: string
                        title: Message
                      type:
                        type: string
                        title: Error Type
          description: Unprocessable Entity
      security:
        - JWTBearer: []
components:
  schemas:
    ConnectionUpdate:
      properties:
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        business_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Name
        abn:
          anyOf:
            - type: string
            - type: 'null'
          title: Abn
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
      type: object
      title: ConnectionUpdate
    ConnectionSuccessResponse:
      properties:
        data:
          $ref: '#/components/schemas/ConnectionNoCredentials'
      type: object
      required:
        - data
      title: ConnectionSuccessResponse
    ConnectionNoCredentials:
      properties:
        integration_name:
          $ref: '#/components/schemas/ProviderEnum'
        business_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Name
        abn:
          anyOf:
            - type: string
            - type: 'null'
          title: Abn
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        active:
          type: boolean
          title: Active
        id:
          type: string
          format: uuid4
          title: Id
        tenant_id:
          type: string
          format: uuid4
          title: Tenant Id
        collection_start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Collection Start Time
        collection_end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Collection End Time
        configuration:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Configuration
      type: object
      required:
        - integration_name
        - business_name
        - abn
        - email
        - active
        - id
        - tenant_id
        - collection_start_time
        - collection_end_time
        - configuration
      title: ConnectionNoCredentials
    ProviderEnum:
      type: string
      enum:
        - mtdata
        - geotab
        - navman
        - mixtelematics
        - radius
        - verizon_connect
        - volvo
        - fleetsu
        - digital_matter
        - netstar
        - netstar_v2
        - webfleet
        - scania
        - linxio
        - geoforce
        - michelin_connected_fleet
        - navixy
        - netcorp
        - mapon
      title: ProviderEnum
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer

````