Skillhouse is self-hosted. Replace
https://your-backend-domain.com with the URL of your running backend instance. If you are running locally, this is typically http://localhost:3000.Base URL
Route groups
The API is organized into five route groups based on the actor or resource being accessed.| Prefix | Purpose |
|---|---|
/api/auth/* | Registration, login, OTP verification, and password reset |
/api/client/* | Job postings, contracts, payments, and reviews for clients |
/api/freelancer/* | Applications, active contracts, and wallet for freelancers |
/api/admin/* | User management, categories, escrow releases, and revenue |
/api/media/* | File uploads (images, videos) |
Auth endpoints
Register, log in, verify OTP, refresh tokens, and reset passwords.
Jobs endpoints
Post jobs, browse listings, and manage proposals.
Contracts endpoints
Create and manage contracts through their full lifecycle.
Payments endpoints
Handle escrow deposits, releases, and refunds via Stripe.
Freelancer endpoints
Manage freelancer profiles, applications, and wallet.
Admin endpoints
Oversee users, categories, escrow, and platform revenue.
Authentication
Protected endpoints require a valid JWT access token. You can send the token in one of two ways:- Authorization header —
Authorization: Bearer <accessToken> - HttpOnly cookie — the
refreshTokencookie is set automatically on login and used to issue new access tokens
Request format
SetContent-Type: application/json on all requests that include a body.
HTTP methods
The API uses standard HTTP methods:| Method | Usage |
|---|---|
GET | Retrieve a resource or list |
POST | Create a resource or trigger an action |
PUT | Replace a resource |
PATCH | Partially update a resource |
DELETE | Remove a resource |
Response format
All responses return JSON. Successful responses include relevant data at the top level:Error responses
Errors follow a consistent shape across all endpoints:| Code | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — missing, expired, or invalid token |
403 | Forbidden — valid token but insufficient role |
404 | Not found — resource does not exist |
409 | Conflict — resource already exists (e.g., duplicate email) |
500 | Internal server error |
CORS
The API allows cross-origin requests from the URL configured in theCLIENT_URL environment variable on the server. If you are calling the API from a browser on a different origin, ensure the backend CLIENT_URL is set to your frontend’s domain.
Allowed headers: Content-Type, Authorization
Allowed methods: GET, POST, PUT, PATCH, DELETE
Credentials (cookies) are supported — the API sets credentials: true in its CORS configuration.
