Skip to main content

Get User Profile

Response

id
string
required
User ID
email
string
required
User’s email address
full_name
string
required
User’s full name
avatar_url
string | null
required
URL to user’s avatar image (null if not set)
email_verified
boolean
required
Whether the email has been verified
plan_id
string
required
Current subscription plan: free, starter, or growth
created_at
string
required
ISO 8601 timestamp of account creation

Example Request

curl -X GET "https://api.opensight.ai/api/users/profile" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "id": "user_456",
  "email": "[email protected]",
  "full_name": "John Doe",
  "avatar_url": "https://example.com/avatars/john.jpg",
  "email_verified": true,
  "plan_id": "starter",
  "created_at": "2024-01-01T08:00:00Z"
}

Errors

  • 401 Unauthorized - Invalid or missing authentication
  • 404 Not Found - User profile not found

Update User Profile

Request Body

name
string
User’s full name (1-255 characters)
avatar_url
string
Valid URL to user’s avatar image

Response

id
string
required
User ID
email
string
required
User’s email address (cannot be changed via this endpoint)
full_name
string
required
Updated full name
avatar_url
string | null
required
Updated avatar URL
email_verified
boolean
required
Whether the email has been verified
plan_id
string
required
Current subscription plan
created_at
string
required
ISO 8601 timestamp of account creation

Example Request

curl -X PATCH "https://api.opensight.ai/api/users/profile" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Smith",
    "avatar_url": "https://example.com/avatars/john-new.jpg"
  }'

Example Response

{
  "id": "user_456",
  "email": "[email protected]",
  "full_name": "John Smith",
  "avatar_url": "https://example.com/avatars/john-new.jpg",
  "email_verified": true,
  "plan_id": "starter",
  "created_at": "2024-01-01T08:00:00Z"
}

Errors

  • 401 Unauthorized - Invalid or missing authentication
  • 404 Not Found - User profile not found
  • 400 Bad Request - Invalid input data (e.g., invalid URL format)

Change Password

Request Body

current_password
string
required
User’s current password
new_password
string
required
New password (min 8 characters, must contain 1 uppercase letter and 1 number)

Response

message
string
Success confirmation message

Example Request

curl -X PATCH "https://api.opensight.ai/api/users/password" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "current_password": "OldPassword123",
    "new_password": "NewPassword456"
  }'

Example Response

{
  "message": "Password changed successfully"
}

Errors

  • 401 Unauthorized - Invalid or missing authentication
  • 404 Not Found - User not found
  • 400 Bad Request - Current password is incorrect or new password doesn’t meet requirements

Password Requirements

  • Minimum 8 characters
  • At least 1 uppercase letter (A-Z)
  • At least 1 number (0-9)
After changing your password, all existing sessions remain valid. To force logout from all devices, users should revoke their API keys and create new ones.

Account Information

The user profile includes information about the current subscription plan and its limits:

Plan Types

PlanBrandsPromptsCompetitorsAPI KeysContent Scores/Day
Free125225
Starter31005525
Growth10250520100
To upgrade or downgrade plans, users must use the billing portal or checkout flow (not available via API).

Build docs developers (and LLMs) love