Download OpenAPI specification:Download
Public API Contract for PAKD (Pedagang Aset Keuangan Digital) Education Service.
This spec covers the exchange-facing (public) API — the endpoint that exchanges call to create education sessions for their users.
PAKD is an educational quiz system for derivative trading knowledge assessment.
Base URL (Staging): https://edu-api-staging.icex.id
Base URL (Production): https://edu-api.icex.id
The embedUrl returned by the session endpoints points to the education frontend
(staging: https://edu-staging.icex.id, production: https://edu.icex.id).
This API uses the API Key Authentication pattern: a public API key identifies the caller, and an HMAC-SHA512 signature proves possession of the secret key. The secret key is never sent over the wire.
| Header | Required | Description |
|---|---|---|
X-API-Key |
Yes | Public API key that identifies the exchange. |
X-Signature |
Yes | HMAC-SHA512 signature of METHOD|PATH|CANONICAL_BODY|TIMESTAMP, hex-encoded (lowercase). |
X-Timestamp |
Yes | Unix timestamp in milliseconds. Must be within ±5 minutes of server time. |
Content-Type |
Yes | Must be application/json. |
| Header | Description |
|---|---|
X-Idempotency-Key |
Unique key to prevent duplicate session creation. |
"METHOD|PATH|BODY|TIMESTAMP".api_secret as the HMAC key.| Concept | Sent over wire | Used for |
|---|---|---|
api_key (public) |
Yes — X-API-Key header |
Looking up the exchange (safe to log) |
api_secret (private) |
Never | HMAC-SHA512 signature + JWT signing |
Idempotency: Use X-Idempotency-Key header to prevent duplicate session creation.
Session Lifecycle:
PENDING → MATERIAL_IN_PROGRESS → QUIZ_IN_PROGRESS → PASSED/FAILED/TIMEOUT/INCOMPLETEQuiz Rules:
pass_threshold_pct (default: 70). Confirm the exact value for your exchange during onboarding.Creates a new education session for the given user. Returns an embed URL with a JWT token.
Note: This endpoint can return both 201 Created (new session) and 200 OK (existing active session, idempotency replay, or already certified). All 200/201 responses include a status discriminator field.
| user_id required | string Example: usr_8f3a2c1b9e The end-user identifier as known by the exchange. Opaque string, no
length limit enforced by backend (DB stores as |
| X-Idempotency-Key | string Example: unique-key-001 Optional unique key to prevent duplicate session creation for the same
|
required | object Callback URLs for session outcomes |
| sessionTimeoutMinutes | integer Total time allowed to complete the entire education flow (material + quiz).
If omitted or |
{- "callbackUrls": {
}, - "sessionTimeoutMinutes": 60
}{- "status": "active_session",
- "sessionId": "9f189718-4521-4437-a0ae-6452030c1235",
- "questionsTotal": 30,
- "expiresAt": "2026-07-29T21:10:19+07:00"
}