API Design

User Profile JSON Example

A complete JSON example for a user profile object — includes name, email, avatar, address, preferences, and role fields. Copy-ready for REST API design and user management systems.

{
  "id": "usr_9k2mXpQr4t",
  "username": "ravi.mehta",
  "email": "ravi.mehta@example.com",
  "fullName": "Ravi Mehta",
  "avatarUrl": "https://cdn.example.com/avatars/usr_9k2mXpQr4t.jpg",
  "phone": "+91-98765-43210",
  "role": "admin",
  "isVerified": true,
  "isActive": true,
  "address": {
    "street": "42, Shyamal Cross Road",
    "city": "Ahmedabad",
    "state": "Gujarat",
    "postalCode": "380015",
    "country": "IN"
  },
  "preferences": {
    "language": "en",
    "timezone": "Asia/Kolkata",
    "newsletterOptIn": true,
    "theme": "dark"
  },
  "createdAt": "2024-03-12T08:45:00Z",
  "updatedAt": "2025-05-01T10:30:00Z",
  "lastLoginAt": "2025-05-20T14:22:00Z"
}

Field Reference

idstringrequiredUnique user identifier with usr_ prefix
usernamestringrequiredLowercase alphanumeric handle, unique per tenant
emailstringrequiredPrimary email address, used for login and notifications
rolestringrequiredAccess control role: admin, editor, or viewer
isVerifiedbooleanrequiredWhether the user has completed email verification
addressobjectoptionalStructured postal address with city, state, and country
preferencesobjectoptionalUser-specific settings such as language, timezone, and theme
createdAtstring (ISO 8601)requiredTimestamp when the account was first created

Variants

MinimalOnly the required fields needed to create a valid user record.
{
  "id": "usr_3hFwLmNz8q",
  "username": "priya.sharma",
  "email": "priya.sharma@example.com",
  "fullName": "Priya Sharma",
  "role": "viewer",
  "isVerified": false,
  "isActive": true,
  "createdAt": "2025-04-10T06:00:00Z",
  "updatedAt": "2025-04-10T06:00:00Z"
}
ExtendedFull profile including OAuth connections, two-factor settings, and billing details.
Extended
{
  "id": "usr_9k2mXpQr4t",
  "username": "ravi.mehta",
  "email": "ravi.mehta@example.com",
  "fullName": "Ravi Mehta",
  "avatarUrl": "https://cdn.example.com/avatars/usr_9k2mXpQr4t.jpg",
  "phone": "+91-98765-43210",
  "role": "admin",
  "isVerified": true,
  "isActive": true,
  "twoFactorEnabled": true,
  "oauthProviders": [
    "google",
    "github"
  ],
  "address": {
    "street": "42, Shyamal Cross Road",
    "city": "Ahmedabad",
    "state": "Gujarat",
    "postalCode": "380015",
    "country": "IN"
  },
  "preferences": {
    "language": "en",
    "timezone": "Asia/Kolkata",
    "newsletterOptIn": true,
    "theme": "dark"
  },
  "billing": {
    "plan": "pro",
    "renewsAt": "2026-03-12T00:00:00Z",
    "cardLast4": "4242"
  },
  "createdAt": "2024-03-12T08:45:00Z",
  "updatedAt": "2025-05-01T10:30:00Z",
  "lastLoginAt": "2025-05-20T14:22:00Z"
}

Common Use Cases

  • Designing the response schema for a GET /users/:id REST endpoint
  • Seeding test databases with realistic user fixture data
  • Documenting the user object shape in OpenAPI / Swagger specs
userprofileaccountREST APIidentity

Validate or format this JSON

Paste the example above into JSONKit's tools to validate, minify, or explore the structure interactively.

Frequently Asked Questions

No. Never include password hashes, salts, or any credential material in a user profile response. Keep auth secrets server-side only.

A prefixed random string like 'usr_9k2mXpQr4t' is human-readable and avoids sequential ID enumeration attacks. UUIDs (e.g. 550e8400-e29b-41d4-a716-446655440000) are also widely used.

Use ISO 8601 UTC strings (e.g. '2025-05-01T10:30:00Z'). This format is unambiguous, timezone-safe, and natively parseable in JavaScript with new Date().

Related JSON Examples