Skip to main content

Documentation index for AI agents: llms.txt. Every page here is also served as markdown: add .md to its address, or request it with Accept: text/markdown.

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

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.

FieldTypeRequiredDescription
namestringNo
avatarstringNo

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).

FieldTypeRequiredDescription
filestring (binary)YesAvatar 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.
FieldTypeRequiredDescription
avatarstringNoURL 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.
FieldTypeRequiredDescription
successbooleanNo

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.

FieldTypeRequiredDescription
organizationIdstring (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.