GET
/v1/admin/meWhat this person may do in the environment the request acts in, what that firm has switched on, how far its setup is, and the counters on the navigation. One call, asked when the app starts and again when it comes back, so a role changed on the web shows on the phone without signing in again.
Works in a firm and in the platform alike. In the platform there are no features and no setup, and the counters are ours.
Request
curl https://api.proppertrading.com/v1/admin/me \
-H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
-H "Propper-Workspace: acme"
Response
{
"data": {
"object": "admin_profile",
"workspace": {
"id": "acme",
"name": "Acme Funded",
"platform": false
},
"access": "role",
"role": "Support",
"permissions": {
"manage_payouts": false,
"manage_tickets": true,
"view_mailbox": true,
"view_payouts": true,
"view_tickets": true,
"view_traders": true
},
"features": {
"affiliate": true,
"ai_enabled": true,
"copy_trading": false,
"journal": true
},
"ai": {
"enabled": true
},
"setup": {
"steps": [
{
"key": "branding",
"group": "required",
"permission": "manage_branding",
"manual": false,
"completed": true,
"skipped": false
},
{
"key": "email",
"group": "recommended",
"permission": "view_email",
"manual": true,
"completed": false,
"skipped": true
}
],
"required_total": 6,
"required_completed": 6,
"ready_for_live": true,
"is_live": true
},
"badges": {
"tickets": 6,
"mail": 1,
"approvals": null
}
},
"meta": { "request_id": "req_01m501dytnp5ez3jds9vd8hm59" }
}
The permissions above are shortened. The real answer has every permission
there is.
| Field | Description |
|---|---|
workspace | The environment this answer is about: a firm, or the platform with "id": "platform" and "platform": true |
access | Why this person may be here: propper for our own staff, owner for the account that owns the firm, role for staff with a role |
role | The name of the role, or null for an owner and for our own staff |
permissions | Every permission there is, each true or false for this person here. Already worked out: an owner holds everything, and a permission that implies another counts as both. A permission added later arrives as a new key, so treat one you do not know as false |
features | What the firm has switched on, each a boolean. Null in the platform. A key that is missing is off |
ai.enabled | Whether the firm's AI assistant is switched on for this kind of account. Always false in the platform |
setup | The firm's setup checklist, as the website shows it, or null in the platform. permission on a step is what it takes to complete it |
badges.tickets | Tickets a trader is waiting on, for somebody with view_tickets. Null in the platform |
badges.mail | Unread mail in the mailboxes this person may read. Null without view_mailbox, which means no badge rather than a badge saying nought |
badges.approvals | Paid deals waiting for Propper to approve. Only for our own staff in the platform, null everywhere else |
The badges are the same numbers the admin panel shows in its sidebar, from the same code, so the phone and the browser never disagree.
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_token | Not a token, or the secret does not match |
| 401 | revoked_token | Signed out here or from another device |
| 401 | expired_token | Ninety days without use, or a set expiry passed |
| 403 | admin_access_required | This account no longer helps run the environment |
| 403 | insufficient_scope | This device does not hold admin:read |
| 403 | workspace_not_permitted | The Propper-Workspace header names an environment this account cannot act in |