Skip to content

Client organizations

POSThttps://gptunnel.ru/api/v1/orgs/list

Returns the organizations the user currently owns, with the balance and registration details of each. To read the user’s personal balance, call balance/get with user_id.

Use the returned org_id for transfers, balance queries, spending reports, and refunds. Each endpoint documents its own permissions and requirements.

This read-only operation does not require an Idempotency-Key header.

Request headers

ParameterTypeDescription
Authorization*stringOrganization API key
Content-Type*stringapplication/json

Request parameters

ParameterTypeDescription
user_idstringClient user ID, 24 lowercase hexadecimal characters. Provide exactly one of user_id and user_data.
user_dataobjectLook up a user by phone: {"phone":"+79XXXXXXXXX"}. This feature requires separate activation.

Set GPTUNNEL_API_KEY and replace the placeholders with values for your organization.

import json
import os
from urllib.request import Request, urlopen
key = os.environ.get("GPTUNNEL_API_KEY")
if not key:
raise SystemExit("Set GPTUNNEL_API_KEY")
body = {
"user_id": "6ad72133269dc8d9f75a33bc"
}
request = Request(
"https://gptunnel.ru/api/v1/orgs/list",
method="POST",
headers={
"Authorization": key,
"Content-Type": "application/json",
},
data=json.dumps(body).encode("utf-8"),
)
with urlopen(request, timeout=30) as response:
print(json.load(response))

Response fields

ParameterTypeDescription
codenumber0 on success
user_idstringID user whose organizations are returned
orgsarrayUser organizations by date of creation, from old to new

Organization's fields on the list (orgs)

ParameterTypeDescription
org_idstringOrganization ID
namestringName
accountstring | nullOrganization account number
balancenumberThe balance in the rubles may be negative
credit_limitnumberCredit limit in rubles, 0 if not assigned
innstring | nullRussian taxpayer identification number (INN)
ogrnstring | nullRussian primary state registration number (OGRN)
spend_blockedbooleantrue – frozen account, prohibited write-offs (Balance/setSpendBlocked method)
created_atstringDate of establishment, ISO 8601
{
"code": 0,
"user_id": "6ad72133269dc8d9f75a33bc",
"orgs": [
{
"org_id": "6ad7a4f2269dc8d9f75a41d0",
"name": "ООО «Ромашка»",
"account": "ЛСО-10452",
"balance": 18250,
"credit_limit": 0,
"inn": "7701234567",
"ogrn": "1027700123456",
"spend_blocked": false,
"created_at": "2026-10-21T10:02:44.000Z"
}
]
}
HTTP code When
400 3 Specify the user with exactly one supported field. The request contains an extra field or an invalid ID, or does not identify exactly one user. An ID must contain exactly 24 characters from 0-9a-f. See details.
403 13 The key belongs to a personal account rather than an organization
403 27 Phone lookup with user_data is disabled for the organization.
403 36 This endpoint is not enabled for the organization that owns the key.
404 17 User not found, deleted or not a customer of partner

The API checks the key’s permissions before validating the request body. A key without access receives HTTP 403 even if the body is invalid.

See the Business API error reference for all error codes, including the 401 response for an invalid key.