The assistant

.md

Who the assistant is in this environment, and whether you can ask it something now.

Scopesai:read
GET/v1/me/ai

What a chat screen needs before the first question: the assistant's name and picture, which chat this token talks to, and whether asking would work right now. Ask for it when the screen opens rather than finding out by being refused.

It answers also when the assistant is switched off, with available false, so an app can hide the screen instead of showing an error.

Request

curl https://api.proppertrading.com/v1/me/ai \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f"

Response

{
    "data": {
        "object": "ai_assistant",
        "name": "AI",
        "avatar_url": "https://dashboard.proppertrading.com/storage/tenants/1/ai/avatar/135297a607cf5c411515c94926045d98.webp",
        "personality": "friendly",
        "surface": "trader_chat",
        "available": true,
        "blocked": null,
        "usage": null
    },
    "meta": {
        "request_id": "req_01m5gn4ewh5wntrvv6wrjs8yrz"
    }
}
FieldDescription
nameWhat the firm called its assistant. Use it in the chat
avatar_urlIts picture, on the firm's own host. null for none
personalityprofessional, casual, friendly or custom, the tone the firm picked. For display only
surfacetrader_chat or team_chat. See which assistant
availableWhether a question asked now would be taken
blockedWhen it would not: code, message, state and resets_at, the same as the error asking would answer with. null otherwise
usageFor a trader whose firm limits questions per day: limit, used today and resets_at. null when no limit applies

blocked.code is ai_unavailable (switched off here), ai_kyc_required (finish the identity check first) or ai_limit_reached (an allowance is used up, with state saying which and resets_at when it comes back). See Errors.

Errors

StatusCodeMeaning
400workspace_requiredOur own staff, without a firm in Propper-Workspace
403insufficient_scopeThis device does not hold ai:read
403forbiddenStaff whose role does not include use_ai_chat. The response names it in required_permission