Avatars
List, read, create, edit and delete the avatars of your account.
An avatar is the virtual agent that talks to your customers. Every account has a main avatar and can have more, each with its own name, picture, instructions, AI model and knowledge bases. Each extra avatar has a sub slug, a short unique name you use to pick it in Create a conversation and Send a message.
With these calls you keep avatars in sync with your own system, for example creating one avatar per store or per product line.
List avatars
Returns all avatars of the account with the knowledge bases linked to each one. The main avatar comes first, with no sub slug.
ReferenceTechnical details
POST /api/externalAPIs/public/tolkyReasoning/avatars/list
Authentication: host token.
| Parameter | Type | Required | Description |
|---|---|---|---|
host_slug | string | Yes | Slug of your account. Without it, the call returns data.message = host_slug required. |
noCache | boolean | No | true skips the 60-second cache. |
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/avatars/list" \
-H "Authorization: Bearer $TOLKY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "host_slug": "your-host-slug" }'{
"code": 200,
"message": "OK",
"data": {
"avatarsAdminList": {
"host": {
"host_id": "<your-host-id>",
"host_slug": "your-host-slug",
"host_name": "Your Company",
"host_config": { "max_chunks": 3, "chunk_size_limit": 400 }
},
"avatars": [
{
"avatar_id": "0d4e8f2a-...",
"sub_slug": null,
"avatarPicture": "https://example.com/avatar.png",
"hostPicture": "https://example.com/logo.png",
"datasets": [
{ "dataset_id": "6c1f3b9d-...", "dataset_name": "Products", "expires": null }
]
}
]
}
}
}Expired knowledge bases are not listed.
Read an avatar
Returns the full settings of one avatar: instructions, model, advanced configuration and every knowledge base it uses, including the account-wide ones.
ReferenceTechnical details
POST /api/externalAPIs/public/tolkyReasoning/avatars/getAvatarInfo
Authentication: host token.
| Parameter | Type | Required | Description |
|---|---|---|---|
host_id | string (UUID) | Yes | Your account ID. |
avatar_id | string (UUID) | Yes | Avatar to read. |
no_cache | boolean | No | true skips the 30-minute cache. |
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/avatars/getAvatarInfo" \
-H "Authorization: Bearer $TOLKY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "host_id": "<your-host-id>", "avatar_id": "0d4e8f2a-..." }'| Field | Description |
|---|---|
avatar | avatarId, hostId, avatarName, avatarPicture, subSlug, promptEnvelop (instructions), model, llm_model_id, llm_provider_id, reasoningEffort, defaultMessage, restriction, maxTokens, maxChunks, disableVoice, avatarStartCommands, profileVideo, createdAt, updatedAt. |
config | Advanced settings (textOrVoice, crono, formFlow, departments, advisor, tickets). global is true when they are the account-wide settings. null when there are none. |
datasets | Knowledge bases in use: datasetId, datasetName, expires, createdAt, isGlobal (true for account-wide ones). |
400 when host_id or avatar_id is missing.
Create an avatar
ReferenceTechnical details
POST /api/externalAPIs/public/tolkyReasoning/avatars/create
Authentication: host token.
| Parameter | Type | Required | Description |
|---|---|---|---|
host_id | string (UUID) | Yes | Your account ID. |
sub_slug | string | Yes | Unique short name of the avatar. Must not exist anywhere in Tolky, otherwise 409. |
avatar_picture | string | Yes | Picture URL. |
avatar_name | string | No | Display name. |
prompt_envelop | string | No | The avatar's instructions: role, tone, what it can and cannot do. |
model | string | No | AI model name, as returned by List models. An unknown name returns 400 with the available list. |
llm_model_id, llm_provider_id | number | No | Model and provider IDs, instead of model. Send both or neither. |
datasets | array of UUID | No | Knowledge bases to link to the avatar. |
Without a model, the avatar is created with no model set.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/avatars/create" \
-H "Authorization: Bearer $TOLKY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"host_id": "<your-host-id>",
"sub_slug": "store-curitiba",
"avatar_picture": "https://example.com/avatar.png",
"avatar_name": "Curitiba Store",
"prompt_envelop": "You are the assistant of our Curitiba store. Answer in a friendly tone.",
"datasets": ["6c1f3b9d-..."]
}'{
"code": 200,
"message": "OK",
"data": {
"avatar_id": "2e7c5a1f-...",
"sub_slug": "store-curitiba",
"avatar_name": "Curitiba Store",
"avatar_picture": "https://example.com/avatar.png",
"prompt_envelop": "You are the assistant of our Curitiba store. Answer in a friendly tone.",
"llm_model_id": null,
"llm_provider_id": null,
"model": null,
"provider": null
}
}Edit an avatar
Only the fields you send change. The sub slug cannot be changed.
ReferenceTechnical details
POST /api/externalAPIs/public/tolkyReasoning/avatars/edit
Authentication: host token.
| Parameter | Type | Required | Description |
|---|---|---|---|
avatar_id | string (UUID) | Yes | Avatar to edit. |
host_id | string (UUID) | Yes | Your account ID. The avatar must belong to it, otherwise 404. |
avatar_name | string | No | New name. |
avatar_picture | string | No | New picture URL. |
prompt_envelop | string | No | New instructions. |
model | string | No | New model name. |
llm_model_id, llm_provider_id | number | No | New model by IDs. Send both. |
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/avatars/edit" \
-H "Authorization: Bearer $TOLKY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "avatar_id": "2e7c5a1f-...", "host_id": "<your-host-id>", "avatar_name": "Curitiba Downtown" }'The response has the same fields as create.
Delete an avatar
The avatar is marked as deleted and leaves the lists. Its conversations stay in the account.
ReferenceTechnical details
DELETE /api/externalAPIs/public/tolkyReasoning/avatars/delete/{avatarId}
Authentication: host token (required; other tokens get 400).
curl -X DELETE "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/avatars/delete/2e7c5a1f-..." \
-H "Authorization: Bearer $TOLKY_TOKEN"{ "code": 200, "message": "Avatar deleted successfully", "data": {} }An avatar that does not exist or was already deleted also returns 200, with message = Avatar <id> not found or already deleted.
Errors
ErrorsTechnical details
| Status | When |
|---|---|
400 | A required field is missing, the model is unknown, or only one of llm_model_id and llm_provider_id was sent. |
404 | The avatar does not belong to your account (edit). |
408 | The request took more than 60 seconds (list, read, delete). |
409 | The sub slug already exists (create). |
500 | Internal error. |