Sureshake Documentation

API Reference

Complete API documentation for the Sureshake hiring system.

Hiring API Reference

Complete API reference for the Sureshake hiring system. All endpoints are available via both TRPC (for internal clients) and REST (via OpenAPI).

Base URL: https://api.sureshake.com/api/v1

Authentication

All endpoints require authentication via Bearer token:

curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/...

Access Levels

LevelDescription
PublicNo authentication required
AuthenticatedAny logged-in user
Entity MemberMust be team member of the entity
Entity AdminMust have manage_hiring_roles permission

Role Management

Search Public Roles

Search and browse published public roles.

GET /hiring/roles

Access: Public

Query Parameters:

ParameterTypeDefaultDescription
searchstring-Search in title and description
locationstring-Filter by location
remotePolicyenum-remote, hybrid, or onsite
entityIduuid-Filter by entity
limitnumber20Results per page (1-100)
offsetnumber0Pagination offset

Get Role Details

GET /hiring/roles/{roleId}

Access: Authenticated (public/unlisted roles) or Entity Member (private roles)

Create Role

POST /entities/{entityId}/hiring/roles

Access: Entity Admin (manage_hiring_roles permission)

Request Body:

{
  "title": "string (required)",
  "description": "string | null",
  "location": "string | null",
  "remotePolicy": "remote | hybrid | onsite | null",
  "salaryRange": {
    "min": "number",
    "max": "number",
    "currency": "string",
    "period": "yearly | monthly | hourly"
  },
  "visibility": "public | unlisted | private",
  "problemSpecs": [...],
  "rubric": {...}
}

Update Role

PUT /entities/{entityId}/hiring/roles/{roleId}

Access: Entity Admin

Publish Role

POST /entities/{entityId}/hiring/roles/{roleId}/publish

Access: Entity Admin

Role must be in draft status and have a title to publish.

Close Role

POST /entities/{entityId}/hiring/roles/{roleId}/close

Access: Entity Admin

List Entity Roles

GET /entities/{entityId}/hiring/roles

Access: Entity Member

Bookmarks

Add Bookmark

POST /hiring/roles/{roleId}/bookmark

Remove Bookmark

DELETE /hiring/roles/{roleId}/bookmark

List Bookmarks

GET /hiring/roles/bookmarks

Applications (Candidate)

Apply to Role

POST /hiring/roles/{roleId}/apply

Access: Authenticated

Request Body:

{
  "coverLetter": "string | null",
  "portfolioItemIds": ["uuid"],
  "answers": [
    {
      "problemSpecId": "string",
      "content": "string"
    }
  ]
}

List My Applications

GET /hiring/applications/mine

Get Application

GET /hiring/applications/{applicationId}

Withdraw Application

POST /hiring/applications/{applicationId}/withdraw

Applications (Recruiter)

List Applications for Role

GET /entities/{entityId}/hiring/roles/{roleId}/applications

Access: Entity Member (with review_applications permission)

Get Application Detail

GET /entities/{entityId}/hiring/applications/{applicationId}

Update Application Status

PUT /entities/{entityId}/hiring/applications/{applicationId}/status

Request Body:

{
  "status": "reviewing | evaluated | hired | rejected"
}

Valid Transitions:

  • submittedreviewing
  • reviewingevaluated
  • evaluatedhired or rejected

Record Outcome

POST /entities/{entityId}/hiring/applications/{applicationId}/outcome

Request Body:

{
  "decision": "hired | rejected | withdrawn",
  "startDate": "ISO8601 | null",
  "notes": "string | null"
}

AI Matching

GET /hiring/roles/recommended

Access: Authenticated

Query Parameters:

ParameterTypeDefaultDescription
limitnumber20Max results (1-50)
minScorenumber0Minimum match score (0-1)
includePreferredbooleantrueInclude preferred skills
includeNiceToHavebooleanfalseInclude nice-to-have skills

Get Candidate Matches

GET /entities/{entityId}/hiring/roles/{roleId}/matches

Access: Entity Member

Get Match Details

GET /hiring/roles/{roleId}/match

Access: Authenticated

Get My Skills

GET /hiring/my-skills

Get Role Skills

GET /hiring/roles/{roleId}/skills

Feedback

Create Feedback

POST /entities/{entityId}/hiring/applications/{applicationId}/feedback

Request Body:

{
  "overallScore": "number (1-5)",
  "dimensionScores": [
    {
      "dimensionId": "string",
      "score": "number",
      "comments": "string | null"
    }
  ],
  "strengths": ["string"],
  "gaps": ["string"],
  "recommendation": "strong_yes | yes | consider | no | strong_no"
}

Get Feedback

GET /entities/{entityId}/hiring/applications/{applicationId}/feedback

Common Schemas

Salary Range

{
  "min": "number",
  "max": "number",
  "currency": "string (ISO 4217)",
  "period": "yearly | monthly | hourly"
}

Problem Specification

{
  "id": "string",
  "prompt": "string (max 1000 chars)",
  "successCriteria": "string | null",
  "orderIndex": "number"
}

Evaluation Rubric

{
  "version": "number",
  "dimensions": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "weight": "number (0-1)",
      "scaleMin": "number",
      "scaleMax": "number"
    }
  ]
}

Weights should sum to 1.0 for proper score calculation.

Status Enums

Application Status

StatusDescription
submittedApplication received
reviewingUnder active review
evaluatedEvaluation completed
hiredCandidate accepted offer
rejectedApplication declined
withdrawnCandidate withdrew

Role Status

StatusDescription
draftNot yet published
publishedAccepting applications
closedNo longer accepting applications

Visibility

LevelDescription
publicVisible in public search
unlistedAccessible via direct link
privateEntity members only

Error Codes

CodeHTTPDescription
BAD_REQUEST400Invalid input or parameters
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
CONFLICT409Resource conflict (e.g., duplicate application)

Example Error Response

{
  "error": {
    "code": "BAD_REQUEST",
    "message": "You have already applied to this role"
  }
}

Rate Limits

Endpoint CategoryRate Limit
Read operations100 req/min
Write operations20 req/min
AI Matching10 req/min

OpenAPI Specification

The complete OpenAPI specification is available at:

  • Swagger UI: https://api.sureshake.com/api/docs
  • OpenAPI JSON: https://api.sureshake.com/api/openapi.json

On this page