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
Configure it
Operate it
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
hostId | string (UUID) | Yes | Account 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.
| Status | When |
|---|---|
400 | hostId is missing or not a UUID. |
401 | The token is missing or invalid. |
403 | The token is not a domain token, or the account is not in your domain. |
404 | The account has no active token. |
503 | The 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_name | string | Yes | Account name. |
host_slug | string | Yes | Short unique name. It is normalized: lowercase, spaces become _, other characters outside a-z 0-9 _ - are removed. |
email | string | Yes | Contact e-mail. It is normalized; fixes are reported in validation_warnings. |
host_picture | string | No | Logo URL. An invalid URL returns 400. |
host_description | string | No | Description. |
host_quick_text | string | No | Short text. |
host_start_commands | array | No | Start suggestions. Fixes are reported in validation_warnings. |
host_interests_tags | array of string | No | Interest 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted | boolean | No | true 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.