Register Company
curl --request POST \
--url https://api.example.com/api/v1/auth/register/company \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"name": "<string>",
"industry": "<string>",
"size": "<string>",
"type": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/auth/register/company"
payload = {
"email": "<string>",
"password": "<string>",
"name": "<string>",
"industry": "<string>",
"size": "<string>",
"type": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
password: '<string>',
name: '<string>',
industry: '<string>',
size: '<string>',
type: '<string>'
})
};
fetch('https://api.example.com/api/v1/auth/register/company', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/auth/register/company",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'password' => '<string>',
'name' => '<string>',
'industry' => '<string>',
'size' => '<string>',
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/auth/register/company"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"size\": \"<string>\",\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/auth/register/company")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"size\": \"<string>\",\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/auth/register/company")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"size\": \"<string>\",\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"email": "<string>",
"role": "<string>"
},
"message": "<string>",
"meta": {
"timestamp": "<string>",
"path": "<string>",
"method": "<string>"
}
}Authentication
Register Company
Create a new company/employer account
POST
/
api
/
v1
/
auth
/
register
/
company
Register Company
curl --request POST \
--url https://api.example.com/api/v1/auth/register/company \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"name": "<string>",
"industry": "<string>",
"size": "<string>",
"type": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/auth/register/company"
payload = {
"email": "<string>",
"password": "<string>",
"name": "<string>",
"industry": "<string>",
"size": "<string>",
"type": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
password: '<string>',
name: '<string>',
industry: '<string>',
size: '<string>',
type: '<string>'
})
};
fetch('https://api.example.com/api/v1/auth/register/company', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/auth/register/company",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'password' => '<string>',
'name' => '<string>',
'industry' => '<string>',
'size' => '<string>',
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/auth/register/company"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"size\": \"<string>\",\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/auth/register/company")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"size\": \"<string>\",\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/auth/register/company")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"password\": \"<string>\",\n \"name\": \"<string>\",\n \"industry\": \"<string>\",\n \"size\": \"<string>\",\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"email": "<string>",
"role": "<string>"
},
"message": "<string>",
"meta": {
"timestamp": "<string>",
"path": "<string>",
"method": "<string>"
}
}Endpoint
POST /api/v1/auth/register/company
http://localhost:3000/api/v1
This endpoint is public and does not require authentication.
Request Body
string
required
Company’s email address. Must be unique and valid format.
string
required
Company account password. Minimum 6 characters.
string
required
Company name.
string
required
Industry sector (e.g., “Technology”, “Healthcare”, “Finance”).
string
required
Company size. Must be one of: -
SIZE_1_50 - 1-50 employees - SIZE_51_200 - 51-200 employees -
SIZE_201_1000 - 201-1,000 employees - SIZE_1000_PLUS - 1,000+ employeesstring
required
Company type. Must be one of: -
STARTUP - SCALE_UP - ENTERPRISE - NON_PROFIT -
GOVERNMENTRequest Shape
interface RegisterCompanyDto {
email: string;
password: string;
name: string;
industry: string;
size: CompanySize;
type: CompanyType;
}
Response
Success Response (201 Created)
interface RegisterCompanyResponse {
success: boolean;
data: {
email: string;
role: 'company';
};
message: string;
meta: {
timestamp: string;
path: string;
method: string;
};
}
{
"success": true,
"data": {
"email": "hr@techcorp.com",
"role": "company"
},
"message": "Company registration successful. Please check your email to verify your account.",
"meta": {
"timestamp": "2026-04-23T20:00:00.000Z",
"path": "/auth/register/company",
"method": "POST"
}
}
boolean
Indicates if the registration was successful.
object
string
Success message: “Company registration successful. Please check your email to verify your
account.”
object
What Happens After Registration
1
Company Account Created
Company account is created in database with: -
isVerified: false - isActive: true - All
optional fields set to null (description, logoUrl, etc.)2
Password Hashed
Password is securely hashed using bcrypt before storage
3
OTP Generated
A 6-digit OTP code is generated and stored in Redis (valid for 10 minutes)
4
Email Queued
Verification email with OTP is queued via BullMQ for async delivery
5
Next Step
Company must verify email using the Verify Email endpoint
Error Responses
400 Bad Request - Validation Error
Returned when request validation fails.{
"success": false,
"error": {
"message": [
"size must be one of the following values: SIZE_1_50, SIZE_51_200, SIZE_201_1000, SIZE_1000_PLUS",
"type must be one of the following values: STARTUP, SCALE_UP, ENTERPRISE, NON_PROFIT, GOVERNMENT"
],
"statusCode": 400,
"timestamp": "2026-04-23T20:00:00.000Z",
"path": "/auth/register/company",
"method": "POST",
"details": "Bad Request"
}
}
email must be an email- Invalid email formatpassword must be longer than or equal to 6 characters- Password too shortname should not be empty- Missing company nameindustry should not be empty- Missing industrysize must be one of the following values: ...- Invalid company sizetype must be one of the following values: ...- Invalid company type
409 Conflict - Email Already Exists
Returned when the email is already registered.{
"success": false,
"error": {
"message": "An account with this email already exists",
"statusCode": 409,
"timestamp": "2026-04-23T20:00:00.000Z",
"path": "/auth/register/company",
"method": "POST",
"details": "Conflict"
}
}
500 Internal Server Error
Returned when an unexpected error occurs.{
"success": false,
"error": {
"message": "Failed to create company",
"statusCode": 500,
"timestamp": "2026-04-23T20:00:00.000Z",
"path": "/auth/register/company",
"method": "POST",
"details": "Internal Server Error"
}
}
Error responses follow the global API envelope:
success: false and an error object containing
message, statusCode, timestamp, path, method, and details.Validation Rules
| Field | Type | Required | Rules |
|---|---|---|---|
| string | Yes | Must be valid email format, must be unique | |
| password | string | Yes | Minimum 6 characters |
| name | string | Yes | Must be non-empty string |
| industry | string | Yes | Must be non-empty string |
| size | CompanySize enum | Yes | Must be one of: SIZE_1_50, SIZE_51_200, SIZE_201_1000, SIZE_1000_PLUS |
| type | CompanyType enum | Yes | Must be one of: STARTUP, SCALE_UP, ENTERPRISE, NON_PROFIT, GOVERNMENT |
Enums Reference
Company Size
| Value | Description |
|---|---|
SIZE_1_50 | 1-50 employees |
SIZE_51_200 | 51-200 employees |
SIZE_201_1000 | 201-1,000 employees |
SIZE_1000_PLUS | 1,000+ employees |
Company Type
| Value | Description |
|---|---|
STARTUP | Early-stage startup company |
SCALE_UP | Growing company scaling operations |
ENTERPRISE | Large established corporation |
NON_PROFIT | Non-profit organization |
GOVERNMENT | Government agency or public sector |
TypeScript Types
// Enums
export enum CompanySize {
SIZE_1_50 = 'SIZE_1_50',
SIZE_51_200 = 'SIZE_51_200',
SIZE_201_1000 = 'SIZE_201_1000',
SIZE_1000_PLUS = 'SIZE_1000_PLUS',
}
export enum CompanyType {
STARTUP = 'STARTUP',
SCALE_UP = 'SCALE_UP',
ENTERPRISE = 'ENTERPRISE',
NON_PROFIT = 'NON_PROFIT',
GOVERNMENT = 'GOVERNMENT',
}
// Registration DTO
export interface RegisterCompanyDto {
email: string;
password: string;
name: string;
industry: string;
size: CompanySize;
type: CompanyType;
}
// Response
export interface RegisterCompanyResponse {
success: boolean;
data: {
email: string;
};
message: string;
meta: {
timestamp: string;
path: string;
method: string;
};
}
Notes
Email Verification Required: Companies cannot login until they verify their email using the
OTP sent to their inbox.
OTP Expiration: The verification OTP expires after 10 minutes. If expired, companies will need
to request a new OTP.
Use Company Email: It’s recommended to use an official company email address (e.g.,
hr@company.com) rather than personal email addresses.
Related Endpoints
- Verify Email - Verify email with OTP after registration
- Login - Login to existing account
- Register Job Seeker - Register as a job seeker instead
