Repository navigation
API Docs
This document outlines the API endpoints required for the Career Sync platform based on the user stories.
https://api.careersync.com/v1
Most endpoints require authentication using Bearer tokens for company managers.
Authorization: Bearer <access_token>
Get all public job postings with optional filtering and searching.
Query Parameters:
-
search(string, optional): Search by keywords in title/description -
location(string, optional): Filter by job location -
company_id(string, optional): Filter by specific company -
page(integer, optional): Page number for pagination (default: 1) -
limit(integer, optional): Number of items per page (default: 20)
Response:
{
"data": [
{
"id": "job_123",
"title": "Senior Software Engineer",
"description": "We are looking for...",
"requirements": "5+ years experience...",
"location": "New York, NY",
"company": {
"id": "company_456",
"name": "TechCorp Inc.",
"description": "Leading software company",
"logo": "https://example.com/logo.jpg"
},
"application_method": {
"type": "email", // or "external"
"value": "jobs@techcorp.com" // or external URL
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_items": 98,
"items_per_page": 20
}
}Get detailed information about a specific job posting.
Response:
{
"data": {
"id": "job_123",
"title": "Senior Software Engineer",
"description": "We are looking for...",
"requirements": "5+ years experience...",
"location": "New York, NY",
"company": {
"id": "company_456",
"name": "TechCorp Inc.",
"description": "Leading software company",
"logo": "https://example.com/logo.jpg"
},
"application_method": {
"type": "email",
"value": "jobs@techcorp.com"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
}Get public information about a specific company.
Response:
{
"data": {
"id": "company_456",
"name": "TechCorp Inc.",
"description": "Leading software company specializing in...",
"logo": "https://example.com/logo.jpg",
"website": "https://techcorp.com",
"location": "New York, NY"
}
}Register a new company manager account.
Request Body:
{
"email": "manager@company.com",
"password": "securepassword123",
"first_name": "John",
"last_name": "Doe",
"company_name": "My Company Inc."
}Response:
{
"data": {
"user": {
"id": "user_123",
"email": "manager@company.com",
"first_name": "John",
"last_name": "Doe"
},
"company": {
"id": "company_456",
"name": "My Company Inc."
},
"access_token": "jwt_token_here",
"refresh_token": "refresh_token_here"
}
}Login with existing credentials.
Request Body:
{
"email": "manager@company.com",
"password": "securepassword123"
}Response:
{
"data": {
"user": {
"id": "user_123",
"email": "manager@company.com",
"first_name": "John",
"last_name": "Doe"
},
"company": {
"id": "company_456",
"name": "My Company Inc."
},
"access_token": "jwt_token_here",
"refresh_token": "refresh_token_here"
}
}Refresh access token using refresh token.
Request Body:
{
"refresh_token": "refresh_token_here"
}Response:
{
"data": {
"access_token": "new_jwt_token_here",
"refresh_token": "new_refresh_token_here"
}
}Get current user's company information.
Headers: Authorization: Bearer <token>
Response:
{
"data": {
"id": "company_456",
"name": "My Company Inc.",
"description": "We are a leading company in...",
"logo": "https://example.com/logo.jpg",
"website": "https://mycompany.com",
"location": "San Francisco, CA"
}
}Update current user's company information.
Headers: Authorization: Bearer <token>
Request Body:
{
"name": "Updated Company Name",
"description": "Updated company description...",
"logo": "https://example.com/new-logo.jpg",
"website": "https://updatedcompany.com",
"location": "Austin, TX"
}Response:
{
"data": {
"id": "company_456",
"name": "Updated Company Name",
"description": "Updated company description...",
"logo": "https://example.com/new-logo.jpg",
"website": "https://updatedcompany.com",
"location": "Austin, TX"
}
}Get all job postings for a specific company.
Path Parameters:
-
company_id(string, required): The company ID
Headers: Authorization: Bearer <token> (required if accessing private company data)
Query Parameters:
-
status(string, optional): Filter by status ('published', 'draft', 'all') -
page(integer, optional): Page number for pagination -
limit(integer, optional): Number of items per page
Response:
{
"data": [
{
"id": "job_123",
"title": "Senior Software Engineer",
"description": "We are looking for...",
"requirements": "5+ years experience...",
"location": "New York, NY",
"application_method": {
"type": "email",
"value": "jobs@company.com"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"current_page": 1,
"total_pages": 3,
"total_items": 12,
"items_per_page": 20
}
}Create a new job posting for a specific company.
Path Parameters:
-
company_id(string, required): The company ID
Headers: Authorization: Bearer <token>
Request Body:
{
"title": "Senior Software Engineer",
"description": "We are looking for an experienced...",
"requirements": "5+ years of experience in...",
"location": "Remote",
"application_method": {
"type": "email",
"value": "careers@company.com"
},
"published": false
}Response:
{
"data": {
"id": "job_789",
"title": "Senior Software Engineer",
"description": "We are looking for an experienced...",
"requirements": "5+ years of experience in...",
"location": "Remote",
"application_method": {
"type": "email",
"value": "careers@company.com"
},
"published": false,
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T14:30:00Z"
}
}Get a specific job posting for a specific company.
Path Parameters:
-
company_id(string, required): The company ID -
job_id(string, required): The job ID
Headers: Authorization: Bearer <token> (required if accessing private job data)
Response:
{
"data": {
"id": "job_123",
"title": "Senior Software Engineer",
"description": "We are looking for...",
"requirements": "5+ years experience...",
"location": "New York, NY",
"application_method": {
"type": "email",
"value": "jobs@company.com"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
}Update a specific job posting for a specific company.
Path Parameters:
-
company_id(string, required): The company ID -
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Request Body:
{
"title": "Updated Job Title",
"description": "Updated job description...",
"requirements": "Updated requirements...",
"location": "Updated Location",
"application_method": {
"type": "external",
"value": "https://company.com/apply"
},
"published": true
}Response:
{
"data": {
"id": "job_123",
"title": "Updated Job Title",
"description": "Updated job description...",
"requirements": "Updated requirements...",
"location": "Updated Location",
"application_method": {
"type": "external",
"value": "https://company.com/apply"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T16:45:00Z"
}
}Delete a specific job posting for a specific company.
Path Parameters:
-
company_id(string, required): The company ID -
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Response:
{
"message": "Job posting deleted successfully"
}Publish or unpublish a job posting for a specific company.
Path Parameters:
-
company_id(string, required): The company ID -
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Request Body:
{
"published": true
}Response:
{
"data": {
"id": "job_123",
"published": true,
"updated_at": "2024-01-15T17:00:00Z"
}
}Get all job postings for the current user's company (convenience endpoint).
Headers: Authorization: Bearer <token>
Query Parameters:
-
status(string, optional): Filter by status ('published', 'draft', 'all') -
page(integer, optional): Page number for pagination -
limit(integer, optional): Number of items per page
Response:
{
"data": [
{
"id": "job_123",
"title": "Senior Software Engineer",
"description": "We are looking for...",
"requirements": "5+ years experience...",
"location": "New York, NY",
"application_method": {
"type": "email",
"value": "jobs@company.com"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"current_page": 1,
"total_pages": 3,
"total_items": 12,
"items_per_page": 20
}
}Create a new job posting for the current user's company (convenience endpoint).
Headers: Authorization: Bearer <token>
Request Body:
{
"title": "Senior Software Engineer",
"description": "We are looking for an experienced...",
"requirements": "5+ years of experience in...",
"location": "Remote",
"application_method": {
"type": "email",
"value": "careers@company.com"
},
"published": false
}Response:
{
"data": {
"id": "job_789",
"title": "Senior Software Engineer",
"description": "We are looking for an experienced...",
"requirements": "5+ years of experience in...",
"location": "Remote",
"application_method": {
"type": "email",
"value": "careers@company.com"
},
"published": false,
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T14:30:00Z"
}
}Get a specific job posting owned by the current user's company (convenience endpoint).
Path Parameters:
-
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Response:
{
"data": {
"id": "job_123",
"title": "Senior Software Engineer",
"description": "We are looking for...",
"requirements": "5+ years experience...",
"location": "New York, NY",
"application_method": {
"type": "email",
"value": "jobs@company.com"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
}Update a specific job posting owned by the current user's company (convenience endpoint).
Path Parameters:
-
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Request Body:
{
"title": "Updated Job Title",
"description": "Updated job description...",
"requirements": "Updated requirements...",
"location": "Updated Location",
"application_method": {
"type": "external",
"value": "https://company.com/apply"
},
"published": true
}Response:
{
"data": {
"id": "job_123",
"title": "Updated Job Title",
"description": "Updated job description...",
"requirements": "Updated requirements...",
"location": "Updated Location",
"application_method": {
"type": "external",
"value": "https://company.com/apply"
},
"published": true,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T16:45:00Z"
}
}Delete a specific job posting owned by the current user's company (convenience endpoint).
Path Parameters:
-
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Response:
{
"message": "Job posting deleted successfully"
}Publish or unpublish a job posting owned by the current user's company (convenience endpoint).
Path Parameters:
-
job_id(string, required): The job ID
Headers: Authorization: Bearer <token>
Request Body:
{
"published": true
}Response:
{
"data": {
"id": "job_123",
"published": true,
"updated_at": "2024-01-15T17:00:00Z"
}
}All endpoints return consistent error responses:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The provided data is invalid",
"details": [
{
"field": "email",
"message": "Email is required"
}
]
}
}-
200- Success -
201- Created -
400- Bad Request (validation errors) -
401- Unauthorized (invalid/missing token) -
403- Forbidden (insufficient permissions) -
404- Not Found -
422- Unprocessable Entity (business logic errors) -
500- Internal Server Error
- Public endpoints: 100 requests per minute per IP
- Authenticated endpoints: 1000 requests per minute per user
- Rate limit headers included in responses:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
The API supports CORS for web applications with appropriate headers configured for development and production domains.