OpheliaDocs
Search docs⌘K
DashboardCreate an account
v3 · Endpoints

POST /v3/sessions

Start connecting a person's own account on a site, with their phone or email. The site sends them a code; you send it to the continue route.

POST/v3/sessions

How connected accounts work: Use a person's own account. Ophelia never types a password and never creates an account.

Request

FieldTypeDefaultRule
site
string
none
The website, as a host or a URL. url is accepted too. None → 400 no_site.
end_user
string
none
Required. Your own id for the person. None → 400 end_user_required.
profile.phone
string
none
E.164 (+15551234567) or a 10-digit US number. Anything else → 400 phone_invalid.
profile.email
string
none
Used when there is no phone. Neither → 400 phone_or_email_required.
profile.given_name
string
none
The person’s given name.

Response

A session object (vss_). Its site is the host. The call waits for the site's answer; when the site sends a code, status is requires_action with next_action: {"type": "otp", "expires_at"}.

Statuses and error codes

HTTPStatus / error codeWhen
201
requires_action
The site sent a code. Send it to POST /v3/sessions/{session_id}/continue.
201
active
The site signed the person in.
201
failed + error_code
The site did not sign them in (password_required, account_required, otp_not_sent, a site's bot wall, …). The failed connect is still answered with 201 and the session object.
202
connecting
Still going. Read GET /v3/sessions/{session_id}.
400
end_user_required, phone_or_email_required, phone_invalid
The request is missing or misstates who to connect.
400
no_site, unresolvable_site, private_address
The site cannot be driven.
403
merchant_not_enabled_for_key
The key is not enabled for this site. The body adds merchant and allowed_sites.
409
continue_in_flight
Another connect for the same person and site started at the same moment and has already ended. Read GET /v3/sessions/{session_id}.
503
drive_capacity, no_clean_exit
Ophelia cannot start the drive right now. Retry-After: 60.
503
sessions_unavailable
Connected accounts are not enabled on this deployment.

Errors on these routes answer {"error_code", "error"}. Every code: Statuses and error codes.

Example

curl
curl -X POST https://api.opheliaos.com/v3/sessions \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"site": "opheliapractice.com/shop",
"end_user": "u_jane_1",
"profile": { "email": "jane.smith.diner@gmail.com" }
}'

Response 201:

json
{
"object": "v3.session",
"id": "vss_f1fc8f70c5abb973eeeea519",
"site": "opheliapractice.com",
"end_user": "u_jane_1",
"status": "requires_action",
"next_action": {
"type": "otp",
"expires_at": "2026-11-03T20:20:52.023934-05:00"
},
"error_code": null,
"error": null,
"created_at": "2026-11-04T01:10:52.023872Z",
"connected_at": null,
"expires_at": null
}