## Statistics FlexiAPI can record logs generated by the FlexiSIP server and compile them into statistics. ### `POST /statistics/messages` Admin Announce the creation of a message. JSON parameters: * `id` **required**, string * `from` **required**, string the sender of the message * `sent_at` **required**, string, format ISO8601, when the message was actually sent * `encrypted` **required**, boolean * `conference_id` string ### `PATCH /statistics/messages/{message_id}/to/{to}/devices/{device_id}` Admin Complete a message status. JSON parameters: * `last_status` **required**, an integer containing the last status code * `received_at` **required**, format ISO8601, when the message was received ### `POST /statistics/calls` Admin Announce the beginning of a call. JSON parameters: * `id` **required**, string * `from` **required**, string the initier of the call * `to` **required**, string the destination of the call * `initiated_at` **required**, string, format ISO8601, when the call was started * `ended_at` string, format ISO8601, when the call finished * `conference_id` string ### `PATCH /statistics/calls/{call_id}/devices/{device_id}` Admin Complete a call status. JSON parameters: * `rang_at` format ISO8601, when the device rang * `invite_terminated` * `at` format ISO8601, when the invitation ended * `state` the termination state ### `PATCH /statistics/calls/{call_id}` Admin Update a call when ending.