curl --request POST \
--url https://api.wacht.dev/session/switch-sign-in \
--cookie session_id={
"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"
]
}
]
}
}
}Switch the active sign-in within the current session
curl --request POST \
--url https://api.wacht.dev/session/switch-sign-in \
--cookie session_id={
"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
ID of the sign-in to activate
Sign-in switched successfully
Session ID
"123456789012345678"
Session creation timestamp
"2024-01-15T10:30:00Z"
Session last update timestamp
"2024-01-15T10:30:00Z"
Sign-in attempts associated with this session
Show child attributes
Successful sign-ins associated with this session
Show child attributes
Signup attempts associated with this session
Show child attributes
ID of the active sign-in
"987654321098765432"
Active sign-in details
Show child attributes
Was this page helpful?