API: авторы, identity и persona
Автор, это человек, которого ваше агентство ведет в Telegram. У нее есть identity (кто она), persona (как она общается, на восьми страницах), а также ссылки на ее Telegram-аккаунты, AI Brain, Vault и скрипты. Эти эндпоинты соответствуют странице Creators в Console.
Endpoints #
| Method | Path | Description | Permission | Status |
|---|---|---|---|---|
| GET | /creators | Список авторов (status=active,paused,archived, q= поиск по имени) | can_setup или can_fan_read | Planned |
| POST | /creators | Создать автора (имя обязательно) | can_setup | Planned |
| GET | /creators/{id} | Один автор с прогрессом настройки | can_setup или can_fan_read | Planned |
| PATCH | /creators/{id} | Переименовать, изменить фото, часовой пояс или связанный brain | can_setup | Planned |
| POST | /creators/{id}/pause | Поставить на паузу: AI перестает отвечать во всех ее аккаунтах | can_setup | Planned |
| POST | /creators/{id}/resume | Возобновить работу автора с паузы | can_setup | Planned |
| DELETE | /creators/{id} | Архивировать (фанаты и продажи сохраняются) | can_setup | Planned |
| GET | /creators/{id}/identity | Карточка identity | can_setup | Planned |
| PUT | /creators/{id}/identity | Заменить карточку identity | can_setup | Planned |
| GET | /creators/{id}/persona | Восемь страниц persona и их заполненность | can_engine | Planned |
| PATCH | /creators/{id}/persona | Изменить одну или несколько страниц persona | can_engine | Planned |
| GET | /creators/{id}/setup | Карточка Setup: каждый шаг и его статус | can_setup | Planned |
The creator object #
{
"id": "cr_lea",
"name": "Lea",
"status": "active",
"photo_url": "https://cdn.lanachat.ai/w/7Hq2/cr_lea/photo.jpg",
"timezone": "Europe/Paris",
"brain_id": "br_lea_main",
"accounts": { "total": 3, "connected": 2 },
"setup": { "done": 5, "total": 7 },
"created_at": "2026-08-14T09:12:00Z",
"updated_at": "2026-10-05T18:40:11Z"
}
| Field | Type | Description |
|---|---|---|
id | string | Начинается с cr_ |
name | string | Имя в Console |
status | string | active, paused или archived |
photo_url | string or null | Фото автора |
timezone | string | IANA-таймзона, например Europe/Paris |
brain_id | string or null | Привязанный AI Brain |
accounts | object | Количество Telegram-аккаунтов: total, connected |
setup | object | Шаги карточки Setup: done из total |
created_at, updated_at | string | ISO 8601, UTC |
Поставленный на паузу автор сохраняет подключение аккаунтов, но AI не отвечает; уже запущенные скрипты остановятся на следующем шаге.
Creators #
List creators #
GET /creators · can_setup или can_fan_read
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | active, paused или archived; несколько через запятую |
q | string | No | Часть имени |
limit, cursor | number, string | No | Пагинация |
curl "https://api.lanachat.ai/v1/creators?status=active,paused" \
-H "Authorization: Bearer $LANACHAT_TOKEN"
{
"data": [
{ "id": "cr_lea", "name": "Lea", "status": "active", "photo_url": "https://cdn.lanachat.ai/w/7Hq2/cr_lea/photo.jpg", "timezone": "Europe/Paris", "brain_id": "br_lea_main", "accounts": { "total": 3, "connected": 2 }, "setup": { "done": 5, "total": 7 }, "created_at": "2026-08-14T09:12:00Z", "updated_at": "2026-10-05T18:40:11Z" },
{ "id": "cr_mia", "name": "Mia", "status": "paused", "photo_url": null, "timezone": "Europe/Rome", "brain_id": "br_mia_main", "accounts": { "total": 2, "connected": 2 }, "setup": { "done": 7, "total": 7 }, "created_at": "2026-07-02T11:00:00Z", "updated_at": "2026-10-01T08:15:00Z" }
],
"next_cursor": null
}
Create a creator #
POST /creators · can_setup
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Имя в Console |
timezone | string | No | IANA-таймзона |
curl -X POST https://api.lanachat.ai/v1/creators \
-H "Authorization: Bearer $LANACHAT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name": "Lea", "timezone": "Europe/Paris"}'
{
"id": "cr_lea",
"name": "Lea",
"status": "active",
"photo_url": null,
"timezone": "Europe/Paris",
"brain_id": null,
"accounts": { "total": 0, "connected": 0 },
"setup": { "done": 0, "total": 7 },
"created_at": "2026-10-06T14:00:00Z",
"updated_at": "2026-10-06T14:00:00Z"
}
Ответ, новый автор (201). Она начинается с пустыми identity и persona, без аккаунтов и brain: счетчик setup показывает, что осталось сделать, как и карточка Setup в Console. Если не указано name, ответ будет 400.
Get a creator #
GET /creators/{id} · can_setup или can_fan_read
curl https://api.lanachat.ai/v1/creators/cr_lea \
-H "Authorization: Bearer $LANACHAT_TOKEN"
Ответ, объект автора. Неизвестный id даст ответ 404.
Update a creator #
PATCH /creators/{id} · can_setup
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Новое имя |
timezone | string | No | IANA-таймзона |
brain_id | string or null | No | Привязать brain; null, отвязать |
curl -X PATCH https://api.lanachat.ai/v1/creators/cr_lea \
-H "Authorization: Bearer $LANACHAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"timezone": "Europe/Madrid", "brain_id": "br_lea_main"}'
Ответ, обновленный автор. Если brain_id из другого workspace, ответ будет 404.
Pause and resume #
POST /creators/{id}/pause и POST /creators/{id}/resume · can_setup
curl -X POST https://api.lanachat.ai/v1/creators/cr_lea/pause \
-H "Authorization: Bearer $LANACHAT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"
Пауза останавливает AI во всех ее аккаунтах сразу; resume включает обратно. Оба возвращают объект автора с новым статусом.
Archive a creator #
DELETE /creators/{id} · can_setup
curl -X DELETE https://api.lanachat.ai/v1/creators/cr_lea \
-H "Authorization: Bearer $LANACHAT_TOKEN"
Ответ, автор со статусом status: "archived". Ее фанаты и продажи сохраняются и продолжают учитываться в вашей статистике.
Identity #
Get the identity #
GET /creators/{id}/identity · can_setup
curl https://api.lanachat.ai/v1/creators/cr_lea/identity \
-H "Authorization: Bearer $LANACHAT_TOKEN"
Ответ содержит те же поля, что и identity ниже.
Replace the identity #
PUT /creators/{id}/identity · can_setup
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | No | Имя, как его знают фанаты |
nicknames | array of strings | No | Короткие имена, на которые она откликается |
date_of_birth | string | No | YYYY-MM-DD; автору должно быть 18 лет или больше |
nationality | string | No | Двубуквенный код страны, например FR |
languages | array of strings | No | Языки, на которых говорит, например ["fr", "en"] |
curl -X PUT https://api.lanachat.ai/v1/creators/cr_lea/identity \
-H "Authorization: Bearer $LANACHAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name": "Lea", "nicknames": ["Lele"], "date_of_birth": "2001-04-12", "nationality": "FR", "languages": ["fr", "en"]}'
{
"first_name": "Lea",
"nicknames": ["Lele"],
"date_of_birth": "2001-04-12",
"zodiac_sign": "aries",
"nationality": "FR",
"languages": ["fr", "en"]
}
zodiac_sign вычисляется по дате рождения. Если автору меньше 18 лет, будет отказ (400). PUT заменяет всю карточку: если поле не указано, оно очищается.
Persona #
Persona состоит из тех же восьми страниц, что и в Console: appearance, life, voice, mimic, personality, memory, boundaries, examples. Каждая страница, объект с текстовыми полями; PATCH меняет только переданные страницы.
Get the persona #
GET /creators/{id}/persona · can_engine
curl https://api.lanachat.ai/v1/creators/cr_lea/persona \
-H "Authorization: Bearer $LANACHAT_TOKEN"
Ответ содержит все восемь страниц, как ниже.
Change persona pages #
PATCH /creators/{id}/persona · can_engine
| Parameter | Type | Required | Description |
|---|---|---|---|
appearance, life, voice, mimic, personality, memory, boundaries, examples | object | At least one | Страницы для изменения; остальные сохраняются |
curl -X PATCH https://api.lanachat.ai/v1/creators/cr_lea/persona \
-H "Authorization: Bearer $LANACHAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"voice": {"style": "Short, warm, a few emojis, never formal.", "phrase_bank": [{"trigger": "Are you a bot?", "reply": "Haha no, just slow at typing"}]}}'
{
"complete_percent": 64,
"pages": {
"voice": { "style": "Short, warm, a few emojis, never formal.", "phrase_bank": [ { "trigger": "Are you a bot?", "reply": "Haha no, just slow at typing" } ], "complete": true },
"mimic": { "enabled": false, "lines": [], "complete": false }
},
"reply_language": "fr"
}
Совет Persona влияет на все brain, связанные с автором. Меняйте ее в спокойное время, затем проверьте brain в Playground до пиковых часов.
Setup progress #
Get the Setup card #
GET /creators/{id}/setup · can_setup
curl https://api.lanachat.ai/v1/creators/cr_lea/setup \
-H "Authorization: Bearer $LANACHAT_TOKEN"
Ответ показывает каждый шаг карточки Setup в Console и его статус. setup в объекте автора, это тот же прогресс в виде счетчика (done из total).