POST
/v1/auth/session
Create Session
curl -X POST https://api.{cluster}.{platform}.voiger.io/v1/auth/session \
-H "Cookie: sid=$VOIGER_SESSION" \
-H "x-csrf-token: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"auth": {
"domain": "general",
"token": "eyJhb...p5g"
}
}'
const res = await fetch("https://api.{cluster}.{platform}.voiger.io/v1/auth/session", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json", "x-csrf-token": csrf },
body: JSON.stringify({
"auth": {
"domain": "general",
"token": "eyJhb...p5g"
}
}),
})
const data = await res.json()
json · 200
{
"x_csrf_token": "f3096dec-aa4d-4d1f-8b2f-e9899cfcff05",
"user": {
"email": "dummy@domain.com"
},
"workspaces": [
{
"id": "bc3c54c4-ab85-4712-b155-d3744d1b13a8",
"code": "let-s-eat",
"name": "Lets Eat Restaurant",
"user": {
"type": "agent"
}
}
]
}