REST API

Authentication

Vigilry uses JWT-based session cookies for the dashboard and management API. The session cookie is set automatically on login and cleared on logout.

POST/auth/signup

Create a new account. Automatically creates a user, an organization (named after the user), and an OWNER membership. Sets a JWT session cookie valid for 7 days.

Auth:Public — no auth required

No project or API key is created automatically. Use POST /projects after signup.

Request Body

NameTypeRequiredDescription
namestringrequiredFull name of the user.
emailstringrequiredEmail address — must be unique.
passwordstringrequiredMinimum 8 characters.
Request
POST /auth/signup HTTP/1.1
Content-Type: application/json

{
  "name": "Alice Smith",
  "email": "[email protected]",
  "password": "supersecret123"
}
Response
HTTP/1.1 201 Created
Set-Cookie: session=<jwt>; HttpOnly; SameSite=Lax

{
  "user": {
    "id": "usr_01HX...",
    "name": "Alice Smith",
    "email": "[email protected]"
  },
  "organization": {
    "id": "org_01HX...",
    "name": "Alice Smith",
    "plan": "free"
  }
}
POST/auth/login

Authenticate with email and password. Sets a JWT session cookie valid for 7 days.

Auth:Public — no auth required

Request Body

NameTypeRequiredDescription
emailstringrequiredRegistered email address.
passwordstringrequiredAccount password.
Request
POST /auth/login HTTP/1.1
Content-Type: application/json

{
  "email": "[email protected]",
  "password": "supersecret123"
}
Response
HTTP/1.1 200 OK
Set-Cookie: session=<jwt>; HttpOnly; SameSite=Lax

{
  "user": {
    "id": "usr_01HX...",
    "name": "Alice Smith",
    "email": "[email protected]"
  },
  "organization": {
    "id": "org_01HX...",
    "name": "Alice Smith",
    "plan": "free"
  }
}
POST/auth/logout

Invalidate the current session by clearing the session cookie.

Auth:JWT Session (cookie)
Response
HTTP/1.1 200 OK

{ "message": "Logged out" }
GET/auth/me

Return the currently authenticated user and their organization. Useful for initializing client-side session state.

Auth:JWT Session (cookie)
Response
HTTP/1.1 200 OK

{
  "user": {
    "id": "usr_01HX...",
    "name": "Alice Smith",
    "email": "[email protected]"
  },
  "organization": {
    "id": "org_01HX...",
    "name": "Alice Smith",
    "plan": "free"
  }
}