Skip to main content
GET
/
api
/
v1
/
cardholder_onboarding_sessions
/
{id}
Get Onboarding Session
curl --request GET \
  --url https://api.agentcard.sh/api/v1/cardholder_onboarding_sessions/{id}
{
  "id": "cos_a1b2c3d4e5f6a7b8c9d0e1f2",
  "status": "completed",
  "return_url": "https://yoursite.com/agentcard/return",
  "state": "f3a9c2",
  "external_user_id": "user_123",
  "cardholder_id": "cmbq1x2y3z...",
  "sandbox": true,
  "email": "jane@example.com",
  "created_at": "2026-06-10T18:00:00.000Z",
  "completed_at": "2026-06-10T18:04:12.000Z",
  "expires_at": "2026-06-10T19:00:00.000Z"
}
Fetch a session by id — this is how you confirm a completion server-side after the user returns to your return_url.

Path parameters

id
string
required
The session id (cos_…) from creation, also delivered as ?session_id= on the final redirect.

Response

status
string
pending, verified (email confirmed, awaiting consent), completed, or expired.
cardholder_id
string
Set once status is completed — the cardholder in your organization now linked to the user’s AgentCard account.
email
string
The email the user actually verified (may differ from your prefill on live keys).
external_user_id
string
Your identifier from session creation.
{
  "id": "cos_a1b2c3d4e5f6a7b8c9d0e1f2",
  "status": "completed",
  "return_url": "https://yoursite.com/agentcard/return",
  "state": "f3a9c2",
  "external_user_id": "user_123",
  "cardholder_id": "cmbq1x2y3z...",
  "sandbox": true,
  "email": "jane@example.com",
  "created_at": "2026-06-10T18:00:00.000Z",
  "completed_at": "2026-06-10T18:04:12.000Z",
  "expires_at": "2026-06-10T19:00:00.000Z"
}