curl --request GET \
--url https://api.wacht.dev/session/ticket/exchange \
--cookie session_id={
"success": true,
"message": "Impersonation successful",
"session_id": "123456789012345678",
"context_group": "support-agents",
"agents": [
{
"id": "12345",
"name": "Support Agent",
"description": "Handles customer support queries",
"integrations": [
{
"id": "333333333333333333",
"provider": "openai"
}
]
}
],
"session": {
"id": "123456789012345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"signin_attempts": [
{
"id": "555555555555555555",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"method": "email_otp",
"completed": true,
"current_step": "verify_otp"
}
],
"signins": [
{
"id": "987654321098765432",
"user_id": "123456789012345678",
"session_id": "123456789012345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-15T11:30:00Z",
"active_organization_membership_id": "111111111111111111",
"active_workspace_membership_id": "222222222222222222",
"active_organization_membership": {
"id": "111111111111111111",
"organization_id": "777777777777777777",
"roles": [
{
"id": "888888888888888888",
"name": "Admin",
"permissions": [
"organization:admin",
"organization:manage"
]
}
]
},
"active_workspace_membership": {
"id": "222222222222222222",
"workspace_id": "999999999999999999",
"organization_membership_id": "111111111111111111",
"roles": [
{
"id": "101010101010101010",
"name": "Editor",
"permissions": [
"workspace:read",
"workspace:write"
]
}
]
}
}
],
"signup_attempts": [
{
"id": "666666666666666666",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"active_signin_id": "987654321098765432",
"active_signin": {
"id": "987654321098765432",
"user_id": "123456789012345678",
"session_id": "123456789012345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-15T11:30:00Z",
"active_organization_membership_id": "111111111111111111",
"active_workspace_membership_id": "222222222222222222",
"active_organization_membership": {
"id": "111111111111111111",
"organization_id": "777777777777777777",
"roles": [
{
"id": "888888888888888888",
"name": "Admin",
"permissions": [
"organization:admin",
"organization:manage"
]
}
]
},
"active_workspace_membership": {
"id": "222222222222222222",
"workspace_id": "999999999999999999",
"organization_membership_id": "111111111111111111",
"roles": [
{
"id": "101010101010101010",
"name": "Editor",
"permissions": [
"workspace:read",
"workspace:write"
]
}
]
}
}
}
}Exchange a session ticket for impersonation or agent access
curl --request GET \
--url https://api.wacht.dev/session/ticket/exchange \
--cookie session_id={
"success": true,
"message": "Impersonation successful",
"session_id": "123456789012345678",
"context_group": "support-agents",
"agents": [
{
"id": "12345",
"name": "Support Agent",
"description": "Handles customer support queries",
"integrations": [
{
"id": "333333333333333333",
"provider": "openai"
}
]
}
],
"session": {
"id": "123456789012345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"signin_attempts": [
{
"id": "555555555555555555",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"method": "email_otp",
"completed": true,
"current_step": "verify_otp"
}
],
"signins": [
{
"id": "987654321098765432",
"user_id": "123456789012345678",
"session_id": "123456789012345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-15T11:30:00Z",
"active_organization_membership_id": "111111111111111111",
"active_workspace_membership_id": "222222222222222222",
"active_organization_membership": {
"id": "111111111111111111",
"organization_id": "777777777777777777",
"roles": [
{
"id": "888888888888888888",
"name": "Admin",
"permissions": [
"organization:admin",
"organization:manage"
]
}
]
},
"active_workspace_membership": {
"id": "222222222222222222",
"workspace_id": "999999999999999999",
"organization_membership_id": "111111111111111111",
"roles": [
{
"id": "101010101010101010",
"name": "Editor",
"permissions": [
"workspace:read",
"workspace:write"
]
}
]
}
}
],
"signup_attempts": [
{
"id": "666666666666666666",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"active_signin_id": "987654321098765432",
"active_signin": {
"id": "987654321098765432",
"user_id": "123456789012345678",
"session_id": "123456789012345678",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"expires_at": "2024-01-15T11:30:00Z",
"active_organization_membership_id": "111111111111111111",
"active_workspace_membership_id": "222222222222222222",
"active_organization_membership": {
"id": "111111111111111111",
"organization_id": "777777777777777777",
"roles": [
{
"id": "888888888888888888",
"name": "Admin",
"permissions": [
"organization:admin",
"organization:manage"
]
}
]
},
"active_workspace_membership": {
"id": "222222222222222222",
"workspace_id": "999999999999999999",
"organization_membership_id": "111111111111111111",
"roles": [
{
"id": "101010101010101010",
"name": "Editor",
"permissions": [
"workspace:read",
"workspace:write"
]
}
]
}
}
}
}Session-based authentication using cookies
Session ticket to exchange
Ticket exchanged successfully
Whether the ticket exchange was successful
true
Success or error message
"Impersonation successful"
Session ID (for agent access tickets)
"123456789012345678"
Context group for agent access
"support-agents"
Available agents (for agent access tickets)
Show child attributes
Updated session (for impersonation tickets)
Show child attributes
Was this page helpful?