Skip to content

One library

GET
/v1/libraries/{id}
curl --request GET \
--url https://api.tradecrafthub.ai/v1/libraries/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Scope knowledge:read (Read approved answers; lowest role user). Effective access is the token’s scopes ∩ the caller’s current role.

id
required
string format: uuid

Library id

X-Request-Id
string

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

The library

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
slug
string
type
required
string
typeLabel
string
description
Any of:
string
isDefault
required
boolean
archived
boolean
assetKinds
Array<string>
documentCount
Any of:
integer
answerCount
Any of:
integer
createdAt
Any of:
string format: date-time

Example generated

{
"data": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"slug": "example",
"type": "example",
"typeLabel": "example",
"description": "example",
"isDefault": true,
"archived": true,
"assetKinds": [
"example"
],
"documentCount": 1,
"answerCount": 1,
"createdAt": "2026-04-15T12:00:00Z"
}
}
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.
  • INSUFFICIENT_SCOPE — The access token lacks the scope this operation needs (error.scope names it; WWW-Authenticate: Bearer error=“insufficient_scope”).
  • 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 INSUFFICIENT_SCOPE 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"
}
}
  • NOT_FOUND — No such resource in this organization (unknown, malformed or other-tenant id).

Unknown, malformed or another organization’s id.

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: NOT_FOUND

Examples

ExampleNOT_FOUND

No such resource in this organization (unknown, malformed or other-tenant id).

{
"error": {
"code": "NOT_FOUND",
"message": "Not found"
}
}
  • RATE_LIMITED — Too many requests; retry after the Retry-After header.

Retry-After and RateLimit-* tell when to retry.

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: RATE_LIMITED

Examples

ExampleRATE_LIMITED

Too many requests; retry after the Retry-After header.

{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests — retry after the Retry-After header"
}
}

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