1House Global API Documentation

Educators (Inner Circle)

Educator profiles, announcements, stories, chatrooms, and tips

Access and manage educator profiles, community content, and interactions within the Inner Circle.

Inner Circle

The Educators API powers the "Inner Circle" feature, enabling users to follow educators, join their chatrooms, receive announcements, view stories, and send tips.

Overview

The Educators API provides:

  • Educator profile management
  • Follow/unfollow educators
  • Educator announcements
  • Educator stories
  • Educator-specific chatrooms
  • Tips/donations to educators
  • Push notification subscriptions

Base Path: /v1/educators

Educator Object

interface Educator {
  id: string;
  email: string;
  firstName: string;
  lastName: string;
  username: string;
  profileImage?: string;
  
  // Educator-specific fields
  educator_title?: string;     // e.g., "Day Trading Specialist"
  educator_bio?: string;       // Extended bio (up to 2000 chars)
  banner_image?: string;       // Header/banner image URL
  specialty?: string;          // Primary area of expertise
  skills?: string[];           // Array of skills
  socials?: {
    website?: string;
    twitter?: string;
    youtube?: string;
    linkedin?: string;
    instagram?: string;
  };
  
  // Stats
  subscriberCount?: number;   // Number of subscribers
  followerCount?: number;     // Alias for subscriberCount
  courseCount?: number;
  rating?: number;
  
  // Permissions
  permissions: string[];       // Contains 'educator'
  isVerified?: boolean;
  
  createdAt: string;
  updatedAt: string;
}

List Educators

Get all educators (users with educator permission).

GET /v1/educators
ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 20, max: 50)
searchstringSearch by name or username
featuredbooleanFilter to featured educators only

Try it out:

Response:

{
  "success": true,
  "status": 200,
  "message": "Educators retrieved successfully",
  "data": [
    {
      "id": "69430c45ee6c24902e90c776",
      "firstName": "Christianna",
      "lastName": "Hurt",
      "username": "1housechristianna",
      "email": "christianna@1houseglobal.com",
      "profileImage": "https://firebasestorage.googleapis.com/...",
      "educator_title": "E-Commerce Specialist",
      "educator_bio": "Christianna is a passionate e-commerce educator...",
      "specialty": "E-Commerce",
      "skills": ["Online Business", "E-Commerce", "Digital Marketing"],
      "banner_image": "https://firebasestorage.googleapis.com/...",
      "permissions": ["educator"],
      "isVerified": true
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 11,
    "pages": 1
  }
}

Get Educator by ID

GET /v1/educators/:educatorId

Response:

{
  "success": true,
  "status": 200,
  "data": {
    "id": "69430c45ee6c24902e90c776",
    "firstName": "Christianna",
    "lastName": "Hurt",
    "username": "1housechristianna",
    "profileImage": "https://...",
    "educator_title": "E-Commerce Specialist",
    "educator_bio": "Christianna is a passionate e-commerce educator dedicated to helping aspiring entrepreneurs...",
    "specialty": "E-Commerce",
    "skills": ["Online Business", "E-Commerce", "Digital Marketing", "Entrepreneurship"],
    "banner_image": "https://...",
    "socials": {
      "twitter": "@1housechristianna",
      "youtube": "https://youtube.com/..."
    },
    "permissions": ["educator"],
    "isVerified": true
  }
}

Update Educator Profile

Update educator-specific profile fields. Only the educator themselves or admins can update.

PATCH /v1/educators/:educatorId/profile

Request Body:

{
  "educator_title": "E-Commerce Specialist",
  "educator_bio": "Extended bio text up to 2000 characters...",
  "banner_image": "https://your-cdn.com/banner.jpg",
  "specialty": "E-Commerce",
  "skills": ["Online Business", "Digital Marketing", "Dropshipping"],
  "socials": {
    "twitter": "@username",
    "youtube": "https://youtube.com/channel",
    "website": "https://1houseglobal.com"
  },
  "firstName": "Christianna",
  "lastName": "Hurt",
  "profileImage": "https://..."
}
FieldTypeDescription
educator_titlestringEducator type/specialty (e.g., "Day Trading Specialist")
educator_biostringExtended bio (max 2000 chars)
banner_imagestringURL for header/banner image
specialtystringPrimary area of expertise
skillsstring[]Array of skills/areas
socialsobjectSocial media links
firstNamestringFirst name
lastNamestringLast name
profileImagestringProfile image URL

Response:

{
  "success": true,
  "status": 200,
  "message": "Educator profile updated successfully",
  "data": {
    "id": "69430c45ee6c24902e90c776",
    "educator_title": "E-Commerce Specialist",
    "educator_bio": "Extended bio text...",
    "specialty": "E-Commerce",
    "skills": ["Online Business", "Digital Marketing", "Dropshipping"],
    "...": "..."
  }
}
GET /v1/educators/featured
ParameterTypeDescription
limitnumberNumber of results (default: 8, max: 24)

Follow / Unfollow

Follow Educator

POST /v1/educators/:educatorId/follow

Follows the educator and automatically subscribes to their notification topic.

Response:

{
  "success": true,
  "status": 200,
  "message": "Educator followed successfully",
  "data": {
    "educatorId": "69430c45ee6c24902e90c776",
    "userId": "user_123",
    "followedAt": "2026-01-05T10:00:00.000Z"
  }
}

Unfollow Educator

DELETE /v1/educators/:educatorId/follow

Unfollows the educator and unsubscribes from their notification topic.

Get Following Status

GET /v1/educators/:educatorId/following

Response:

{
  "success": true,
  "status": 200,
  "data": {
    "isFollowing": true,
    "followedAt": "2026-01-05T10:00:00.000Z"
  }
}

List Educators You Follow

GET /v1/educators/following

Returns all educators the current user is following.

Announcements

Get Educator Announcements

GET /v1/educators/:educatorId/announcements
ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 20)

Response:

{
  "success": true,
  "status": 200,
  "data": [
    {
      "id": "announcement_123",
      "educatorId": "69430c45ee6c24902e90c776",
      "title": "Market Outlook: January 2026",
      "content": "Welcome to 2026! Here's my market outlook...",
      "category": "market analysis",
      "priority": "high",
      "pinned": true,
      "tags": ["market", "outlook", "stocks"],
      "multimedia": [
        {
          "type": "image",
          "url": "https://..."
        }
      ],
      "reactions": {
        "likes": 45,
        "comments": 12
      },
      "createdAt": "2026-01-05T10:00:00.000Z"
    }
  ],
  "pagination": {...}
}

Get Announcements Feed

Get announcements from all educators you follow.

GET /v1/educators/announcements/feed

Create Announcement (Educator Only)

POST /v1/educators/:educatorId/announcements
{
  "title": "New Trading Strategy",
  "content": "I've developed a new approach to...",
  "category": "education",
  "priority": "normal",
  "pinned": false,
  "tags": ["strategy", "trading"],
  "multimedia": [
    {
      "type": "image",
      "url": "https://..."
    }
  ]
}

Like/Unlike Announcement

POST /v1/educators/announcements/:announcementId/like
DELETE /v1/educators/announcements/:announcementId/like

Stories

Get Educator Stories

GET /v1/educators/:educatorId/stories

Response:

{
  "success": true,
  "status": 200,
  "data": [
    {
      "id": "story_123",
      "educatorId": "69430c45ee6c24902e90c776",
      "mediaType": "image",
      "mediaUrl": "https://...",
      "thumbnailUrl": "https://...",
      "duration": 5,
      "viewCount": 234,
      "viewed": false,
      "expiresAt": "2026-01-06T10:00:00.000Z",
      "createdAt": "2026-01-05T10:00:00.000Z"
    }
  ]
}

Get Stories Feed

Get stories from all educators you follow.

GET /v1/educators/stories/feed

Response:

{
  "success": true,
  "status": 200,
  "data": [
    {
      "educator": {
        "id": "69430c45ee6c24902e90c776",
        "firstName": "Christianna",
        "lastName": "Hurt",
        "profileImage": "https://..."
      },
      "stories": [...],
      "hasUnviewed": true
    }
  ]
}

Create Story (Educator Only)

POST /v1/educators/:educatorId/stories
{
  "mediaType": "image",
  "mediaUrl": "https://...",
  "thumbnailUrl": "https://...",
  "duration": 5
}

Mark Story as Viewed

POST /v1/educators/stories/:storyId/view

Chatroom

Each educator has a dedicated chatroom for their community.

Get Educator Chatroom

GET /v1/educators/:educatorId/chatroom

Response:

{
  "success": true,
  "status": 200,
  "data": {
    "educatorId": "69430c45ee6c24902e90c776",
    "name": "Christianna's Trading Hub",
    "description": "Daily discussions on e-commerce and online business",
    "rules": [
      "Be respectful",
      "No spamming",
      "Stay on topic"
    ],
    "memberCount": 523,
    "isActive": true,
    "lastMessage": {
      "content": "Great session today!",
      "timestamp": "2026-01-05T15:30:00.000Z"
    }
  }
}

Join Chatroom

POST /v1/educators/:educatorId/chatroom/join

Leave Chatroom

POST /v1/educators/:educatorId/chatroom/leave

Tips

Send tips (Keys) to educators. Tips are processed through the wallet service.

Send Tip

POST /v1/educators/:educatorId/tip
{
  "amount": 100,
  "message": "Great content! Keep it up!"
}

Response:

{
  "success": true,
  "status": 201,
  "message": "Tip sent successfully",
  "data": {
    "transactionId": "txn_abc123",
    "amount": 100,
    "educatorId": "69430c45ee6c24902e90c776",
    "message": "Great content! Keep it up!",
    "createdAt": "2026-01-05T10:00:00.000Z"
  }
}

Get Educator's Received Tips

GET /v1/educators/:educatorId/tips

Returns tips received by the educator (educator or admin only).

Get User's Sent Tips

GET /v1/educators/tips/sent

Returns tips the current user has sent to educators.

Notifications

Subscribe to Educator Notifications

POST /v1/educators/:educatorId/notifications/subscribe

Subscribes to push notifications for the educator's announcements and stories.

Unsubscribe from Educator Notifications

POST /v1/educators/:educatorId/notifications/unsubscribe

Subscribe to All Educators

POST /v1/educators/notifications/subscribe-all

Subscribes to notifications from all current educators. Called automatically on login.

Code Examples

React Native - Fetch and Display Educators

import { educatorService } from '@/services/educator.service';

async function loadEducators() {
  const response = await educatorService.getEducators({ limit: 20 });
  
  if (response?.items) {
    // Filter for actual educators
    const educators = response.items.filter(
      edu => edu.permissions?.includes('educator')
    );
    
    setEducators(educators);
  }
}

Follow/Unfollow Educator

async function toggleFollow(educatorId: string, isFollowing: boolean) {
  if (isFollowing) {
    await educatorService.unfollowEducator(educatorId);
  } else {
    await educatorService.followEducator(educatorId);
  }
  
  // Refresh educator list
  loadEducators();
}

Send Tip to Educator

async function sendTip(educatorId: string, amount: number, message?: string) {
  const result = await educatorService.sendTip(educatorId, amount, message);
  
  if (result?.success) {
    Alert.alert('Success', `Sent ${amount} Keys!`);
  } else {
    Alert.alert('Error', 'Failed to send tip');
  }
}

Update Educator Profile

async function updateProfile(educatorId: string) {
  const result = await educatorService.updateEducatorProfile(educatorId, {
    educator_title: 'Day Trading Specialist',
    educator_bio: 'I help traders master the markets...',
    specialty: 'Daytrading',
    skills: ['Technical Analysis', 'Risk Management'],
    banner_image: 'https://...'
  });
  
  if (result) {
    console.log('Profile updated successfully');
  }
}

Error Codes

CodeMessageDescription
400Invalid educator IDThe provided educator ID is malformed
403User does not have educator permissionThe user is not an educator
404Educator not foundNo educator exists with the given ID
400No valid educator profile fields providedPATCH request body is empty or invalid
400Educator bio must be 2000 characters or lessBio exceeds maximum length