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

# AsyncAPI Introduction

> Introduction to the c.technology real-time (RT) async API

## Welcome to the c.technology AsyncAPI

The c.technology vehicle real-time (RT) async API provides the ability to programmatically interact with real-time components of the c.technology system.
This includes real-time events such as alerts, notifications, vehicle status updates, configuration changes, and more.

<Note>
  Please reach out to us for access to OEM-specific fields and endpoints.
  This documentation focuses on the general-purpose API used by self-service and standard customers.
</Note>

## Key Features

* **Real-time Events**: Receive instant updates for vehicle status, notifications, and alerts
* **Push-based Updates**: No polling needed - events are pushed as they occur
* **WebSocket Connection**: Persistent bidirectional communication
* **Webhooks Alternative**: Webhooks are available for selected clients (Beta feature)
* **Schema Compatibility**: Message schemas correspond 1:1 to REST API endpoint responses

## How It Works

The AsyncAPI enables real-time communication through WebSocket connections. When you subscribe to channels, you'll receive instant notifications when relevant events occur.

### Message Structure

All messages follow a consistent structure with a header and data section:

```json theme={null}
{
  "header": {
    "type": "API",
    "api_version": "v2.2",
    "channel": "vehicle/status",
    "uri": "https://api.ctechnology.io/api/v2.2/vehicle/veh_.../status"
  },
  "data": {
    "vehicle_id": "veh_...",
    "longitude": 8.5,
    "latitude": 47.5,
    ...
  }
}
```

The `uri` field allows you to retrieve the same information via the REST API if needed.

## Authentication

To authenticate your connection:

1. Obtain an access token via the [REST API login endpoint](/api-reference/authentication).
2. Send the token to the `auth` channel of the broker.
3. Your connection is now linked to your user account.
4. You'll receive events relevant to your account permissions.

## AsyncAPI vs REST API

Choose the right API for your use case:

| Feature           | AsyncAPI                    | REST API                 |
| ----------------- | --------------------------- | ------------------------ |
| **Communication** | Push-based                  | Request / response       |
| **Updates**       | Real-time, instant          | On-demand polling        |
| **Connection**    | Persistent WebSocket        | Individual HTTP requests |
| **Best for**      | Live monitoring, dashboards | Data queries, updates    |
| **Rate limits**   | No limits                   | Rate-limited             |
