Psy Platform API (1.0)

|-

archive

Создание архивной записи

Authorizations:
BearerAuth
Request Body schema: application/json
required

Данные записи

encrypted_data
required
string
title
required
string
type
required
string
client_id
integer
description
string
period_end
string
period_start
string
site_id
integer
tags
Array of strings

Responses

Response Schema: application/json
client_id
integer
created_at
string
description
string
encrypted_data
string
encryption_version
integer
period_end
string
period_start
string
site_id
integer
tags
Array of strings
title
string
type
string
updated_at
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "client_id": 0,
  • "description": "string",
  • "encrypted_data": "string",
  • "period_end": "string",
  • "period_start": "string",
  • "site_id": 0,
  • "tags": [
    ],
  • "title": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "created_at": "string",
  • "description": "string",
  • "encrypted_data": "string",
  • "encryption_version": 0,
  • "period_end": "string",
  • "period_start": "string",
  • "site_id": 0,
  • "tags": [
    ],
  • "title": "string",
  • "type": "string",
  • "updated_at": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Удаление архивной записи

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID записи

Responses

Response Schema: application/json
status
string

Response samples

Content type
application/json
{
  • "status": "string"
}

Архивная запись по UUID

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID записи

Responses

Response Schema: application/json
client_id
integer
created_at
string
description
string
encrypted_data
string
encryption_version
integer
period_end
string
period_start
string
site_id
integer
tags
Array of strings
title
string
type
string
updated_at
string
user_id
integer
uuid
string

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "created_at": "string",
  • "description": "string",
  • "encrypted_data": "string",
  • "encryption_version": 0,
  • "period_end": "string",
  • "period_start": "string",
  • "site_id": 0,
  • "tags": [
    ],
  • "title": "string",
  • "type": "string",
  • "updated_at": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Полное обновление архивной записи

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID записи

Request Body schema: application/json
required

Данные записи

encrypted_data
required
string
title
required
string
type
required
string
client_id
integer
description
string
period_end
string
period_start
string
site_id
integer
tags
Array of strings

Responses

Response Schema: application/json
client_id
integer
created_at
string
description
string
encrypted_data
string
encryption_version
integer
period_end
string
period_start
string
site_id
integer
tags
Array of strings
title
string
type
string
updated_at
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "client_id": 0,
  • "description": "string",
  • "encrypted_data": "string",
  • "period_end": "string",
  • "period_start": "string",
  • "site_id": 0,
  • "tags": [
    ],
  • "title": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "created_at": "string",
  • "description": "string",
  • "encrypted_data": "string",
  • "encryption_version": 0,
  • "period_end": "string",
  • "period_start": "string",
  • "site_id": 0,
  • "tags": [
    ],
  • "title": "string",
  • "type": "string",
  • "updated_at": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Список архивных записей

В ответе encrypted_data расшифрована.

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

client_id
integer

Фильтр по клиенту (ID)

type
string

Фильтр по типу

tags
string

Теги через запятую

q
string

Поиск по тексту

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.ArchiveResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Теги архивных записей

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]

audit

Журнал аудита

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 50)

entity_type
string

Фильтр по типу сущности

action
string

Фильтр по действию (create|update|patch|delete)

username
string

Фильтр по пользователю

status_code
integer

Фильтр по HTTP-коду ответа

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.AuditLogResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

user

Вход по короткой ссылке (temporary token)

Query-параметр teken (temporary token) вида <short>.<long>. Из короткой ссылки извлекается JWT, ставится cookie user_token.

query Parameters
teken
required
string

Temporary token — короткая ссылка вида <short>.<long>

Responses

Response Schema: application/json
email
string
phone
integer
settings
string
token
string
username
string
uuid
string

Response samples

Content type
application/json
{
  • "email": "string",
  • "phone": 0,
  • "settings": "string",
  • "token": "string",
  • "username": "string",
  • "uuid": "string"
}

Вход пользователя (админка)

Устанавливает cookie user_token (Secure, HttpOnly, SameSite=Lax, 7 дней). Токен в теле не возвращается.

Request Body schema: application/json
required

Учётные данные

password
required
string
username
required
string [ 3 .. 50 ] characters
email
string

Responses

Response Schema: application/json
email
string
phone
integer
settings
string
token
string
username
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "phone": 0,
  • "settings": "string",
  • "token": "string",
  • "username": "string",
  • "uuid": "string"
}

Выход

Authorizations:
BearerAuth

Responses

Response Schema: application/json
status
string

Response samples

Content type
application/json
{
  • "status": "string"
}

Удаление аккаунта пользователя

Authorizations:
BearerAuth

Responses

Профиль текущего пользователя

Authorizations:
BearerAuth

Responses

Response Schema: application/json
email
string
phone
integer
settings
string
token
string
username
string
uuid
string

Response samples

Content type
application/json
{
  • "email": "string",
  • "phone": 0,
  • "settings": "string",
  • "token": "string",
  • "username": "string",
  • "uuid": "string"
}

Регистрация пользователя (админка)

Регистрирует нового пользователя. Возвращает JWT в поле token.

Request Body schema: application/json
required

Данные регистрации

email
required
string
password
required
string >= 6 characters
username
required
string [ 3 .. 50 ] characters
phone
string

Responses

Response Schema: application/json
email
string
phone
integer
settings
string
token
string
username
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "phone": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "phone": 0,
  • "settings": "string",
  • "token": "string",
  • "username": "string",
  • "uuid": "string"
}

Частичное обновление пользователя

Обновляются только переданные поля.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Обновляемые поля

email
string
password
string >= 6 characters
phone
string
settings
string
username
string [ 3 .. 50 ] characters

Responses

Response Schema: application/json
email
string
phone
integer
settings
string
token
string
username
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "phone": "string",
  • "settings": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "phone": 0,
  • "settings": "string",
  • "token": "string",
  • "username": "string",
  • "uuid": "string"
}

Полное обновление пользователя

ID в теле игнорируется — берётся из JWT.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Данные пользователя

email
required
string
password
required
string >= 6 characters
username
required
string [ 3 .. 50 ] characters
id
integer
phone
string
settings
string

Responses

Response Schema: application/json
email
string
phone
integer
settings
string
token
string
username
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "id": 0,
  • "password": "string",
  • "phone": "string",
  • "settings": "string",
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "phone": 0,
  • "settings": "string",
  • "token": "string",
  • "username": "string",
  • "uuid": "string"
}

billing

Баланс пользователя

Authorizations:
BearerAuth
path Parameters
user_id
required
integer

ID пользователя

Responses

Response Schema: application/json
balance
integer
user_id
integer

Response samples

Content type
application/json
{
  • "balance": 0,
  • "user_id": 0
}

Балансы пользователя по сайтам

Authorizations:
BearerAuth
path Parameters
user_id
required
integer

ID пользователя

Responses

Response Schema: application/json
Array of objects (dto.BillingBalance)
user_id
integer

Response samples

Content type
application/json
{
  • "balances": [
    ],
  • "user_id": 0
}

Добавление транзакции

Числовые user_id/site_id — унаследованный контракт (внутренние ID).

Authorizations:
BearerAuth
Request Body schema: application/json
required

Данные транзакции

amount
required
integer
reason
required
string
site_id
required
integer
user_id
required
integer
min_balance
integer
Default: 0
reason_id
integer

Responses

Response Schema: application/json
message
string

Request samples

Content type
application/json
{
  • "amount": 0,
  • "min_balance": 0,
  • "reason": "string",
  • "reason_id": 0,
  • "site_id": 0,
  • "user_id": 0
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Последние транзакции

Известный баг: хэндлер читает ключ контекста user_id, а middleware кладёт userID — фактически всегда 401.

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.BillingTransaction)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "transactions": [
    ]
}

Транзакции пользователя

Числовой user_id — унаследованный контракт (внутренний ID).

Authorizations:
BearerAuth
path Parameters
user_id
required
integer

ID пользователя

query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.BillingTransaction)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "transactions": [
    ]
}

Транзакции пользователя по сайту

Authorizations:
BearerAuth
path Parameters
user_id
required
integer

ID пользователя

site_id
required
integer

ID сайта

query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.BillingTransaction)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "transactions": [
    ]
}

calendar

Создание календаря

Authorizations:
BearerAuth
Request Body schema: application/json
required

Данные календаря

name
required
string
category
string
color
string
external_id
string
provider
string
settings
string

Responses

Response Schema: application/json
category
string
color
string
external_id
string
id
integer
name
string
provider
string
settings
string
sync_token
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "name": "string",
  • "provider": "string",
  • "settings": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "id": 0,
  • "name": "string",
  • "provider": "string",
  • "settings": "string",
  • "sync_token": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Удаление календаря

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID календаря

Responses

Календарь по UUID

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID календаря

Responses

Response Schema: application/json
category
string
color
string
external_id
string
id
integer
name
string
provider
string
settings
string
sync_token
string
user_id
integer
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "id": 0,
  • "name": "string",
  • "provider": "string",
  • "settings": "string",
  • "sync_token": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Частичное обновление календаря

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID календаря

Request Body schema: application/json
required

Обновляемые поля

category
string
color
string
external_id
string
name
string
provider
string
settings
string

Responses

Response Schema: application/json
category
string
color
string
external_id
string
id
integer
name
string
provider
string
settings
string
sync_token
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "name": "string",
  • "provider": "string",
  • "settings": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "id": 0,
  • "name": "string",
  • "provider": "string",
  • "settings": "string",
  • "sync_token": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Полное обновление календаря

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID календаря

Request Body schema: application/json
required

Данные календаря

name
required
string
category
string
color
string
external_id
string
provider
string
settings
string

Responses

Response Schema: application/json
category
string
color
string
external_id
string
id
integer
name
string
provider
string
settings
string
sync_token
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "name": "string",
  • "provider": "string",
  • "settings": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "color": "string",
  • "external_id": "string",
  • "id": 0,
  • "name": "string",
  • "provider": "string",
  • "settings": "string",
  • "sync_token": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Список календарей

Ответ — чистый JSON-массив (без обёртки rows/pagination).

Authorizations:
BearerAuth

Responses

Response Schema: application/json
Array
category
string
color
string
external_id
string
id
integer
name
string
provider
string
settings
string
sync_token
string
user_id
integer
uuid
string

Response samples

Content type
application/json
[
  • {
    }
]

call

Список звонков пользователя

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array of objects (dto.CallResponse)

Response samples

Content type
application/json
{
  • "rows": [
    ]
}

Создание звонка

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Параметры звонка

client_uuid
string
max_duration
integer
settings
string

Responses

Response Schema: application/json
client_uuid
string
created_at
string
created_by
string
ended_at
string
link
string
max_duration
integer
settings
string
status
string
uuid
string

Request samples

Content type
application/json
{
  • "client_uuid": "string",
  • "max_duration": 0,
  • "settings": "string"
}

Response samples

Content type
application/json
{
  • "client_uuid": "string",
  • "created_at": "string",
  • "created_by": "string",
  • "ended_at": "string",
  • "link": "string",
  • "max_duration": 0,
  • "settings": "string",
  • "status": "string",
  • "uuid": "string"
}

Статус звонка

Публичный — для проверки ссылки клиентом/гостем. Без поля link.

path Parameters
uuid
required
string

UUID звонка

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
client_uuid
string
created_at
string
created_by
string
ended_at
string
link
string
max_duration
integer
settings
string
status
string
uuid
string

Response samples

Content type
application/json
{
  • "client_uuid": "string",
  • "created_at": "string",
  • "created_by": "string",
  • "ended_at": "string",
  • "link": "string",
  • "max_duration": 0,
  • "settings": "string",
  • "status": "string",
  • "uuid": "string"
}

Завершение звонка

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID звонка

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
status
string

Response samples

Content type
application/json
{
  • "status": "string"
}

client

Текущий клиент

Authorizations:
ClientAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
email
string
name
string
phone
string
settings
string
token
string
uuid
string

Response samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "settings": "string",
  • "token": "string",
  • "uuid": "string"
}

Частичное обновление клиента

Authorizations:
ClientAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Обновляемые поля

email
string
name
string
phone
string
settings
string

Responses

Response Schema: application/json
email
string
name
string
phone
string
settings
string
token
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "settings": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "settings": "string",
  • "token": "string",
  • "uuid": "string"
}

Вход клиента

Устанавливает cookie client_token (7 дней). Токен в теле не возвращается.

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Учётные данные

email
required
string
password
required
string

Responses

Response Schema: application/json
email
string
name
string
phone
string
settings
string
token
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "settings": "string",
  • "token": "string",
  • "uuid": "string"
}

Выход клиента

Authorizations:
ClientAuth

Responses

Response Schema: application/json
status
string

Response samples

Content type
application/json
{
  • "status": "string"
}

Страница клиента по URL

Authorizations:
ClientAuth
path Parameters
pageURL
required
string

URL страницы (например about/us)

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Профиль клиента

Authorizations:
ClientAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
agreement_signed
boolean
birth_date
string
created_at
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string
updated_at
string

Response samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "created_at": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string",
  • "updated_at": "string"
}

Частичное обновление профиля клиента

Authorizations:
ClientAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Обновляемые поля

agreement_signed
boolean
birth_date
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string
tags
Array of strings

Responses

Response Schema: application/json
agreement_signed
boolean
birth_date
string
created_at
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string
updated_at
string

Request samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "created_at": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string",
  • "updated_at": "string"
}

Создание профиля клиента

Authorizations:
ClientAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные профиля

agreement_signed
boolean
birth_date
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string

Responses

Response Schema: application/json
agreement_signed
boolean
birth_date
string
created_at
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string
updated_at
string

Request samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string"
}

Response samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "created_at": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string",
  • "updated_at": "string"
}

Полное обновление профиля клиента

Authorizations:
ClientAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные профиля

agreement_signed
boolean
birth_date
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string

Responses

Response Schema: application/json
agreement_signed
boolean
birth_date
string
created_at
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string
updated_at
string

Request samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string"
}

Response samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "created_at": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string",
  • "updated_at": "string"
}

Регистрация клиента

Публичный. Возвращает JWT клиента в поле token (cookie не ставится).

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные клиента

email
required
string
name
required
string [ 1 .. 100 ] characters
password
required
string >= 6 characters

Responses

Response Schema: application/json
email
string
name
string
phone
string
settings
string
token
string
uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "phone": "string",
  • "settings": "string",
  • "token": "string",
  • "uuid": "string"
}

Регистрация клиента администратором

Возвращает UUID клиента и короткую ссылку для входа в кабинет.

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные клиента

email
required
string
name
required
string [ 1 .. 100 ] characters
password
required
string >= 6 characters

Responses

Response Schema: application/json
auth_url
string
client_uuid
string

Request samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "auth_url": "string",
  • "client_uuid": "string"
}

Скачивание файла клиента (статик)

Публичный роут на корне сервера: /client-files/{uuid} (вне /api/v1). Сайт резолвится из заголовков.

path Parameters
uuid
required
string

UUID файла

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

clinical_card

Клиническая карта клиента

Authorizations:
BearerAuth
path Parameters
client_uuid
required
string

UUID клиента

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
client_id
integer
created_at
string
description
string
encrypted_data
string
encryption_version
integer
period_end
string
period_start
string
tags
string
title
string
type
string
updated_at
string
uuid
string

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "created_at": "string",
  • "description": "string",
  • "encrypted_data": "string",
  • "encryption_version": 0,
  • "period_end": "string",
  • "period_start": "string",
  • "tags": "string",
  • "title": "string",
  • "type": "string",
  • "updated_at": "string",
  • "uuid": "string"
}

Создание клинической карты

Authorizations:
BearerAuth
path Parameters
client_uuid
required
string

UUID клиента

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные карты

encrypted_data
required
string
description
string
period_end
string
period_start
string
tags
string
title
string
type
string

Responses

Response Schema: application/json
client_id
integer
created_at
string
description
string
encrypted_data
string
encryption_version
integer
period_end
string
period_start
string
tags
string
title
string
type
string
updated_at
string
uuid
string

Request samples

Content type
application/json
{
  • "description": "string",
  • "encrypted_data": "string",
  • "period_end": "string",
  • "period_start": "string",
  • "tags": "string",
  • "title": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "created_at": "string",
  • "description": "string",
  • "encrypted_data": "string",
  • "encryption_version": 0,
  • "period_end": "string",
  • "period_start": "string",
  • "tags": "string",
  • "title": "string",
  • "type": "string",
  • "updated_at": "string",
  • "uuid": "string"
}

Полное обновление клинической карты

Authorizations:
BearerAuth
path Parameters
client_uuid
required
string

UUID клиента

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные карты

encrypted_data
required
string
description
string
period_end
string
period_start
string
tags
string
title
string
type
string

Responses

Response Schema: application/json
client_id
integer
created_at
string
description
string
encrypted_data
string
encryption_version
integer
period_end
string
period_start
string
tags
string
title
string
type
string
updated_at
string
uuid
string

Request samples

Content type
application/json
{
  • "description": "string",
  • "encrypted_data": "string",
  • "period_end": "string",
  • "period_start": "string",
  • "tags": "string",
  • "title": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "created_at": "string",
  • "description": "string",
  • "encrypted_data": "string",
  • "encryption_version": 0,
  • "period_end": "string",
  • "period_start": "string",
  • "tags": "string",
  • "title": "string",
  • "type": "string",
  • "updated_at": "string",
  • "uuid": "string"
}

Профиль клиента по UUID

Authorizations:
BearerAuth
path Parameters
client_uuid
required
string

UUID клиента

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
agreement_signed
boolean
birth_date
string
created_at
string
emergency_contact
string
family_status
string
full_name
string
health_notes
string
medication_info
string
occupation
string
previous_therapy_experience
string
primary_request
string
updated_at
string

Response samples

Content type
application/json
{
  • "agreement_signed": true,
  • "birth_date": "string",
  • "created_at": "string",
  • "emergency_contact": "string",
  • "family_status": "string",
  • "full_name": "string",
  • "health_notes": "string",
  • "medication_info": "string",
  • "occupation": "string",
  • "previous_therapy_experience": "string",
  • "primary_request": "string",
  • "updated_at": "string"
}

Список клиентов

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

email
string

Фильтр по email

phone
string

Фильтр по телефону

full_name
string

Фильтр по ФИО

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.ClientWithProfileResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Список клинических карт

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

type
string

Фильтр по типу

tag
string

Фильтр по тегу

q
string

Поиск по тексту

email
string

Фильтр по email

phone
string

Фильтр по телефону

full_name
string

Фильтр по ФИО

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.ClinicalCardWithClientResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

event

Событие клиента по UUID

Authorizations:
ClientAuth
path Parameters
uuid
required
string

UUID события

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Response samples

Content type
application/json
{
  • "calendar_uuid": "string",
  • "client_uuid": "string",
  • "description": "string",
  • "end_time": "string",
  • "external_id": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "site_id": 0,
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string",
  • "user_id": 0,
  • "uuid": "string"
}

События клиента в интервале

Период ограничен 45 днями (start_to - start_from <= 45 дней).

Authorizations:
ClientAuth
query Parameters
start_from
required
string

Начало интервала (RFC3339)

start_to
required
string

Конец интервала (RFC3339)

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Response samples

Content type
application/json
[
  • {
    }
]

Создание события

Authorizations:
BearerAuth
Request Body schema: application/json
required

Данные события

calendar_uuid
required
string
end_time
required
string
start_time
required
string
title
required
string
client_uuid
string
description
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
tags
Array of strings

Responses

Response Schema: application/json
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "calendar_uuid": "string",
  • "client_uuid": "string",
  • "description": "string",
  • "end_time": "string",
  • "external_id": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "site_id": 0,
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "calendar_uuid": "string",
  • "client_uuid": "string",
  • "description": "string",
  • "end_time": "string",
  • "external_id": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "site_id": 0,
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Удаление события

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID события

Responses

Событие по UUID

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID события

Responses

Response Schema: application/json
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Response samples

Content type
application/json
{
  • "calendar_uuid": "string",
  • "client_uuid": "string",
  • "description": "string",
  • "end_time": "string",
  • "external_id": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "site_id": 0,
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Частичное обновление события

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID события

Request Body schema: application/json
required

Обновляемые поля

description
string
end_time
string
is_all_day
boolean
location
string
rrule
string
settings
string
start_time
string
tags
Array of strings
title
string

Responses

Response Schema: application/json
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "description": "string",
  • "end_time": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "calendar_uuid": "string",
  • "client_uuid": "string",
  • "description": "string",
  • "end_time": "string",
  • "external_id": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "site_id": 0,
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string",
  • "user_id": 0,
  • "uuid": "string"
}

Полное обновление события

Authorizations:
BearerAuth
path Parameters
uuid
required
string

UUID события

Request Body schema: application/json
required

Данные события

end_time
required
string
start_time
required
string
title
required
string
description
string
is_all_day
boolean
location
string
rrule
string
settings
string
tags
Array of strings

Responses

Response Schema: application/json
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Request samples

Content type
application/json
{
  • "description": "string",
  • "end_time": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "calendar_uuid": "string",
  • "client_uuid": "string",
  • "description": "string",
  • "end_time": "string",
  • "external_id": "string",
  • "is_all_day": true,
  • "location": "string",
  • "rrule": "string",
  • "settings": "string",
  • "site_id": 0,
  • "start_time": "string",
  • "tags": [
    ],
  • "title": "string",
  • "user_id": 0,
  • "uuid": "string"
}

События в интервале

Ответ — чистый JSON-массив. RRule-события раскрываются в повторения. Параметр site_id игнорируется.

Authorizations:
BearerAuth
query Parameters
start_from
required
string

Начало интервала (RFC3339)

start_to
required
string

Конец интервала (RFC3339)

calendar_uuid
string

Фильтр по календарю (UUID)

tags
string

Теги через запятую

Responses

Response Schema: application/json
Array
calendar_uuid
string
client_uuid
string
description
string
end_time
string
external_id
string
is_all_day
boolean
location
string
rrule
string
settings
string
site_id
integer
start_time
string
tags
Array of strings
title
string
user_id
integer
uuid
string

Response samples

Content type
application/json
[
  • {
    }
]

Теги событий

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]

chat

Список диалогов

До 100 записей. Поле pagination всегда null.

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.ConversationResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Создание диалога

Только для аутентифицированного пользователя (admin). created_byuser:<uuid>.

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные диалога

participant_id
required
string
participant_type
required
string
Enum: "client" "guest"

Responses

Response Schema: application/json
created_at
string
created_by
string
participant_id
string
participant_type
string
status
string
uuid
string

Request samples

Content type
application/json
{
  • "participant_id": "string",
  • "participant_type": "client"
}

Response samples

Content type
application/json
{
  • "created_at": "string",
  • "created_by": "string",
  • "participant_id": "string",
  • "participant_type": "string",
  • "status": "string",
  • "uuid": "string"
}

Сообщения диалога

До 100 сообщений. Поле pagination всегда null.

path Parameters
uuid
required
string

UUID диалога

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.MessageResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

WebSocket сигнализация звонков

Upgrade до WebSocket. Максимальный размер сообщения 65536 байт, pongWait 120s.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

WebSocket чат

Upgrade до WebSocket (вне middleware-аутентификации). Идентификация внутренняя:

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

Выпуск ws-токена

Возвращает короткую ссылку-код (жизнь 5 минут), которую можно передать в ?code= при подключении к WebSocket. Доступно пользователю, клиенту или гостю (по cookie session_id).

Responses

Response Schema: application/json
code
string

Response samples

Content type
application/json
{
  • "code": "string"
}

css

Получение CSS сайта

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Загрузка CSS сайта

Тело запроса — сырой текст CSS (не JSON, не multipart).

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: text/css
required

Содержимое CSS

string

Responses

Уведомление CSS-сервиса (Tailwind)

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
message
string

Response samples

Content type
application/json
{
  • "message": "string"
}

export

Экспорт изображений (ZIP)

Возвращает application/zip (manifest.json + files.zip).

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Экспорт страницы

Authorizations:
BearerAuth
path Parameters
id
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
children
integer
data
string
data_preview
string
deleted
boolean
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
url
string
url_uses
integer
use_html
boolean

Response samples

Content type
application/json
{
  • "children": 0,
  • "data": "string",
  • "data_preview": "string",
  • "deleted": true,
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "url": "string",
  • "url_uses": 0,
  • "use_html": true
}

Экспорт всех страниц

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array of objects (dto.PageExport)

Response samples

Content type
application/json
{
  • "pages": [
    ]
}

Экспорт сайта

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Экспорт шаблона по имени

Authorizations:
BearerAuth
path Parameters
name
required
string

Имя шаблона

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
category
string
css
string
deleted
boolean
description
string
fields
string
html
string
is_shared
boolean
js
string
name
string
title
string
values
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "css": "string",
  • "deleted": true,
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "is_shared": true,
  • "js": "string",
  • "name": "string",
  • "title": "string",
  • "values": "string"
}

Экспорт всех шаблонов сайта

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array of objects (dto.TemplateExport)

Response samples

Content type
application/json
{
  • "templates": [
    ]
}

Экспорт общих шаблонов

Authorizations:
BearerAuth

Responses

Response Schema: application/json
Array of objects (dto.TemplateExport)

Response samples

Content type
application/json
{
  • "templates": [
    ]
}

Экспорт файлов (ZIP)

Возвращает application/zip (manifest.json + files.zip).

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Импорт изображений (ZIP)

multipart, поле file — zip-архив (manifest.json + files.zip).

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: multipart/form-data
required
file
required
string <binary>

ZIP-архив

Responses

Response Schema: application/json
message
string

Response samples

Content type
application/json
{
  • "message": "string"
}

Импорт страницы

Принимает JSON или multipart-файл с JSON.

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Экспорт страницы

children
integer
data
string
data_preview
string
deleted
boolean
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
url
string
url_uses
integer
use_html
boolean

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Request samples

Content type
application/json
{
  • "children": 0,
  • "data": "string",
  • "data_preview": "string",
  • "deleted": true,
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "url": "string",
  • "url_uses": 0,
  • "use_html": true
}

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Импорт всех страниц

Принимает JSON или multipart-файл с JSON.

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Экспорт страниц

Array of objects (dto.PageExport)

Responses

Response Schema: application/json
message
string

Request samples

Content type
application/json
{
  • "pages": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Импорт сайта

Принимает JSON или multipart-файл с JSON.

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Экспорт сайта

category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Импорт шаблона

Принимает JSON или multipart-файл с JSON.

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Экспорт шаблона

category
string
css
string
deleted
boolean
description
string
fields
string
html
string
is_shared
boolean
js
string
name
string
title
string
values
string

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "css": "string",
  • "deleted": true,
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "is_shared": true,
  • "js": "string",
  • "name": "string",
  • "title": "string",
  • "values": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Импорт всех шаблонов сайта

Принимает JSON или multipart-файл с JSON.

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Экспорт шаблонов

Array of objects (dto.TemplateExport)

Responses

Response Schema: application/json
message
string

Request samples

Content type
application/json
{
  • "templates": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Импорт общих шаблонов

Принимает JSON или multipart-файл с JSON.

Authorizations:
BearerAuth
Request Body schema: application/json
required

Экспорт шаблонов

Array of objects (dto.TemplateExport)

Responses

Response Schema: application/json
message
string

Request samples

Content type
application/json
{
  • "templates": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Импорт файлов (ZIP)

multipart, поле file — zip-архив (manifest.json + files.zip).

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: multipart/form-data
required
file
required
string <binary>

ZIP-архив

Responses

Response Schema: application/json
message
string

Response samples

Content type
application/json
{
  • "message": "string"
}

common

Состояние API

Используется также как ответ на все несуществующие /api/* пути.

Responses

Response Schema: application/json
service
string
status
string
timestamp
integer

Response samples

Content type
application/json
{
  • "service": "string",
  • "status": "string",
  • "timestamp": 0
}

Sitemap сайта

Публичный роут на корне сервера: /sitemap.xml (вне /api/v1). Сайт резолвится из x-host/x-forwarded-host.

header Parameters
x-site-uuid
string

UUID сайта (или x-host)

Responses

Response Schema: text/xml
string

image

Удаление изображения

Authorizations:
BearerAuth
query Parameters
uuid
required
string

UUID изображения

Responses

Скачивание изображения по uuid/имени

Authorizations:
BearerAuth
query Parameters
uuid
string

UUID изображения

name
string

Имя изображения

Responses

Обновление метаданных изображения

Authorizations:
BearerAuth
Request Body schema: application/json
required

Метаданные изображения

uuid
required
string
category
string
description
string
tags
Array of strings
url
string

Responses

Response Schema: application/json
category
string
content_type
string
description
string
name
string
size
integer
tags
Array of strings
url
string
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "description": "string",
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "content_type": "string",
  • "description": "string",
  • "name": "string",
  • "size": 0,
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Список изображений

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

category
string

Категория (default image)

updated_at
string

Фильтр «обновлено не раньше» (RFC3339)

tags
string

Теги через запятую

header Parameters
x-site-uuid
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.ImageResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Загрузка изображений

Поле file — основное изображение (регистрируется в БД, возвращается в ответе). Поле images[] — дополнительные файлы (сохраняются на диск без записи в БД).

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

Основное изображение

images[]
string <binary>

Дополнительные изображения

description
string

Описание

category
string

Категория

url
string

URL

Responses

Response Schema: application/json
category
string
content_type
string
description
string
name
string
size
integer
tags
Array of strings
url
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "content_type": "string",
  • "description": "string",
  • "name": "string",
  • "size": 0,
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Теги изображений

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]

Отдача изображения по URL (статик)

Публичный роут на корне сервера: /image/{imagePath} (вне /api/v1). Сайт резолвится из заголовков.

path Parameters
imagePath
required
string

Путь к изображению, включая ведущий слеш

header Parameters
x-site-uuid
string

UUID сайта (или x-host)

Responses

interaction

Список обращений

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

status
string

Фильтр по статусу

type
string

Фильтр по типу

session_id
string

Фильтр по session_id

client_id
integer

Фильтр по клиенту (ID)

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.InteractionResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Создание обращения

Публичный эндпоинт для форм на сайте. multipart/form-data.

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: multipart/form-data
type
string

Тип обращения

name
string

Имя (контакт)

fio
string

ФИО (контакт)

email
string

Email (контакт)

mail
string

Почта (контакт)

phone
string

Телефон (контакт)

tel
string

Телефон (контакт)

my_url
string

Honeypot — оставить пустым

files
string <binary>

Прикреплённые файлы (до 5)

Responses

Response Schema: application/json
client_id
integer
contact_data
string
created_at
string
id
integer
payload
string
session_id
string
status
string
type
string
updated_at
string

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "contact_data": "string",
  • "created_at": "string",
  • "id": 0,
  • "payload": "string",
  • "session_id": "string",
  • "status": "string",
  • "type": "string",
  • "updated_at": "string"
}

Обновление обращения

Authorizations:
BearerAuth
path Parameters
id
required
integer

ID обращения

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Обновляемые поля

client_id
integer
contact_data
string
payload
string
status
string

Responses

Response Schema: application/json
client_id
integer
contact_data
string
created_at
string
id
integer
payload
string
session_id
string
status
string
type
string
updated_at
string

Request samples

Content type
application/json
{
  • "client_id": 0,
  • "contact_data": "string",
  • "payload": "string",
  • "status": "string"
}

Response samples

Content type
application/json
{
  • "client_id": 0,
  • "contact_data": "string",
  • "created_at": "string",
  • "id": 0,
  • "payload": "string",
  • "session_id": "string",
  • "status": "string",
  • "type": "string",
  • "updated_at": "string"
}

Последние обращения

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
client_id
integer
contact_data
string
created_at
string
id
integer
payload
string
session_id
string
status
string
type
string
updated_at
string

Response samples

Content type
application/json
[
  • {
    }
]

Теги обращений

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]

page

Страница по имени

query Parameters
parent_id
required
integer

ID родительской страницы

name
required
string

Имя страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Создание страницы

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные страницы

children
integer
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
use_html
boolean

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Request samples

Content type
application/json
{
  • "children": 0,
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "use_html": true
}

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Полное обновление страницы

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные страницы

children
integer
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
use_html
boolean

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Request samples

Content type
application/json
{
  • "children": 0,
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "use_html": true
}

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Удаление страницы

С query-параметром force — жёсткое удаление, иначе мягкое.

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

query Parameters
force
boolean

Жёсткое удаление

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Страница по ID

path Parameters
pageID
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Частичное обновление страницы

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Обновляемые поля

data
string
data_preview
string
fields
string
header
string
html
string
icon
string
img
string
menu
string
meta
string
pinned
integer
published
boolean
show_children
integer
tags
Array of strings
template
string
title
string
use_html
boolean

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Request samples

Content type
application/json
{
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "use_html": true
}

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Предки страницы

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
header
string
icon
string
id
integer
menu
string
name
string
parent_id
integer

Response samples

Content type
application/json
[
  • {
    }
]

Дочерние страницы

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
header
string
icon
string
id
integer
menu
string
name
string
parent_id
integer

Response samples

Content type
application/json
[
  • {
    }
]

Родительская страница

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Смена родителя страницы

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

parentID
required
integer

Новый ID родителя

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Смена позиции страницы

Authorizations:
BearerAuth
path Parameters
pageID
required
integer

ID страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

ID элемента, после которого вставить

after_id
integer

Responses

Response Schema: application/json
children
integer
created_at
string
data
string
data_preview
string
fields
string
header
string
html
string
icon
string
id
integer
img
string
menu
string
meta
string
name
string
parent_id
integer
pinned
integer
published
boolean
show_children
integer
sort
integer
tags
Array of strings
template
string
title
string
updated_at
string
use_html
boolean

Request samples

Content type
application/json
{
  • "after_id": 0
}

Response samples

Content type
application/json
{
  • "children": 0,
  • "created_at": "string",
  • "data": "string",
  • "data_preview": "string",
  • "fields": "string",
  • "header": "string",
  • "html": "string",
  • "icon": "string",
  • "id": 0,
  • "img": "string",
  • "menu": "string",
  • "meta": "string",
  • "name": "string",
  • "parent_id": 0,
  • "pinned": 0,
  • "published": true,
  • "show_children": 0,
  • "sort": 0,
  • "tags": [
    ],
  • "template": "string",
  • "title": "string",
  • "updated_at": "string",
  • "use_html": true
}

Проверка существования страницы

Принимает path (URL-путь) или name + parent_id.

query Parameters
path
string

URL-путь страницы

name
string

Имя страницы

parent_id
integer

ID родительской страницы

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
exists
boolean

Response samples

Content type
application/json
{
  • "exists": true
}

Список страниц по родителю

Роут без parentID (GET /api/v1/pages) нерабочий — всегда 400.

path Parameters
parentID
required
integer

ID родительской страницы (0 — корень)

query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

updated_at
string

Фильтр «обновлено не раньше» (RFC3339)

tags
string

Теги через запятую

header Parameters
x-site-uuid
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.PageResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Теги страниц

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]

site

Удаление сайта (мягкое)

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID текущего сайта (или x-host)

Responses

Частичное обновление сайта

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID текущего сайта (или x-host)

Request Body schema: application/json
required

Обновляемые поля

category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Создание сайта

Authorizations:
BearerAuth
Request Body schema: application/json
required

Данные сайта

category
string
data
string
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Полное обновление сайта

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID текущего сайта (или x-host)

Request Body schema: application/json
required

Данные сайта

category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Сайт по домену/имени

Если domain содержит точку — поиск по домену, иначе по имени сайта.

path Parameters
domain
required
string

Домен или имя сайта

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

HTML-шаблон сайта

Инициализирует guest-сессию. Сайт резолвится из заголовков x-site-uuid/x-host (параметр domain в коде не используется).

path Parameters
domain
required
string

Домен сайта

header Parameters
x-site-uuid
string

UUID сайта (альтернатива x-host)

Responses

Response Schema: application/json
category
string
data
string
deleted
boolean
domain
string
fields
string
html
string
meta
string
name
string
settings
string
theme
string
title
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "data": "string",
  • "deleted": true,
  • "domain": "string",
  • "fields": "string",
  • "html": "string",
  • "meta": "string",
  • "name": "string",
  • "settings": "string",
  • "theme": "string",
  • "title": "string",
  • "uuid": "string"
}

Восстановление сайта

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID текущего сайта (или x-host)

Responses

Список сайтов пользователя

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

updated_at
string

Фильтр «обновлено не раньше» (RFC3339)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.SiteResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

statistic

Статистика по сайтам

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.SiteStatistic)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

telegram

Профиль по telegram_id

Authorizations:
TgServiceKey
path Parameters
id
required
integer

Telegram ID пользователя

Responses

Response Schema: application/json
telegram_id
integer
user_id
string

Response samples

Content type
application/json
{
  • "telegram_id": 0,
  • "user_id": "string"
}

Вход через Telegram

Authorizations:
TgServiceKey
Request Body schema: application/json
required

Данные для входа

api_key
string
telegram_id
integer

Responses

Response Schema: application/json
short_auth_url
string
success
boolean
user_id
string
uuid
string

Request samples

Content type
application/json
{
  • "api_key": "string",
  • "telegram_id": 0
}

Response samples

Content type
application/json
{
  • "short_auth_url": "string",
  • "success": true,
  • "user_id": "string",
  • "uuid": "string"
}

Регистрация через Telegram

201 при создании, 200 при существующем пользователе (user_exists: true).

Authorizations:
TgServiceKey
Request Body schema: application/json
required

Данные пользователя Telegram

api_key
string
first_name
string
language_code
string
last_name
string
telegram_id
integer
username
string

Responses

Response Schema: application/json
short_auth_url
string
success
boolean
user_exists
boolean
user_id
string
uuid
string
Response Schema: application/json
short_auth_url
string
success
boolean
user_exists
boolean
user_id
string
uuid
string

Request samples

Content type
application/json
{
  • "api_key": "string",
  • "first_name": "string",
  • "language_code": "string",
  • "last_name": "string",
  • "telegram_id": 0,
  • "username": "string"
}

Response samples

Content type
application/json
{
  • "short_auth_url": "string",
  • "success": true,
  • "user_exists": true,
  • "user_id": "string",
  • "uuid": "string"
}

template

Шаблон по имени

Authorizations:
BearerAuth
query Parameters
name
required
string

Имя шаблона

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Создание шаблона

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные шаблона

category
string
css
string
description
string
fields
string
html
string
js
string
name
string
title
string
values
string

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "js": "string",
  • "name": "string",
  • "title": "string",
  • "values": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Полное обновление шаблона

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Данные шаблона

category
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
title
string
values
string

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "title": "string",
  • "values": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Удаление шаблона

Authorizations:
BearerAuth
path Parameters
id
required
integer

ID шаблона

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
status
string

Response samples

Content type
application/json
{
  • "status": "string"
}

Шаблон по ID

Authorizations:
BearerAuth
path Parameters
id
required
integer

ID шаблона

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Частичное обновление шаблона

Authorizations:
BearerAuth
path Parameters
id
required
integer

ID шаблона

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

Обновляемые поля

category
string
css
string
description
string
fields
string
html
string
js
string
name
string
title
string
values
string

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "js": "string",
  • "name": "string",
  • "title": "string",
  • "values": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Смена позиции шаблона

Authorizations:
BearerAuth
path Parameters
id
required
integer

ID шаблона

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Request Body schema: application/json
required

ID шаблона, после которого вставить

after_id
integer

Responses

Response Schema: application/json
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Request samples

Content type
application/json
{
  • "after_id": 0
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "string",
  • "css": "string",
  • "description": "string",
  • "fields": "string",
  • "html": "string",
  • "id": 0,
  • "js": "string",
  • "name": "string",
  • "sort": 0,
  • "title": "string",
  • "updated_at": "string",
  • "values": "string"
}

Список шаблонов сайта

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

updated_at
string

Фильтр «обновлено не раньше» (RFC3339)

header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.TemplateResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Шаблоны сайта на дату

Сайт резолвится по домену из пути domain. Если domain = SHARED, возвращаются общие шаблоны (как GET /templates/shared/{at}).

path Parameters
domain
required
string

Домен сайта

at
required
string

Дата (RFC3339)

Responses

Response Schema: application/json
Array
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Response samples

Content type
application/json
[
  • {
    }
]

Общие шаблоны (все)

Authorizations:
BearerAuth

Responses

Response Schema: application/json
Array
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Response samples

Content type
application/json
[
  • {
    }
]

Общие шаблоны на дату

path Parameters
at
required
string

Дата (RFC3339)

Responses

Response Schema: application/json
Array
category
string
created_at
string
css
string
description
string
fields
string
html
string
id
integer
js
string
name
string
sort
integer
title
string
updated_at
string
values
string

Response samples

Content type
application/json
[
  • {
    }
]

upload

Удаление файла

Authorizations:
BearerAuth
query Parameters
uuid
required
string

UUID файла

Responses

Скачивание файла по uuid/имени

Authorizations:
BearerAuth
query Parameters
uuid
string

UUID файла

name
string

Имя файла

Responses

Загрузка файла

Один и тот же обработчик обслуживает три маршрута:

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

Файл

description
string

Описание

category
string

Категория

url
string

URL файла

Responses

Response Schema: application/json
category
string
content_type
string
description
string
name
string
size
integer
tags
Array of strings
url
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "content_type": "string",
  • "description": "string",
  • "name": "string",
  • "size": 0,
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Обновление метаданных файла

Authorizations:
BearerAuth
Request Body schema: application/json
required

Метаданные файла

uuid
required
string
category
string
description
string
tags
Array of strings
url
string

Responses

Response Schema: application/json
category
string
content_type
string
description
string
name
string
size
integer
tags
Array of strings
url
string
uuid
string

Request samples

Content type
application/json
{
  • "category": "string",
  • "description": "string",
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "content_type": "string",
  • "description": "string",
  • "name": "string",
  • "size": 0,
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Загрузка файла

Один и тот же обработчик обслуживает три маршрута:

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

Файл

description
string

Описание

category
string

Категория

url
string

URL файла

Responses

Response Schema: application/json
category
string
content_type
string
description
string
name
string
size
integer
tags
Array of strings
url
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "content_type": "string",
  • "description": "string",
  • "name": "string",
  • "size": 0,
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Загрузка файла

Один и тот же обработчик обслуживает три маршрута:

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

Файл

description
string

Описание

category
string

Категория

url
string

URL файла

Responses

Response Schema: application/json
category
string
content_type
string
description
string
name
string
size
integer
tags
Array of strings
url
string
uuid
string

Response samples

Content type
application/json
{
  • "category": "string",
  • "content_type": "string",
  • "description": "string",
  • "name": "string",
  • "size": 0,
  • "tags": [
    ],
  • "url": "string",
  • "uuid": "string"
}

Список файлов сайта

Authorizations:
BearerAuth
query Parameters
page
integer

Номер страницы (default 1)

size
integer

Размер страницы (default 10, max 1000)

updated_at
string

Фильтр «обновлено не раньше» (RFC3339)

tags
string

Теги через запятую

header Parameters
x-site-uuid
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
object (dto.Pagination)
Array of objects (dto.UploadResponse)

Response samples

Content type
application/json
{
  • "pagination": {
    },
  • "rows": [
    ]
}

Теги файлов

Authorizations:
BearerAuth
header Parameters
x-site-uuid
required
string

UUID сайта (или x-host)

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]

Скачивание файла по URL (статик)

Публичный роут на корне сервера: /upload/{uploadPath} (вне /api/v1). Сайт резолвится из заголовков.

path Parameters
uploadPath
required
string

Путь к файлу, включая ведущий слеш (например /style.css)

header Parameters
x-site-uuid
string

UUID сайта (или x-host)

Responses

url

Оригинальная ссылка по коду

Возвращает JSON {"URL": "..."}, а не редирект. Код вида short.long. Для кода без точки возможен 500 (panic).

path Parameters
code
required
string

Короткий код

Responses

Response Schema: application/json
URL
string

Response samples

Content type
application/json
{
  • "URL": "string"
}

Теги коротких ссылок

Authorizations:
BearerAuth

Responses

Response Schema: application/json
Array
string

Response samples

Content type
application/json
[
  • "string"
]