Skip to content

What this token is

GET
/v1/me
curl --request GET \
--url https://api.tradecrafthub.ai/v1/me \
--header 'Authorization: Bearer <token>'

The organization (from the token), the principal (a member, or a machine client’s service principal), the client, the scopes and the rate-limit policy.

Any valid access token.

X-Request-Id
string

Your correlation id (8–128 of A–Z a–z 0–9 . _ : -); echoed back

The token

Media typeapplication/json
object
data
required
object
organization
required
object
id
required
string format: uuid
slug
required
string
name
required
string
principal
required
object
kind
required

Member = a person (user-delegated); service = a machine client’s service principal. Extensible: new values may be added — tolerate unknown ones.

string
Allowed values: member service
email
string
name
Any of:
string
roles
required
Array<string>
Allowed values: user reviewer approver admin
libraryIds
Array<string>
client
required
object
clientId
required
string
name
Any of:
string
scopes
required
Array<string>
Allowed values: assessments:read assessments:write questions:write assessments:review assessments:finalize knowledge:read knowledge:ask knowledge:gaps knowledge:propose review:read library:write documents:download audit:read
audience
required
string
rateLimits
object
perClientPerMin
integer
perTenantPerMin
integer
aiPerPrincipalPerMin
integer
uploadsPerTenantPerHour
integer

Example

{
"data": {
"principal": {
"kind": "member",
"roles": [
"user"
]
},
"scopes": [
"assessments:read"
]
}
}
X-Request-Id
string

Echoes a valid X-Request-Id, else generated

RateLimit-Limit
integer

Requests allowed in the tightest window

RateLimit-Remaining
integer

Requests left

RateLimit-Reset
integer

Seconds until the window resets

  • UNAUTHENTICATED — No valid session, API key or bearer token.

Missing, unknown, expired or revoked token, or a token for another resource (WWW-Authenticate: Bearer … names the resource metadata).

Media typeapplication/json
object
error
required
object
code
required

The error-code catalogue: VALIDATION_ERROR 400, UNAUTHENTICATED 401, SPEND_CAP_EXCEEDED 402, TENANT_AI_BUDGET_EXCEEDED 402, FORBIDDEN 403, NOT_FOUND 404, CONFLICT 409, GONE 410, ENDPOINT_REMOVED 410, PAYLOAD_TOO_LARGE 413, UNSUPPORTED_MEDIA_TYPE 415, RATE_LIMITED 429, INTERNAL 500, PROVIDER_ERROR 502, SERVICE_UNAVAILABLE 503, WEAK_PASSWORD 400, INVALID_TOKEN 400, EXPIRED_TOKEN 400, INVALID_CREDENTIALS 401, INVALID_CODE 401, SSO_REQUIRED 403, SLUG_TAKEN 409, LAST_ADMIN 409, MANAGED_BY_IDP 409, LOCKED 429, ASSET_KIND_NOT_ALLOWED 400, ASSET_SOURCE_NOT_ALLOWED 400, LIBRARY_ARCHIVED 409, MISSING_SCOPES 400, CLASSIC_TOKEN 400, INVALID_CREDENTIAL 400, CLOUD_ID_UNRESOLVED 400, SITE_NOT_FOUND 400, INTEGRATION_AUTH 409, INTEGRATION_NOT_CONNECTED 409, SITE_CHOICE_EXPIRED 409, PLATFORM_NOT_CONFIGURED 503, PLAN_LIMIT_REACHED 403, PLAN_FEATURE_UNAVAILABLE 403, TRIAL_EXPIRED 403, INSUFFICIENT_SCOPE 403, API_DISABLED 403, IDEMPOTENCY_CONFLICT 409. Extensible.

string
Allowed values: VALIDATION_ERROR UNAUTHENTICATED SPEND_CAP_EXCEEDED TENANT_AI_BUDGET_EXCEEDED FORBIDDEN NOT_FOUND CONFLICT GONE ENDPOINT_REMOVED PAYLOAD_TOO_LARGE UNSUPPORTED_MEDIA_TYPE RATE_LIMITED INTERNAL PROVIDER_ERROR SERVICE_UNAVAILABLE WEAK_PASSWORD INVALID_TOKEN EXPIRED_TOKEN INVALID_CREDENTIALS INVALID_CODE SSO_REQUIRED SLUG_TAKEN LAST_ADMIN MANAGED_BY_IDP LOCKED ASSET_KIND_NOT_ALLOWED ASSET_SOURCE_NOT_ALLOWED LIBRARY_ARCHIVED MISSING_SCOPES CLASSIC_TOKEN INVALID_CREDENTIAL CLOUD_ID_UNRESOLVED SITE_NOT_FOUND INTEGRATION_AUTH INTEGRATION_NOT_CONNECTED SITE_CHOICE_EXPIRED PLATFORM_NOT_CONFIGURED PLAN_LIMIT_REACHED PLAN_FEATURE_UNAVAILABLE TRIAL_EXPIRED INSUFFICIENT_SCOPE API_DISABLED IDEMPOTENCY_CONFLICT
message
required

Human-readable message

string
scope

INSUFFICIENT_SCOPE: the scope the operation needs

string
reason

FORBIDDEN: why (member_inactive, permission_missing, not_opted_in, user_only, role, …)

string
error
required
object
code
string
Allowed values: UNAUTHENTICATED

Examples

ExampleUNAUTHENTICATED

No valid session, API key or bearer token.

{
"error": {
"code": "UNAUTHENTICATED",
"message": "The access token is invalid, expired or revoked"
}
}
  • FORBIDDEN — Authenticated, but the role, object grant or policy does not allow this.
  • API_DISABLED — The organization has turned the API off (Admin → API → Settings); its clients and grants are kept.
  • PLAN_FEATURE_UNAVAILABLE — The organization’s plan does not include this feature (error.feature, plan).
Media typeapplication/json
object
error
required
object
code
required

The error-code catalogue: VALIDATION_ERROR 400, UNAUTHENTICATED 401, SPEND_CAP_EXCEEDED 402, TENANT_AI_BUDGET_EXCEEDED 402, FORBIDDEN 403, NOT_FOUND 404, CONFLICT 409, GONE 410, ENDPOINT_REMOVED 410, PAYLOAD_TOO_LARGE 413, UNSUPPORTED_MEDIA_TYPE 415, RATE_LIMITED 429, INTERNAL 500, PROVIDER_ERROR 502, SERVICE_UNAVAILABLE 503, WEAK_PASSWORD 400, INVALID_TOKEN 400, EXPIRED_TOKEN 400, INVALID_CREDENTIALS 401, INVALID_CODE 401, SSO_REQUIRED 403, SLUG_TAKEN 409, LAST_ADMIN 409, MANAGED_BY_IDP 409, LOCKED 429, ASSET_KIND_NOT_ALLOWED 400, ASSET_SOURCE_NOT_ALLOWED 400, LIBRARY_ARCHIVED 409, MISSING_SCOPES 400, CLASSIC_TOKEN 400, INVALID_CREDENTIAL 400, CLOUD_ID_UNRESOLVED 400, SITE_NOT_FOUND 400, INTEGRATION_AUTH 409, INTEGRATION_NOT_CONNECTED 409, SITE_CHOICE_EXPIRED 409, PLATFORM_NOT_CONFIGURED 503, PLAN_LIMIT_REACHED 403, PLAN_FEATURE_UNAVAILABLE 403, TRIAL_EXPIRED 403, INSUFFICIENT_SCOPE 403, API_DISABLED 403, IDEMPOTENCY_CONFLICT 409. Extensible.

string
Allowed values: VALIDATION_ERROR UNAUTHENTICATED SPEND_CAP_EXCEEDED TENANT_AI_BUDGET_EXCEEDED FORBIDDEN NOT_FOUND CONFLICT GONE ENDPOINT_REMOVED PAYLOAD_TOO_LARGE UNSUPPORTED_MEDIA_TYPE RATE_LIMITED INTERNAL PROVIDER_ERROR SERVICE_UNAVAILABLE WEAK_PASSWORD INVALID_TOKEN EXPIRED_TOKEN INVALID_CREDENTIALS INVALID_CODE SSO_REQUIRED SLUG_TAKEN LAST_ADMIN MANAGED_BY_IDP LOCKED ASSET_KIND_NOT_ALLOWED ASSET_SOURCE_NOT_ALLOWED LIBRARY_ARCHIVED MISSING_SCOPES CLASSIC_TOKEN INVALID_CREDENTIAL CLOUD_ID_UNRESOLVED SITE_NOT_FOUND INTEGRATION_AUTH INTEGRATION_NOT_CONNECTED SITE_CHOICE_EXPIRED PLATFORM_NOT_CONFIGURED PLAN_LIMIT_REACHED PLAN_FEATURE_UNAVAILABLE TRIAL_EXPIRED INSUFFICIENT_SCOPE API_DISABLED IDEMPOTENCY_CONFLICT
message
required

Human-readable message

string
scope

INSUFFICIENT_SCOPE: the scope the operation needs

string
reason

FORBIDDEN: why (member_inactive, permission_missing, not_opted_in, user_only, role, …)

string
error
required
object
code
string
Allowed values: FORBIDDEN API_DISABLED PLAN_FEATURE_UNAVAILABLE

Examples

Authenticated, but the role, object grant or policy does not allow this.

{
"error": {
"code": "FORBIDDEN",
"message": "Your current role can't do this",
"reason": "role"
}
}

Privacy preference center

When you visit tradecrafthub.ai, we store or read a small number of cookies in your browser. Strictly necessary cookies make the website and the Tradecraft app work. Analytics cookies are used only if you allow them. Open a category to learn more, and see our privacy policy for how we handle the information you enter on this site.

Manage consent preferences

  • Always active