Developers
ENPT

Partners

Manage the accounts of your domain with a domain token, create new accounts and list their team.

Partners manage several customer accounts (hosts) under one domain. With a domain token you can see every account in your domain, get the host token of each one, and create new accounts. See Authentication for the difference between the two tokens.

A typical setup flow:

Create the account

Create a host for your new customer. The response already carries its host token.

Configure it

With the host token, create avatars, a knowledge base and automations.

Operate it

Use the host token to send messages and read reports.

Keep domain tokens on your server only. Anyone with a domain token can reach every account of the domain.

List the accounts of your domain

ReferenceTechnical details

GET /api/externalAPIs/public/domainAccess/getAccessTokens

Authentication: domain token. No body.

curl "https://api.tolky.to/api/externalAPIs/public/domainAccess/getAccessTokens" \
  -H "Authorization: Bearer $TOLKY_DOMAIN_TOKEN"
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "host_id": "<your-host-id>",
      "host_slug": "store-curitiba",
      "created_at": "2026-10-02T12:00:00.000Z",
      "host_token": "..."
    }
  ],
  "error": null
}

Returns every account of the domain with its host token. The list is cached for up to 20 minutes, so a new account can take a while to appear: use "Get one account's token" in that case.

Get one account's token

ReferenceTechnical details

POST /api/externalAPIs/public/domainAccess/getHostToken

Authentication: domain token only. The account must belong to your domain. The response is never cached.

ParameterTypeRequiredDescription
hostIdstring (UUID)YesAccount whose token you want. host_id is also accepted.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/domainAccess/getHostToken" \
  -H "Authorization: Bearer $TOLKY_DOMAIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hostId": "<your-host-id>" }'
{
  "code": 200,
  "message": "OK",
  "data": {
    "host_id": "<your-host-id>",
    "host_slug": "store-curitiba",
    "source": "domain_access_data",
    "host_token": "..."
  }
}

Depending on the domain, source can have another value and the token comes in other fields instead of host_token.

StatusWhen
400hostId is missing or not a UUID.
401The token is missing or invalid.
403The token is not a domain token, or the account is not in your domain.
404The account has no active token.
503The token could not be checked right now. Try again.

Create an account

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/hosts/create

Authentication: domain token. The new account is created in the domain of the token.

ParameterTypeRequiredDescription
user_namestringYesAccount name.
host_slugstringYesShort unique name. It is normalized: lowercase, spaces become _, other characters outside a-z 0-9 _ - are removed.
emailstringYesContact e-mail. It is normalized; fixes are reported in validation_warnings.
host_picturestringNoLogo URL. An invalid URL returns 400.
host_descriptionstringNoDescription.
host_quick_textstringNoShort text.
host_start_commandsarrayNoStart suggestions. Fixes are reported in validation_warnings.
host_interests_tagsarray of stringNoInterest tags. Fixes are reported in validation_warnings.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/hosts/create" \
  -H "Authorization: Bearer $TOLKY_DOMAIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "user_name": "Curitiba Store",
    "host_slug": "store-curitiba",
    "email": "contact@example.com"
  }'
{
  "code": 200,
  "message": "OK",
  "data": {
    "id": "<your-host-id>",
    "user_name": "Curitiba Store",
    "host_slug": "store-curitiba",
    "email": "contact@example.com",
    "host_picture": null,
    "host_description": null,
    "host_quick_text": null,
    "domain_id": "a1b2c3d4-...",
    "host_token": "..."
  }
}

Save host_token: it is the token for every call on the new account. A slug that already exists returns an error.

List the team of an account

Returns the people who work in an account (agents, managers) with their role, status and the avatars they can access.

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/hosts/listPeople

Authentication: host token of the account.

ParameterTypeRequiredDescription
deletedbooleanNotrue also returns removed people.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/hosts/listPeople" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Returns an array. Each person has id, userId, userName, email, phone, role, platformRole, active, visible, deleted, availability, avatarAccessMode, accessProfileId, bannedUntil, lastTaskAssignedAt, createdAt, updatedAt, user (userFirstName, userName, email, phone) and avatarProfiles (profileName, subSlug).

400 when the token is not a host token.

Previous

Reports

Next

Messaging