User API
User profile and preferences. This page lists all 8 endpoints in the User area of the Visual Sentinel REST API.
Base URL: https://visualsentinel.com. Unless an endpoint says otherwise it accepts an API key or a session cookie, see Authentication. Most error responses use the ErrorResponse shape, see Errors and Rate limits.
Endpoints
- Get user profile:
GET /api/user/profile - Update user profile:
PUT /api/user/profile - Upload avatar:
POST /api/user/profile/avatar - Delete avatar:
DELETE /api/user/profile/avatar - Delete account:
POST /api/user/delete-account - Get digest preferences:
GET /api/user/digest-preferences - Update digest preferences:
PUT /api/user/digest-preferences - Switch organization:
POST /api/user/organizations/switch
Get user profile
GET /api/user/profile
Get the current user's profile information.
Responses
200: User profile.
Update user profile
PUT /api/user/profile
Update the current user's profile (name, avatar, etc.).
Request body (required): object.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | |
avatar | string | No |
Responses
200: Profile updated.
Upload avatar
POST /api/user/profile/avatar
Upload a new avatar image for the current user. Accepts JPEG, PNG, WebP, or GIF up to 2MB. Replaces any existing avatar.
Request body (required): object (multipart/form-data).
| Field | Type | Required | Description |
|---|---|---|---|
file | string (binary) | Yes | Avatar image file (JPEG, PNG, WebP, or GIF, max 2MB) |
Responses
200: Avatar uploaded. Body: object.400: Invalid file type or file too large.401: Not authenticated.503: Database unavailable.
| Field | Type | Required | Description |
|---|---|---|---|
avatar | string | No | URL path to the uploaded avatar |
Delete avatar
DELETE /api/user/profile/avatar
Remove the current user's avatar image and reset to default.
Responses
200: Avatar deleted. Body: object.401: Not authenticated.503: Database unavailable.
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No |
Delete account
POST /api/user/delete-account
Permanently delete the user's account.
Authentication: session cookie only. API keys are refused.
Responses
200: Account deleted.
Get digest preferences
GET /api/user/digest-preferences
Get the user's email digest preferences.
Responses
200: Digest preferences.
Update digest preferences
PUT /api/user/digest-preferences
Update email digest frequency and settings.
Responses
200: Preferences updated.
Switch organization
POST /api/user/organizations/switch
Switch the active organization for the current session.
Authentication: session cookie only. API keys are refused.
Request body (required): object.
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string (uuid) | Yes |
Responses
200: Organization switched.
Generated from the OpenAPI 3.1 specification at https://docs.visualsentinel.com/openapi.json, the same file the interactive reference reads.