DOCS

Tham chiếu API

API của trust.iai.one phục vụ một mục tiêu: xác minh bằng chứng dữ liệu, chứng chỉ và quyền sở hữu tài sản số qua một lớp verify thống nhất.

Base URL

https://trust.iai.one/api

Xác thực

Endpoint dashboard dùng JWT phiên đăng nhập. Endpoint server-to-server dùng API key trong header Authorization.

Authorization: Bearer vtl_live_xxxxxxxxx

Auth

MethodPathMục đích
POST/api/auth/magic-linkGửi link đăng nhập qua email.
POST/api/auth/verify-tokenĐổi token thành phiên đăng nhập.
GET/api/auth/meLấy hồ sơ người dùng hiện tại.

Proof

Proof là API mở trước tiên vì rủi ro thấp, giá trị rõ và là nền cho credential.

MethodPathMục đích
POST/api/proof/createTạo SHA-256 hash, timestamp và verify URL.
POST/api/proof/verifyKiểm tra proof bằng id hoặc hash.
GET/api/proof/{id}Lấy chi tiết proof.
curl -X POST https://trust.iai.one/api/proof/create \
  -H "Authorization: Bearer vtl_live_xxx" \
  -F "file=@contract.pdf" \
  -F 'metadata={"project":"demo"}'

Credentials

MethodPathMục đích
POST/api/vc/issuePhát hành credential có thể xác minh.
GET/api/vc/{id}Lấy chi tiết credential.
POST/api/vc/{id}/revokeThu hồi credential.

Assets

MethodPathMục đích
POST/api/asset/createTạo bản ghi tài sản số từ credential hoặc metadata.
GET/api/asset/{id}Lấy trạng thái và lịch sử sở hữu.

Verify công khai

Verify là endpoint công khai, không cần auth, tự nhận diện proof, credential hoặc asset.

GET /api/verify/{id}

{
  "type": "proof",
  "status": "valid",
  "created_at": "2026-04-28T00:00:00Z"
}

Billing

GET/api/billing/plansDanh sách gói.
POST/api/billing/checkoutTạo phiên thanh toán.

Giới hạn tốc độ

PlanLimit
Free10/min
Pro60/min
Business300/min
EnterpriseCustom

Mã lỗi

400Bad request
401Unauthorized
403Forbidden
404Not found
429Rate limited