VirtuousAI
Reference

Auth

Callback

GET
/api/v1/auth/callback

Query Parameters

code?|
state?|

Header Parameters

user-agent?|
oauth_state_nonce?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/auth/callback"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Login

GET
/api/v1/auth/login

Query Parameters

provider*string
Value in"GoogleOAuth" | "MicrosoftOAuth" | "EnterpriseSSO"
redirect?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/auth/login?provider=GoogleOAuth"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Login Enterprise

GET
/api/v1/auth/login/enterprise

Query Parameters

redirect?|
login_hint?|
domain_hint?|
connection_id?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/auth/login/enterprise"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Logout

POST
/api/v1/auth/logout
vai_token?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/auth/logout"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Me

GET
/api/v1/auth/me

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/auth/me"
{
  "session": {
    "authMethod": "bearer",
    "organization": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "slug": "string",
      "tenantStatus": "demo"
    },
    "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
    "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",
    "tokenType": "session"
  },
  "user": {
    "email": "string",
    "emailVerified": true,
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "locale": "string",
    "name": "string",
    "profilePictureUrl": "string",
    "timezone": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Switch Organization

POST
/api/v1/auth/switch-organization

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

membershipId*string

Target membership to switch to

Formatuuid

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/auth/switch-organization" \  -H "Content-Type: application/json" \  -d '{    "membershipId": "8072cc74-4782-4f2c-827c-699c48ce2092"  }'
{
  "membershipId": "8072cc74-4782-4f2c-827c-699c48ce2092",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}