Skip to content

API Reference

Base URL: https://api.pathorah.com

All endpoints require Authorization: Bearer <token> unless marked public.

Authentication

MethodPathDescription
POST/api/auth/registerRegister a new user
POST/api/auth/loginLogin, returns access + refresh tokens
POST/api/auth/refreshRefresh access token
POST/api/auth/logoutInvalidate refresh token

Pathfinding

MethodPathDescriptionNotes
POST/api/paths/findFind warm introduction pathsConsumes credits; rate limited
GET/api/pathsList saved/recent paths

POST /api/paths/find — Polymorphic Target Support

json
{
  "targetType": "company",
  "targetId": "<companyId>",
  "allowTransitNodeTypes": ["user", "contact", "company"],
  "maxDepth": 5,
  "maxPaths": 5
}

Legacy person-only fields (targetName, targetEmail, targetContactId, targetFilters) remain supported.

MethodPathDescription
GET/api/search?q=&types=user,contact,company,branchUnified polymorphic search

Returns Users, Contacts, Companies, and Branches from a single query. Filter by types to narrow results.

Companies

MethodPathDescriptionAuth
GET/api/companiesList companies (paginated, filterable)Required
GET/api/companies/:idGet company profileRequired
POST/api/companiesCreate companyRequired
PATCH/api/companies/:idUpdate companyCompany admin
DELETE/api/companies/:idDelete companyGlobal admin
GET/api/companies/:id/employeesList current employeesRequired
GET/api/companies/:id/branchesList branchesRequired
GET/api/companies/:id/relationshipsList company relationshipsRequired
POST/api/companies/:id/mergeMerge duplicate company into this oneGlobal admin

Branches

MethodPathDescription
GET/api/branchesList branches
GET/api/branches/:idGet branch
POST/api/branchesCreate branch (company admin required)
PATCH/api/branches/:idUpdate branch
DELETE/api/branches/:idDelete branch

Employments

MethodPathDescriptionAuth
POST/api/employmentsCreate employment recordRequired
PATCH/api/employments/:idUpdate employment (allowlisted fields only)Required
DELETE/api/employments/:idDelete employmentRequired
POST/api/employments/:id/verifyCompany admin verifies an employmentCompany admin
GET/api/employments/users/:idList employments for a userRequired
GET/api/employments/contacts/:idList employments for a contactRequired

Representative Verification Routes

MethodPathDescriptionAuth
POST/api/employments/:id/representative/email/startSend domain OTP to claimant's company-domain emailRequired
POST/api/employments/:id/representative/email/confirmConfirm OTP, upgrade to tier 1Required
POST/api/employments/:id/representative/documentSubmit proof document URL for admin reviewRequired
POST/api/employments/:id/representative/vouchVouch for a claim (voucher must be tier-2 same company)Required
GET/api/employments/representative/pendingList pending document review queueGlobal admin
POST/api/employments/:id/representative/reviewApprove or reject a document submissionGlobal admin

Company Relationships

MethodPathDescription
GET/api/company-relationshipsList relationships
POST/api/company-relationshipsCreate relationship
PATCH/api/company-relationships/:idUpdate relationship
DELETE/api/company-relationships/:idDelete relationship

Relationship types: PARTNERS_WITH, SUPPLIES, CUSTOMER_OF, COMPETES_WITH, ACQUIRED, INVESTED_IN, SUBSIDIARY_OF, JV_WITH

Knowledge Edges

MethodPathDescription
GET/api/knowledge-edgesList knowledge edges
POST/api/knowledge-edgesCreate knowledge edge
PATCH/api/knowledge-edges/:idUpdate knowledge edge
DELETE/api/knowledge-edges/:idDelete knowledge edge

Taxonomy (tag collections)

MethodPath
GET/POST/api/industries
GET/POST/api/capabilities
GET/POST/api/products
GET/POST/api/markets
GET/POST/api/certifications

Contacts

MethodPathDescription
GET/api/contactsList contacts
POST/api/contactsCreate contact
GET/api/contacts/:idGet contact
PATCH/api/contacts/:idUpdate contact
DELETE/api/contacts/:idDelete contact

Introduction Requests

MethodPathDescription
POST/api/introductionsCreate introduction request
GET/api/introductionsList requests
PATCH/api/introductions/:idAccept / decline / forward

Users

MethodPathDescription
GET/api/users/meGet current user profile
PATCH/api/users/meUpdate profile
GET/api/users/:idGet public user profile

Subscriptions & Credits

MethodPathDescription
GET/api/subscriptions/plansList subscription plans
POST/api/subscriptionsCreate subscription
GET/api/creditsGet credit balance
POST/api/credits/purchasePurchase credits

AI Service Endpoints

Base URL: separate FastAPI service

MethodPathDescription
POST/enrich/companyGemini enrichment for a company profile
POST/enrich/userGemini enrichment for a user profile
POST/enrich/contactGemini enrichment for a contact
GET/healthHealth check