REST API
Use the versioned REST API to build custom integrations and automation workflows.
Shocking Energy provides a versioned REST API at /v1 for building custom integrations, dashboards, and automation workflows. The API uses JSON and standard HTTP conventions.
Base URL
https://api.jobway.ai/v1For local development:
http://localhost:3003/v1Authentication
All API requests require a Bearer token in the Authorization header:
curl https://api.jobway.ai/v1/jobs \
-H "Authorization: Bearer YOUR_API_KEY"Two token types are accepted:
| Token type | Format | How to obtain |
|---|---|---|
| API key | se_* | Create in Settings > Developer > API Keys |
| OAuth token | se_oauth_* | Via the OAuth flow |
API documentation
Interactive API documentation (Swagger UI) is available at:
https://api.jobway.ai/v1/docsThe documentation is auto-generated from the API's OpenAPI specification and includes request/response schemas, parameter descriptions, and example values.
Endpoints overview
Jobs
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/jobs | jobs.read | List jobs with filters |
GET | /v1/jobs/:id | jobs.read | Get a specific job |
POST | /v1/jobs | jobs.write | Create a new job |
POST | /v1/jobs/:id/cancel | jobs.write | Cancel a job |
POST | /v1/jobs/:id/assign | jobs.write | Assign engineer |
POST | /v1/jobs/:id/start | jobs.write | Start a job |
POST | /v1/jobs/:id/complete | jobs.write | Complete a job |
Flows
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/flows/groups | flows.read | List flow groups |
GET | /v1/flows/:id | flows.read | Get flow details |
POST | /v1/flows/:id/regenerate | flows.write | Regenerate flow |
POST | /v1/flows/:id/resend | flows.write | Resend flow |
Assets
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/assets | assets.read | List assets with filters |
GET | /v1/assets/:id | assets.read | Get a specific asset |
GET | /v1/assets/filter-options | assets.read | Get filter metadata |
GET | /v1/assets/:id/history | assets.read | List asset history |
POST | /v1/assets | assets.write | Create asset |
POST | /v1/assets/:id/update | assets.write | Update asset |
POST | /v1/assets/:id/archive | assets.write | Archive asset |
POST | /v1/assets/:id/history/restore | assets.write | Restore asset snapshot |
Projects
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/projects | projects.read | List projects |
GET | /v1/projects/:id | projects.read | Get project details |
GET | /v1/project-templates | projects.read | List project templates |
GET | /v1/clients | projects.read | List clients |
GET | /v1/sites | projects.read | List sites |
POST | /v1/projects | projects.write | Create project |
POST | /v1/projects/revisions/create | projects.write | Create revision |
POST | /v1/projects/jobs/add | projects.write | Link job to project |
POST | /v1/project-templates | projects.write | Create project template |
POST | /v1/clients | projects.write | Create client |
POST | /v1/sites | projects.write | Create site |
Invoices
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/invoices | invoices.read | List invoices |
GET | /v1/invoices/:id | invoices.read | Get invoice details |
GET | /v1/invoices/defaults | invoices.read | Get draft defaults |
GET | /v1/invoicing/profile | invoices.read | Get invoicing profile |
GET | /v1/invoicing/contracts | invoices.read | List contracts |
GET | /v1/invoicing/rates | invoices.read | List rates |
POST | /v1/invoices/draft | invoices.write | Upsert draft invoice |
POST | /v1/invoices/finalize | invoices.write | Finalize invoice |
POST | /v1/invoices/approve | invoices.write | Approve invoice |
POST | /v1/invoicing/profile/upsert | invoices.write | Upsert invoicing profile |
POST | /v1/invoicing/contracts | invoices.write | Create contract |
POST | /v1/invoicing/rates | invoices.write | Create rate |
POST | /v1/invoicing/template/upsert | invoices.write | Upsert invoice template |
Team
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/team | team.read | Get team info |
Search
| Method | Endpoint | Scope | Description |
|---|---|---|---|
POST | /v1/search | search.read | Search across team data |
Metrics
| Method | Endpoint | Scope | Description |
|---|---|---|---|
GET | /v1/metrics/jobs | metrics.read | Job metrics |
GET | /v1/metrics/flows | metrics.read | Flow metrics |
See the interactive API documentation for the complete list of endpoints, request parameters, and response schemas.
Request format
Query parameters
List endpoints support filtering via query parameters:
curl "https://api.jobway.ai/v1/jobs?status=PENDING&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"Request body
Write endpoints accept JSON request bodies:
curl -X POST https://api.jobway.ai/v1/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jobTypeId": "123e4567-e89b-12d3-a456-426614174000",
"scheduledDate": "2026-03-15",
"notes": "Annual service visit"
}'Response format
Success responses
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "PENDING",
"scheduledDate": "2026-03-15"
}
}List endpoints return an array:
{
"data": [
{ "id": "...", "status": "PENDING" },
{ "id": "...", "status": "COMPLETED" }
]
}Error responses
{
"status": "error",
"message": "Bad Request",
"request_id": "req_abc123",
"error": {
"name": "BadRequestError",
"issues": [
{
"message": "Invalid date format",
"path": "scheduledDate"
}
]
}
}HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request (validation error) |
401 | Unauthorized (invalid or missing token) |
403 | Forbidden (insufficient scope) |
404 | Not found |
429 | Rate limited |
500 | Server error |
Rate limiting
API requests are rate-limited to protect the service. When you exceed the limit, you receive a 429 response. Back off and retry after the time indicated in the Retry-After header.
MCP vs REST API
Both the MCP endpoint and REST API provide access to the same team data. Choose based on your use case:
| Feature | MCP (/mcp) | REST API (/v1) |
|---|---|---|
| Protocol | MCP (JSON-RPC over HTTP) | REST (standard HTTP) |
| Best for | AI assistants (Claude, Cursor) | Custom integrations, scripts |
| Tools | Discoverable via tools/list | Fixed endpoints |
| Resources | Static data via resources/read | Standard GET endpoints |
| Prompts | Analysis templates via prompts/get | Not available |
| Auth | API key or OAuth | API key or OAuth |
| Scopes | Same scope system | Same scope system |
Both use the same authentication and scope system. An API key works for both MCP and REST API access.