Backend API
Trials API
Trial period management for evaluating candidates before hiring
Overview
The Trials API manages trial periods where candidates work on real tasks before a final hiring decision. This is a key differentiator of the Hireable platform.
Endpoints
| Method | Endpoint | Description | Permission |
|---|---|---|---|
| GET | /api/trials | List trials | trials:read |
| GET | /api/trials/:id | Get trial details | trials:read |
| POST | /api/trials | Create trial | trials:write |
| PATCH | /api/trials/:id | Update trial | trials:manage |
| POST | /api/trials/:id/tasks | Add task | trials:manage |
| PATCH | /api/trials/:id/tasks/:taskId | Update task | trials:read |
| POST | /api/trials/:id/feedback | Submit feedback | trials:manage |
Trial Status Flow
| Status | Description |
|---|---|
scheduled | Trial dates set, not yet started |
active | Trial in progress |
completed | Trial finished, feedback submitted |
cancelled | Trial cancelled |
List Trials
Get trials with optional filters.
Request
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
jobId | string | Filter by job |
page | number | Page number |
limit | number | Items per page |
Response
Get Trial Details
Get detailed information about a specific trial.
Request
Response
Create Trial
Create a new trial for a candidate (employer only).
Request
Response
Update Trial
Update trial status or dates.
Request
Response
Add Task
Add a new task to an active trial.
Request
Response
Update Task
Mark a task as completed (talent) or update details (employer).
Request (Talent - Complete Task)
Response
Submit Feedback
Submit final feedback after trial completion (employer only).
Request
Response
Types
Frontend Integration
Permission Matrix
| Action | ADMIN | EMPLOYER | TALENT |
|---|---|---|---|
| View trials | ✓ | ✓ (own) | ✓ (own) |
| Create trial | ✓ | ✓ | - |
| Update trial | ✓ | ✓ (own) | - |
| Add tasks | ✓ | ✓ (own) | - |
| Complete tasks | ✓ | - | ✓ (own) |
| Submit feedback | ✓ | ✓ (own) | - |