basePath: / definitions: dto.AuthResponse: properties: token: type: string user: $ref: '#/definitions/dto.UserResponse' type: object dto.CompanyResponse: properties: created_at: type: string id: type: string name: type: string status: type: string type: object dto.CreateApplicationRequest: properties: documents: additionalProperties: true type: object email: type: string jobId: type: integer lineId: type: string message: type: string name: type: string phone: type: string resumeUrl: type: string userId: type: integer whatsapp: type: string required: - jobId type: object dto.CreateCompanyRequest: properties: address: type: string cityId: type: integer description: type: string document: type: string email: type: string logoUrl: type: string name: maxLength: 255 minLength: 3 type: string phone: type: string regionId: type: integer slug: maxLength: 255 minLength: 3 type: string type: type: string website: type: string required: - name - slug type: object dto.CreateJobRequest: properties: benefits: additionalProperties: true type: object cityId: type: integer companyId: type: integer description: minLength: 20 type: string employmentType: enum: - full-time - part-time - dispatch - contract type: string languageLevel: type: string location: type: string regionId: type: integer requirements: additionalProperties: true type: object salaryMax: type: number salaryMin: type: number salaryType: enum: - hourly - monthly - yearly type: string status: enum: - draft - open - closed type: string title: maxLength: 255 minLength: 5 type: string visaSupport: type: boolean workingHours: type: string required: - companyId - description - title type: object dto.CreateUserRequest: properties: email: type: string name: type: string password: type: string roles: description: e.g. ["RECRUITER"] items: type: string type: array type: object dto.LoginRequest: properties: identifier: minLength: 3 type: string password: minLength: 8 type: string required: - identifier - password type: object dto.PaginatedResponse: properties: data: {} pagination: $ref: '#/definitions/dto.Pagination' type: object dto.Pagination: properties: limit: type: integer page: type: integer total: type: integer type: object dto.UpdateApplicationStatusRequest: properties: notes: type: string status: enum: - pending - reviewed - shortlisted - rejected - hired type: string required: - status type: object dto.UpdateJobRequest: properties: benefits: additionalProperties: true type: object cityId: type: integer description: minLength: 20 type: string employmentType: enum: - full-time - part-time - dispatch - contract type: string languageLevel: type: string location: type: string regionId: type: integer requirements: additionalProperties: true type: object salaryMax: type: number salaryMin: type: number salaryType: enum: - hourly - monthly - yearly type: string status: enum: - draft - open - closed type: string title: maxLength: 255 minLength: 5 type: string visaSupport: type: boolean workingHours: type: string type: object dto.UserResponse: properties: created_at: type: string email: type: string id: type: string name: type: string roles: items: type: string type: array status: type: string type: object handlers.DownloadURLRequest: properties: key: type: string type: object handlers.DownloadURLResponse: properties: downloadUrl: type: string expiresIn: description: seconds type: integer type: object handlers.UploadURLRequest: properties: contentType: type: string filename: type: string folder: description: 'Optional: logos, resumes, documents' type: string type: object handlers.UploadURLResponse: properties: expiresIn: description: seconds type: integer key: type: string publicUrl: type: string uploadUrl: type: string type: object models.Application: properties: createdAt: description: Metadata type: string documents: allOf: - $ref: '#/definitions/models.JSONMap' description: Array of {type, url} email: type: string id: type: integer jobId: type: integer lineId: type: string message: description: Application Content type: string name: description: Applicant Info (for guest applications) type: string notes: type: string phone: type: string resumeUrl: type: string status: description: Status & Notes type: string updatedAt: type: string userId: description: NULL for guest applications type: integer whatsapp: type: string type: object models.JSONMap: additionalProperties: true type: object models.Job: properties: benefits: $ref: '#/definitions/models.JSONMap' cityId: type: integer companyId: type: integer createdAt: description: Metadata type: string createdBy: type: integer description: type: string employmentType: description: Employment type: string id: type: integer isFeatured: description: Featured job flag type: boolean languageLevel: description: N5-N1, beginner, none type: string location: description: Location type: string regionId: type: integer requirements: allOf: - $ref: '#/definitions/models.JSONMap' description: Requirements & Benefits (JSONB arrays) salaryMax: type: number salaryMin: description: Salary type: number salaryType: description: hourly, monthly, yearly type: string status: description: Status type: string title: description: Job Details type: string updatedAt: type: string visaSupport: description: Visa & Language type: boolean workingHours: type: string type: object info: contact: {} description: API for GoHorseJobs recruitment platform. title: GoHorseJobs API version: "1.0" paths: /api/v1/auth/login: post: consumes: - application/json description: Authenticates a user by email and password. Returns JWT and user info. parameters: - description: Login Credentials in: body name: login required: true schema: $ref: '#/definitions/dto.LoginRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/dto.AuthResponse' "400": description: Invalid Request schema: type: string "401": description: Unauthorized schema: type: string summary: User Login tags: - Auth /api/v1/companies: get: consumes: - application/json description: Returns a list of all companies. produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/dto.CompanyResponse' type: array "500": description: Internal Server Error schema: type: string summary: List Companies tags: - Companies post: consumes: - application/json description: Registers a new company and creates an initial admin user. parameters: - description: Company Details in: body name: company required: true schema: $ref: '#/definitions/dto.CreateCompanyRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/dto.CompanyResponse' "400": description: Invalid Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Create Company (Tenant) tags: - Companies /api/v1/storage/download-url: post: consumes: - application/json description: Generate a pre-signed URL to download a private file from S3 parameters: - description: Download request in: body name: request required: true schema: $ref: '#/definitions/handlers.DownloadURLRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.DownloadURLResponse' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string security: - BearerAuth: [] summary: Generate download URL tags: - Storage /api/v1/storage/files: delete: consumes: - application/json description: Delete a stored file by key parameters: - description: File key in: query name: key required: true type: string produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string security: - BearerAuth: [] summary: Delete file tags: - Storage /api/v1/storage/upload-url: post: consumes: - application/json description: Generate a pre-signed URL to upload a file to S3 parameters: - description: Upload request in: body name: request required: true schema: $ref: '#/definitions/handlers.UploadURLRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/handlers.UploadURLResponse' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string security: - BearerAuth: [] summary: Generate upload URL tags: - Storage /api/v1/users: get: consumes: - application/json description: Returns a list of users belonging to the authenticated tenant. produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/dto.UserResponse' type: array "403": description: Forbidden schema: type: string "500": description: Internal Server Error schema: type: string security: - BearerAuth: [] summary: List Users tags: - Users post: consumes: - application/json description: Creates a new user under the current tenant. Requires Admin role. parameters: - description: User Details in: body name: user required: true schema: $ref: '#/definitions/dto.CreateUserRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/dto.UserResponse' "400": description: Invalid Request schema: type: string "403": description: Forbidden schema: type: string "500": description: Internal Server Error schema: type: string security: - BearerAuth: [] summary: Create User tags: - Users /api/v1/users/{id}: delete: consumes: - application/json description: Deletes a user by ID. Must belong to the same tenant. parameters: - description: User ID in: path name: id required: true type: string produces: - application/json responses: "200": description: User deleted schema: type: string "403": description: Forbidden schema: type: string "500": description: Internal Server Error schema: type: string security: - BearerAuth: [] summary: Delete User tags: - Users /applications: get: consumes: - application/json description: List all applications for a job parameters: - description: Filter applications by job ID in: query name: jobId required: true type: integer produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/models.Application' type: array "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: List Applications tags: - Applications post: consumes: - application/json description: Submit a new job application for a posting parameters: - description: Application data in: body name: application required: true schema: $ref: '#/definitions/dto.CreateApplicationRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/models.Application' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Create Application tags: - Applications /applications/{id}: get: consumes: - application/json description: Retrieve a job application by its ID parameters: - description: Application ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.Application' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string summary: Get Application tags: - Applications /applications/{id}/status: put: consumes: - application/json description: Update the status of a job application parameters: - description: Application ID in: path name: id required: true type: integer - description: Status update in: body name: body required: true schema: $ref: '#/definitions/dto.UpdateApplicationStatusRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.Application' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Update Application Status tags: - Applications /jobs: get: consumes: - application/json description: Get a paginated list of job postings with optional filters parameters: - description: 'Page number (default: 1)' in: query name: page type: integer - description: 'Items per page (default: 10, max: 100)' in: query name: limit type: integer - description: Filter by company ID in: query name: companyId type: integer - description: Filter by featured status in: query name: featured type: boolean produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/dto.PaginatedResponse' "500": description: Internal Server Error schema: type: string summary: List all jobs tags: - Jobs post: consumes: - application/json description: Create a new job posting parameters: - description: Job data in: body name: job required: true schema: $ref: '#/definitions/dto.CreateJobRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/models.Job' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Create a new job tags: - Jobs /jobs/{id}: delete: consumes: - application/json description: Delete a job posting parameters: - description: Job ID in: path name: id required: true type: integer produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Delete a job tags: - Jobs get: consumes: - application/json description: Get a single job posting by its ID parameters: - description: Job ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.Job' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string summary: Get job by ID tags: - Jobs put: consumes: - application/json description: Update an existing job posting parameters: - description: Job ID in: path name: id required: true type: integer - description: Updated job data in: body name: job required: true schema: $ref: '#/definitions/dto.UpdateJobRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.Job' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Update a job tags: - Jobs swagger: "2.0"