Flow
Create a session
Call
POST /v2/sessions with your pid, your internal clientId, and optional guildId.Create a session
Public Identifier attached to your API key. The
pid must belong to the authenticated API key.Your internal user, session, or checkout ID. Dock returns it with the session so you can map completion back to your system.
Optional Discord guild ID for flows that need guild context.
Optional key for safely retrying session creation with the same body.
cURL
200 OK
Read a session
Session ID returned as
data.id by session creation.Optional long-poll wait in seconds. Maximum
25.Long-poll
Stream a session
session events. The connection closes when the session reaches a terminal state or after the stream limit.
Browser or Node SSE
Browser
EventSource cannot set custom Authorization headers. If you need API-key auth from a browser, proxy the stream through your backend.Session states
| State | Meaning |
|---|---|
pending | The user has not completed verification yet. |
completed | Verification completed and result is populated. |
expired | The session reached its 5-minute lifetime before completion. |
Completed result
Completed session
true when the same Discord user was previously linked to a different Roblox account in your PID dataset.Previous Roblox ID when
linkChanged is true.Limits
| Guardrail | Value |
|---|---|
| Session lifetime | 5 minutes |
| Create burst | 6 sessions |
| Create refill | 1 session every 10 seconds |
| Minimum poll interval | 2 seconds |
Maximum wait | 25 seconds |
| Stream max duration | 30 seconds |
| Free poll cap | 60 polls |
| Premium poll cap | 150 polls |