К содержанию
TelegaFirst

Для AI-агентов: markdown этой страницы — /docs/api-op-getuser.mdиндекс документации — /llms.txt

getUser

Обновлено

GET /api/v1/users/{id}

Read a tenant user and permitted relation projections

Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

ПолеЗначение
security.0.hubApiKey[]
security.1.hubBearer[]
securitySchemes.hubApiKey.in"header"
securitySchemes.hubApiKey.name"X-Api-Key"
securitySchemes.hubApiKey.type"apiKey"
securitySchemes.hubBearer.scheme"bearer"
securitySchemes.hubBearer.type"http"
x-required-scopes["pull:users"]

Параметры запроса

ПолеЗначение
0.in"path"
0.name"id"
0.requiredtrue
0.schema0.schema
1.description"orders,subscription,bookings,registrations,invite_links (one level, comma-separated)"
1.in"query"
1.name"include"
1.requiredfalse
1.schema1.schema
2.description"registrations_next_cursor of an earlier read; continues include=registrations"
2.in"query"
2.name"registrations_cursor"
2.requiredfalse
2.schema2.schema

Тело запроса

ПолеЗначение
Тело запросаnull

Ответы

ПолеЗначение
200.content.application/json.schemaUserDetail
200.description"User with optional tenant-scoped order, subscription, booking and registration views"
200.headers.X-Bot-Username.description"Active bot public username, when API-key metadata contains it."
200.headers.X-Bot-Username.schema200.headers.X-Bot-Username.schema
200.headers.X-Client-Slug.description"Active tenant public slug, when API-key metadata contains it."
200.headers.X-Client-Slug.schema200.headers.X-Client-Slug.schema
200.headers.X-RateLimit-Limit.description"Effective rate budget; fallback 120 without a per-key or request decision."
200.headers.X-RateLimit-Limit.schema200.headers.X-RateLimit-Limit.schema
200.headers.X-RateLimit-Remaining.description"Nonnegative remaining count or unknown when no rate-limit decision is attached."
200.headers.X-RateLimit-Remaining.schema200.headers.X-RateLimit-Remaining.schema
200.headers.X-RateLimit-Reset.description"Rate window reset as a Unix timestamp in seconds."
200.headers.X-RateLimit-Reset.schema200.headers.X-RateLimit-Reset.schema

Ошибки

ПолеЗначение
400.content.application/problem+json.schemaProblemDetails
400.description"Invalid positive-int4 address, include or registrations_cursor"
400.x-error-codes["VALIDATION_ERROR","INVALID_REQUEST","INVALID_CURSOR"]
401.content.application/problem+json.schemaProblemDetails
401.description"Missing or invalid API credential/JWT"
401.x-error-codes["UNAUTHORIZED","INVALID_API_KEY","EXPIRED_JWT","INVALID_REFRESH_TOKEN"]
403.content.application/problem+json.schemaProblemDetails
403.description"Missing scope, paid plan window, unsupported publishable key or no active business"
403.x-error-codes["INSUFFICIENT_SCOPE","PLAN_UPGRADE_REQUIRED","PUBLISHABLE_KEY_NOT_ALLOWED","NO_ACTIVE_BOT"]
404.content.application/problem+json.schemaProblemDetails
404.description"User id was not found in the selected tenant"
404.x-error-codes["NOT_FOUND"]
413.content.application/problem+json.schemaProblemDetails
413.description"Per-tool request size or item count cap exceeded"
413.x-error-codes["PAYLOAD_TOO_LARGE","ITEM_COUNT_EXCEEDED"]
429.content.application/problem+json.schemaProblemDetails
429.description"Resource policy rate limit exceeded or subsystem unavailable"
429.headers.Retry-After.description"Retry delay in seconds when provided by the resource policy decision"
429.headers.Retry-After.schema429.headers.Retry-After.schema
429.x-error-codes["RATE_LIMIT_EXCEEDED","RATE_LIMIT_UNAVAILABLE"]

Дополнительные условия

ПолеЗначение
description"Resolves the tenant user by its per-tenant id, never a platform PK. The card is the same one the list and MCP get_customer publish (ADR-375): contacts, statuses, tags, counters, partner_id (partner program) and inviter_id (referral program) as tenant ids, marketing_consent, topic_url and invite_code. channel_user_id is the messenger-native id as a string, qualified by channel. ApiKeyOrJwtGuard accepts X-Api-Key, Bearer tgf_* or a verified surface JWT. ScopeGuard still requires pull:users: a scope-free surface JWT authenticates then fails 403. This does not assert owner OAuth/MCP parity. include accepts orders,subscription,bookings,registrations,invite_links, comma-separated at one level; omitted includes are absent. invite_links mints the user’s invite code for the home page on the first ask and returns the same code after. bookings (all of this user’s, newest first) and registrations (100 at a time, newest first) are the Booking and EventRegistration views; pass registrations_next_cursor back as registrations_cursor for the next 100, under the same pull:users scope. No ETag conditional response or Idempotency-Key requirement."
operationId"getUser"
summary"Read a tenant user and permitted relation projections"
tags["users"]