Part 3
Key Management API
APIs for issuing, retrieving, and revoking student keys. Called from your institution's backend; all requests require org_key.
Common
| νλͺ© | κ° |
|---|---|
| Base URL | https://naia-gateway-181404717065.asia-northeast3.run.app |
| μΈμ¦ ν€λ | Authorization: Bearer {ORG_KEY} |
| Content-Type | application/json |
Issue Student Key
νμ λ‘κ·ΈμΈ μ νΈμΆν©λλ€. κ°μ user_idλ‘ μ¬νΈμΆνλ©΄ κΈ°μ‘΄ ν€λ₯Ό λ°νν©λλ€.
http
POST /v1/keysμμ²
json
{
"user_id": "student@example.com",
"name": "νκΈΈλ",
"metadata": {
"type": "user_key",
"org_key_id": "<μ ν¬κ° μλ €λ리λ κ°>"
}
}μλ΅
json
{ "key": "user_..." }Get Student Info
νμ ν€λ‘ μ μ μ 보λ₯Ό νμΈν©λλ€.
http
GET /v1/profile
Authorization: Bearer {USER_KEY}μλ΅
json
{
"profile": {
"user_id": "student@example.com",
"name": "νκΈΈλ",
"spend": 0.024
}
}Revoke Student Key
μ‘Έμ , νν΄, μ κ·Ό μ°¨λ¨ μ μ¬μ©ν©λλ€.
http
PATCH /v1/keys/{key_id}
Authorization: Bearer {ORG_KEY}json
{ "is_active": false }key_idλ λ°κΈ μ λ°νλ ν€ μλΆλΆμ
λλ€. μ νν νμμ μ ν¬ λ΄λΉμμκ² νμΈν΄ μ£ΌμΈμ.Org Stats
Upcoming
κΈ°κ΄ μ 체μ μ¬μ© νν©μ μ‘°νν©λλ€.
| νλͺ© | μ€λͺ |
|---|---|
| μ΄ νμ μ | λ±λ‘λ user_key μ |
| μ΄ μ¬μ©λ | κΈ°κ°λ³ ν ν° μ¬μ©λ ν©μ° |
| νμ± νμ μ | μ΅κ·Ό NμΌ λ΄ μ μν νμ μ |
| κ΅μ¬λ³ μ§λ νν© | κ΅μ¬ IDλ³ μκ° μλ£ λΉμ¨ |
http
GET /v1/org/stats?from=2026-01-01&to=2026-03-31
Authorization: Bearer {ORG_KEY}Student Stats
Upcoming
κ°λ³ νμμ νμ΅ νλμ μ‘°νν©λλ€.
| νλͺ© | μ€λͺ |
|---|---|
| μ μ μ΄λ ₯ | λ μ§λ³ μ μ μκ° |
| AI μ§λ¬Έ μ | λν ν΄ μ |
| μ½λ μ€ν μ | μλν° μ€ν νμ |
| κ°μ μ§λ | μκ° μλ£ν κ°μ λͺ©λ‘ |
| ν둬ννΈ raw λ°μ΄ν° | νμμ΄ AIμκ² λ³΄λΈ λ©μμ§ μλ¬Έ + AI μλ΅ μ 체 |
| μΈμ κΈ°κ°λ³ μμ½ | μ μ μΈμ λ¨μλ‘ μ§κ³ν νλ μμ½ (μ§λ¬Έ μ, μ€ν μ, μμ μκ°) |
http
# ν΅κ³ μμ½
GET /v1/org/students/{user_id}/stats
# ν둬ννΈ raw λ°μ΄ν°
GET /v1/org/students/{user_id}/messages?from=2026-01-01&to=2026-03-31
# μΈμ
κΈ°κ°λ³ μμ½
GET /v1/org/students/{user_id}/sessions
Authorization: Bearer {ORG_KEY}