[comment]: # ({055a69af-df0deee4})
# 5 Zabbix sender protocol

[comment]: # ({/055a69af-df0deee4})

[comment]: # ({83ba3915-ea58f0b6})
#### Overview

Zabbix server and Zabbix proxy use a JSON-based communication protocol for receiving data from Zabbix sender.
Data can be received with the help of a [trapper item](/manual/config/items/itemtypes/trapper), or an [HTTP agent item](/manual/config/items/itemtypes/http) with trapping enabled.

Request and response messages must begin with [header and data length](/manual/appendix/protocols/header_datalen).

[comment]: # ({/83ba3915-ea58f0b6})

[comment]: # ({7afaeb19-51cd3761})
#### Zabbix sender request

```json
{
    "request": "sender data",
    "data": [
        {
            "host": "<hostname>",
            "key": "trap",
            "value": "test value"
        }
    ]
}
```

[comment]: # ({/7afaeb19-51cd3761})

[comment]: # ({17f05fdd-c4e3e287})
#### Zabbix server response

```json
{
    "response": "success",
    "info": "processed: 1; failed: 0; total: 1; seconds spent: 0.060753"
}
```

[comment]: # ({/17f05fdd-c4e3e287})

[comment]: # ({1d84472a-64bfec01})
#### Zabbix sender request with a timestamp

Alternatively, Zabbix sender can send a request with a timestamp and nanoseconds.

```json
{
    "request": "sender data",
    "data": [
        {
            "host": "<hostname>",
            "key": "trap",
            "value": "test value",
            "clock": 1516710794,
            "ns": 592397170
        },
        {
            "host": "<hostname>",
            "key": "trap",
            "value": "test value",
            "clock": 1516710795,
            "ns": 192399456
        }
    ],
    "clock": 1516712029,
    "ns": 873386094
}
```

[comment]: # ({/1d84472a-64bfec01})

[comment]: # ({bd158420-c71e91fd})
#### Zabbix server response

```json
{
    "response": "success",
    "info": "processed: 2; failed: 0; total: 2; seconds spent: 0.060904"
}
```

[comment]: # ({/bd158420-c71e91fd})
