---
title: "Update Current Connection"
method: PATCH
path: "/connections/current"
tags: ["Connections"]
---

# Update Current Connection

`PATCH /connections/current`

Update the details of the current active connection. The current connection is derived from the provided connection token.

## Headers

- `Connection-Token` string, required

## Request body

- object
  - `status` 'connected' | 'archived' | 'disconnected'
  - `options` object
  - `company` object
    - `name` string — The name of the company.
    - `dotNumbers` string[] — DOT numbers associated with the company.
  - `externalId` string
  - `syncMode` 'automatic' | 'manual' — Enum values: - `automatic`: Terminal will keep this connections data up to date - `manual`: Terminal will only sync data upon request
  - `tags` string[]
  - `filters` object — Filters applied to connection data
    - `vehicles` object
      - `status` 'active' | 'inactive' — Filter connection to only include data related to vehicles with a specified status
      - `excludeIds` string[] — IDs of vehicles to exclude from data ingestion
      - `includeIds` string[] — IDs of vehicles to include in data ingestion (takes priority over other filters)
    - `drivers` object
      - `status` 'active' | 'inactive' — Filter connection to only include data related to drivers with a specified status
      - `excludeIds` string[] — IDs of drivers to exclude from data ingestion
      - `includeIds` string[] — IDs of drivers to include in data ingestion (takes priority over other filters)

## Response `200`

OK

- union
  - object — Fields shared by all connection records.
    - `id` string, ulid, required
    - `company` object, required
      - `name` string — Optional name of the connection.
      - `dotNumbers` string[] — Optional DOT numbers associated with this connection.
    - `account` object, required
      - `name` string — The name of the account according to the provider.
      - `dotNumbers` string[] — DOT numbers associated with the account according to the provider.
      - `user` object — The user of the provider account that created the connection.
        - `sourceId` string — The ID of the user in the provider's system.
        - `firstName` string
        - `lastName` string
        - `email` string
    - `provider` object, required
      - `code` string, required — Every provider has a unique code to identify it across Terminal's system. You can find each provider's code under [provider details](/providers).
      - `name` string, required — The name of the Telematics Service Provider.
    - `externalId` string — An optional ID from your system that can be used to reference connections.
    - `sourceId` string — The ID used in the source system to represent the account this connection has or had access to. This may be an `organizationId` or `accountId`. Note: not all systems expose this information, in which case it may be undefined.
    - `syncMode` 'automatic' | 'manual', required — Enum values: - `automatic`: Terminal will keep this connections data up to date - `manual`: Terminal will only sync data upon request
    - `token` string, required — This token is used when interacting with a connections' data.
    - `tags` string[] — An optional list of tags from your system that can be used to reference connections.
    - `createdAt` string, date-time, required — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
    - `updatedAt` string, date-time, required — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
    - `status` 'connected' | 'disconnected' | 'archived' | 'pending_deletion', required — The current status of the connection.
    - `options` object, required
    - `filters` object — Filters applied to connection data
      - `vehicles` object
        - `status` 'active' | 'inactive' — Filter connection to only include data related to vehicles with a specified status
        - `excludeIds` string[] — IDs of vehicles to exclude from data ingestion
        - `includeIds` string[] — IDs of vehicles to include in data ingestion (takes priority over other filters)
      - `drivers` object
        - `status` 'active' | 'inactive' — Filter connection to only include data related to drivers with a specified status
        - `excludeIds` string[] — IDs of drivers to exclude from data ingestion
        - `includeIds` string[] — IDs of drivers to include in data ingestion (takes priority over other filters)
    - `linkUrl` string, uri, required — The URL to send your user to in order to have them re-authenticate the connection.
  - object — Fields shared by all connection records.
    - `id` string, ulid, required
    - `company` object, required
      - `name` string — Optional name of the connection.
      - `dotNumbers` string[] — Optional DOT numbers associated with this connection.
    - `account` object, required
      - `name` string — The name of the account according to the provider.
      - `dotNumbers` string[] — DOT numbers associated with the account according to the provider.
      - `user` object — The user of the provider account that created the connection.
        - `sourceId` string — The ID of the user in the provider's system.
        - `firstName` string
        - `lastName` string
        - `email` string
    - `provider` object, required
      - `code` string, required — Every provider has a unique code to identify it across Terminal's system. You can find each provider's code under [provider details](/providers).
      - `name` string, required — The name of the Telematics Service Provider.
    - `externalId` string — An optional ID from your system that can be used to reference connections.
    - `sourceId` string — The ID used in the source system to represent the account this connection has or had access to. This may be an `organizationId` or `accountId`. Note: not all systems expose this information, in which case it may be undefined.
    - `syncMode` 'automatic' | 'manual', required — Enum values: - `automatic`: Terminal will keep this connections data up to date - `manual`: Terminal will only sync data upon request
    - `token` string, required — This token is used when interacting with a connections' data.
    - `tags` string[] — An optional list of tags from your system that can be used to reference connections.
    - `createdAt` string, date-time, required — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
    - `updatedAt` string, date-time, required — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
    - `status` 'deleting' | 'deleted', required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `429` — Too Many Requests
- `500` — Internal Server Error
- `504` — Gateway Timeout Error

---

[API](https://skmtc.dev/withterminal/apis/terminal-telematics-api.md) · [All operations](https://skmtc.dev/withterminal/apis/terminal-telematics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/withterminal/terminal-telematics-api/revisions/90249c4a1739/schema)
