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

# Overview

> Architecture overview, authentication schemas, base URLs, and response standards for the iClick Automation REST API.

## Connection Information

**Connection Address:** `ws://127.0.0.1:23188`

#### Communication Protocol

**Request Format**

Client sends JSON format requests:

```
{
  "type": "api_method_name",
  "evtid": "unique_event_id",
  "timeout": 18,
  "param1": "value1",
}
```

**Field Description:**

* `type` (string): API method name
* `evtid` (string): Unique event ID for matching requests and responses
* `timeout` (number): Timeout in seconds, optional, supported by some interfaces
* Other parameters depend on the specific API method

**Response Format**

Server returns two formats:

**1. JSON Format Response (Regular Data):**

```
{
  "evtid": "unique_event_id",
  "type": "success",
  "data": /*return result*/
}
```

**2. Binary Format Response (Contains Binary Data):**

Binary data format: `[6-byte metadata length][metadata JSON][binary data]`

* First 6 bytes: UTF-8 encoded metadata length string
* Metadata: JSON format response information
* Binary data: Actual binary content

**Error Response**

```
{
  "evtid": "unique_event_id",
  "type": "error",
  "error": "error message"
}
```

**Server Event Push**

Events actively pushed by the server:

```
{
  "type": "event",
  "event": "event_name",
  "data": { "payload": "..." }
}
```

📢 Event Notifications

See [Event Notifications](https://docs.phones.farm/api-reference/event-notifications.md) for all available event types and detailed descriptions

### Client Implementation

We provide WebSocket client implementation examples for multiple programming languages to help you quickly integrate with iClick API:

📚 Multi-language Support

See [Multi-language Client Implementation](https://docs.phones.farm/api-reference/multi-language-client.md) for complete client code examples


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.