Session Lifecycle
Everything that happens between POST /v1/sessions and the session’s end.
Creation
Request fields:
Response (immediate, status: "creating"):
The cdp_url is present from creation. Poll GET /v1/sessions/{id} until status is "ready" — provisioning takes roughly 15–25 seconds.
Polling for readiness
Or check a single GET:
Response when ready:
Using the session
Once status is "ready", connect and automate:
Deleting a session
Free the IP, stop the egress meter, and mark the session ended_reason: "client_delete":
Returns 204 on success. 409 if the session is already in a terminal state — that’s fine, it’s already stopped.
End reasons
When a session closes, ended_reason tells you why:
Egress accounting
Bytes are counted at the network level — all TCP bytes in and out of the session’s proxy connection. This includes HTTP headers, TLS overhead, and any data your CDP client transfers.
The bytes_up and bytes_down fields on the session resource are updated in real time. The final charge is computed from bytes_total = bytes_up + bytes_down when the session closes.
A session that ends in error before reaching ready is not charged.