Developers
ENPT

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.

ParameterTypeRequiredDescription
host_slugstringYesSlug of your account. Without it, the call returns data.message = host_slug required.
noCachebooleanNotrue 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.

ParameterTypeRequiredDescription
host_idstring (UUID)YesYour account ID.
avatar_idstring (UUID)YesAvatar to read.
no_cachebooleanNotrue 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-..." }'
FieldDescription
avataravatarId, hostId, avatarName, avatarPicture, subSlug, promptEnvelop (instructions), model, llm_model_id, llm_provider_id, reasoningEffort, defaultMessage, restriction, maxTokens, maxChunks, disableVoice, avatarStartCommands, profileVideo, createdAt, updatedAt.
configAdvanced settings (textOrVoice, crono, formFlow, departments, advisor, tickets). global is true when they are the account-wide settings. null when there are none.
datasetsKnowledge 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.

ParameterTypeRequiredDescription
host_idstring (UUID)YesYour account ID.
sub_slugstringYesUnique short name of the avatar. Must not exist anywhere in Tolky, otherwise 409.
avatar_picturestringYesPicture URL.
avatar_namestringNoDisplay name.
prompt_envelopstringNoThe avatar's instructions: role, tone, what it can and cannot do.
modelstringNoAI model name, as returned by List models. An unknown name returns 400 with the available list.
llm_model_id, llm_provider_idnumberNoModel and provider IDs, instead of model. Send both or neither.
datasetsarray of UUIDNoKnowledge 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.

ParameterTypeRequiredDescription
avatar_idstring (UUID)YesAvatar to edit.
host_idstring (UUID)YesYour account ID. The avatar must belong to it, otherwise 404.
avatar_namestringNoNew name.
avatar_picturestringNoNew picture URL.
prompt_envelopstringNoNew instructions.
modelstringNoNew model name.
llm_model_id, llm_provider_idnumberNoNew 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
StatusWhen
400A required field is missing, the model is unknown, or only one of llm_model_id and llm_provider_id was sent.
404The avatar does not belong to your account (edit).
408The request took more than 60 seconds (list, read, delete).
409The sub slug already exists (create).
500Internal error.

Previous

Leads

Next

Knowledge base