Session-only endpoints
These sit at /api/private, not under /key/protected. They resolve a user before a company is chosen, so they authenticate with a session JWT only — an API key cannot reach them. Documented because the web app depends on them.
Base URL https://api.leadx.in/api/private.
16 endpoints.
PUT /change-password
Change password.
Auth session JWT only · Success 200
Request body
| Field | Default |
|---|---|
currentPassword | — |
newPassword | — |
Required: password, newPassword. Of these, password is nested inside another field (commonly formData), or checked under a different internal name.
Response — data is one User object.
Errors InvalidPassword_400
POST /company
Create company.
Auth session JWT only · Success 200
:::note Used by the web app
pages/Billing.jsx, pages/CompanyProfile.jsx
:::
Request body
| Field | Default |
|---|---|
name | — |
email | — |
contactNumber | — |
timezone | — |
Required: name, email, countryCode, number, timezone. Of these, countryCode, number are nested inside another field (commonly formData), or checked under a different internal name.
Errors InvalidTimezone_400
ALL /country-state-city
Country state city.
Auth session JWT only
Query parameters
| Field | Default |
|---|---|
country | — |
state | — |
Response — data is one ResponseMessage object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
Errors CountryNotFound_400 · StateNotFound_400
ALL /currencies
Currency.
Auth session JWT only
POST /invite/:id
Invite resolve.
Auth session JWT only · Success 200
Path parameters
| Name | |
|---|---|
id | Required |
Request body
| Field | Default |
|---|---|
status | — |
Required: id, status. Of these, id is nested inside another field (commonly formData), or checked under a different internal name.
Response — data is one Member object.
Errors InvalidInviteStatus_400 · InviteExpired_400 · MemberNotFound_404
GET /invites
Get invites.
Auth session JWT only
Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.
Response — data is an array of Member objects, alongside the pagination fields described in Response format. company, createdBy are populated, so they arrive as nested objects rather than ids.
GET /memberships
Memberships.
Auth session JWT only
Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.
Response — data is an array of Member objects, alongside the pagination fields described in Response format. company is populated, so it arrives as nested objects rather than ids.
GET /memberships/:id
Membership.
Auth session JWT only
Path parameters
| Name | |
|---|---|
id | Required |
Response — data is one Member object. company role is populated, so it arrives as nested objects rather than ids.
GET /partner-program
Get partner program.
Auth session JWT only
GET /partner-program/referrals
Get partner referrals.
Auth session JWT only
Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.
Response — data is one PartnerProgram object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
POST /partner-program/request
Request partner program.
Auth session JWT only · Success 200
Request body
| Field | Default |
|---|---|
requestNote | "" |
Errors PartnerProgramAlreadyApproved_400 · PartnerProgramAlreadyRequested_400 · PartnerProgramRevoked_400
GET /profile
Get profile.
Auth session JWT only
:::note Used by the web app
components/CompanySwitcherAndProfile.jsx, components/CustomField.jsx, components/Navbar.jsx and 5 more
:::
PUT /profile
Update profile.
Auth session JWT only
:::note Used by the web app
components/CompanySwitcherAndProfile.jsx, components/CustomField.jsx, components/Navbar.jsx and 5 more
:::
Request body
| Field | Default |
|---|---|
aiOnboarded | — |
onboarded | — |
layout | — |
darkMode | — |
columns | — |
GET /refer-program
Get refer program.
Auth session JWT only
Response — data is one User object. (Resource deduced from the collections this handler reads, not read off an explicit return.)
PUT /refer-program
Update refer program.
Auth session JWT only · Success 200
Request body
| Field | Default |
|---|---|
status | — |
Response — data is one ReferProgram object.
Errors InvalidReferProgramStatus_400
GET /refer-program/referrals
Get refer referrals.
Auth session JWT only
Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.
Response — data is an array of User objects, alongside the pagination fields described in Response format.