발급 상태 조회
GET /v1/status
GET https://api.k-otp.dev/v1/status개요
Returns verification state, delivery state, and the computed overallStatus for one issue owned by the authenticated app. overallStatus equals verificationStatus unless it is issued; while issued it is derived from deliveryStatus (delivered -> delivered, failed -> delivery_failed, queued/sent -> in_progress, unknown -> pending_lookup).
Immediately after POST /issue the issue row may still be persisting asynchronously; for up to 60 seconds such an issue is reported as pending_lookup instead of 404. The phone number is never returned.
Requires an sk_ secret key; pk_ public keys are rejected with 403.
인증
| 허용 키 | 필요 scope | 대체 허용 scope |
|---|---|---|
sk_ | otp:status | otp:read, * |
파라미터
| 이름 | 위치 | 타입 | 필수 | 설명 |
|---|---|---|---|---|
issueId | query | string | 예 | issueId returned by POST /v1/issue. |
응답 (200)
Current status of the issue.
| 필드 | 타입 | 필수 | 설명 |
|---|---|---|---|
issueId | string | 예 | |
messageId | string | 예 | Identifier of the outbound message used for delivery tracking. |
purpose | string | 예 | |
templateId | string | 예 | |
verificationStatus | "expired" | "issued" | "max_attempts" | "replaced" | "verified" | 예 | |
deliveryStatus | "delivered" | "failed" | "queued" | "sent" | "unknown" | 예 | |
overallStatus | "delivered" | "delivery_failed" | "expired" | "in_progress" | "max_attempts" | "pending_lookup" | "replaced" | "verified" | 예 | verificationStatus unless it is issued; otherwise derived from deliveryStatus for user-facing display. |
providerOutcomeAmbiguous | boolean | true when the provider outcome of the send is unknown (for example a provider timeout). Such sends are never retried automatically. | |
providerOutcomeCode | string | Provider result code, when available. | |
expiresAt | string | 예 | RFC 3339 timestamp. |
verifiedAt | string | RFC 3339 timestamp, present once verified. | |
attemptsUsed | number | 예 | |
maxAttempts | number | 예 | |
attemptsRemaining | number | 예 | |
createdAt | string | 예 | RFC 3339 timestamp. |
updatedAt | string | 예 | RFC 3339 timestamp. |
오류 응답
모든 오류는 { defined, code, status, message, data? } 형태입니다. 자세한 내용은 오류를 참고하세요.
| 상태 | code | 설명 |
|---|---|---|
| 400 | BAD_REQUEST | issueId is missing or blank. |
| 401 | UNAUTHORIZED | the Authorization: Bearer credential is missing, malformed, inactive, or rejected by introspection. |
| 403 | FORBIDDEN | the credential lacks otp:status (or an accepted alias), or a pk_ public key was used. Public keys are limited to issue/verify. |
| 404 | NOT_FOUND | no issue with this issueId exists for the authenticated app (issues of other apps are indistinguishable from missing ones). |
| 409 | CONFLICT | the request conflicts with the current state of the resource. |
| 500 | INTERNAL_SERVER_ERROR | unexpected server failure. Undefined errors (defined: false) use the same envelope. |
| 503 | SERVICE_UNAVAILABLE | credential introspection or a downstream dependency is temporarily unavailable. Retry with backoff. |
요청 예시
curl "https://api.k-otp.dev/v1/status?issueId=0192f3c4-8b7a-7c3e-9a51-2f4d6e8b1a90" \
-H "Authorization: Bearer $KOTP_SECRET_KEY"