Topolo Docs Topolo Platform
Open workspace

Get a role

Read one role with its pipeline stages (in order). New applications land in the first stage of kind applied.

Outcome

Read one role with its pipeline stages (in order). New applications land in the first stage of kind applied.

Before you start

  • Verify identity and the pinned organization context, then discover the exact action and a granted Recruit workspace.
  • The required application permission is workspace:read. Hiring-team roles and record visibility are enforced separately; a workspace grant alone does not grant every Recruit action.
  • Organization and workspace identity come from verified context. Pass the workspace as resourceType/resourceId, separate from action input; request-body organizationId/workspaceId values cannot select an authorized scope.
  • The first authorized action can initialize an identity-only workspace mirror and invoke the configured workspace-created callback. It does not create an Auth workspace or grant new access.

Recruiters can perform the full hiring workflow. Hiring managers see their managed roles and candidates; interviewers see assigned interviews and their candidates. Workspace owners and organization administrators act as recruiters. Use team.me to read the caller's effective role and allowed actions.

Discover the target

topolo whoami --json
topolo actions get app_topolo_recruit.roles.get --detail --json
topolo resources topolo-recruit --json
topolo workspaces list topolo-recruit --json
topolo actions get app_topolo_recruit.team.me --detail --json
topolo actions get app_topolo_recruit.roles.list --detail --json

Request

GET /api/roles/{id}

Save input as payload.json. CLI and MCP action input includes path identifiers. The reviewed plan separates path/query fields from the HTTP body. Set RECRUIT_WORKSPACE_ID from granted resource discovery.

Inspect and test this action in the signed action console. Use its discovered schema and plan; a test response still requires the verification described below.

Input fields

FieldRequiredTypeConstraints
idRequiredstringRole id from roles.list. {"minLength":1,"maxLength":64}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Effects

  • Reads one role without changing state.

Interpret the response

Confirm $.role.id equals the requested id.

The response identifier path is $.role.id for role. Lists may be empty; an empty list is not a discovered target.

Exact success schema:

{
  "type": "object",
  "required": [
    "role"
  ],
  "properties": {
    "role": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "team": {
          "type": [
            "string",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        },
        "remotePolicy": {
          "enum": [
            "onsite",
            "hybrid",
            "remote"
          ]
        },
        "employmentType": {
          "enum": [
            "full_time",
            "part_time",
            "contract",
            "temporary",
            "internship"
          ]
        },
        "salaryMin": {
          "type": [
            "integer",
            "null"
          ]
        },
        "salaryMax": {
          "type": [
            "integer",
            "null"
          ]
        },
        "salaryCurrency": {
          "type": [
            "string",
            "null"
          ]
        },
        "salaryPeriod": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "year",
            "month",
            "hour",
            null
          ]
        },
        "description": {
          "type": "string"
        },
        "questions": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "hiringManagerUserId": {
          "type": [
            "string",
            "null"
          ]
        },
        "requiresApproval": {
          "type": "boolean"
        },
        "status": {
          "enum": [
            "draft",
            "pending_approval",
            "open",
            "paused",
            "closed"
          ]
        },
        "approvedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "approvedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "openedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "closedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "type": "integer"
        },
        "createdBy": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "stages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "scorecardCriteria": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}

Worked examples

Actual dispatcher and migration-created SQLite or Worker handlers; Auth/workspace identity, object storage, mail and Notify dependencies are simulated. These synthetic fixtures establish no live authorization or delivery. A synthetic fixture identifier grants no access. Validate and inspect the planned request before executing. Commands with --confirm or MCP confirm:true assume the intended effect or data export has already been authorized.

Successful request

Actual dispatcher and migration-created SQLite; verified Auth/workspace context, object storage, mail and Notify dependencies are simulated. No live delivery or credential authorization is established. This complete response is a local fixture, not a deployed or delivered result.

Input · payload.json:

{
  "id": "role_fafa9ca8d9e64593bb9b9edffb0f3745"
}

CLI:

topolo actions validate app_topolo_recruit.roles.get --data @payload.json --json
topolo actions plan app_topolo_recruit.roles.get --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_recruit.roles.get --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_recruit.roles.get",
    "input": {
      "id": "role_fafa9ca8d9e64593bb9b9edffb0f3745"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "role": {
    "id": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
    "slug": "designer",
    "title": "Designer",
    "team": null,
    "location": null,
    "remotePolicy": "onsite",
    "employmentType": "full_time",
    "salaryMin": null,
    "salaryMax": null,
    "salaryCurrency": null,
    "salaryPeriod": null,
    "description": "",
    "questions": [],
    "hiringManagerUserId": null,
    "requiresApproval": false,
    "status": "draft",
    "approvedBy": null,
    "approvedAt": null,
    "openedAt": null,
    "closedAt": null,
    "version": 1,
    "createdBy": "u_admin",
    "createdAt": "2026-10-05T09:00:00.000Z",
    "updatedAt": "2026-10-05T09:00:00.000Z"
  },
  "stages": [
    {
      "id": "stg_80f4c441882745b09da64e135002f47c",
      "roleId": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
      "name": "Applied",
      "kind": "applied",
      "position": 0,
      "scorecardCriteria": []
    },
    {
      "id": "stg_2765668ab72a4efc80b72c2c23545916",
      "roleId": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
      "name": "Screening",
      "kind": "screening",
      "position": 1,
      "scorecardCriteria": []
    },
    {
      "id": "stg_76519016287f47c890ec8567e3846574",
      "roleId": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
      "name": "Interview",
      "kind": "interview",
      "position": 2,
      "scorecardCriteria": []
    },
    {
      "id": "stg_f4b90d8566e8403f8e82b640b8abcd94",
      "roleId": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
      "name": "Offer",
      "kind": "offer",
      "position": 3,
      "scorecardCriteria": []
    },
    {
      "id": "stg_d5952dbbd1684279a8e58573665a9a7f",
      "roleId": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
      "name": "Hired",
      "kind": "hired",
      "position": 4,
      "scorecardCriteria": []
    },
    {
      "id": "stg_68f7894d617b4b109672127422025c28",
      "roleId": "role_fafa9ca8d9e64593bb9b9edffb0f3745",
      "name": "Rejected",
      "kind": "rejected",
      "position": 5,
      "scorecardCriteria": []
    }
  ]
}

HTTP 200. Confirm $.role.id equals the requested id.

Another supported request

Actual dispatcher and migration-created SQLite; verified Auth/workspace context, object storage, mail and Notify dependencies are simulated. No live delivery or credential authorization is established. This complete response is a local fixture, not a deployed or delivered result.

Input · payload.json:

{
  "id": "role_508daddaeb2c4c61953c890b5fec7f57"
}

CLI:

topolo actions validate app_topolo_recruit.roles.get --data @payload.json --json
topolo actions plan app_topolo_recruit.roles.get --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_recruit.roles.get --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_recruit.roles.get",
    "input": {
      "id": "role_508daddaeb2c4c61953c890b5fec7f57"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "role": {
    "id": "role_508daddaeb2c4c61953c890b5fec7f57",
    "slug": "engineer",
    "title": "Engineer",
    "team": null,
    "location": null,
    "remotePolicy": "onsite",
    "employmentType": "full_time",
    "salaryMin": null,
    "salaryMax": null,
    "salaryCurrency": null,
    "salaryPeriod": null,
    "description": "",
    "questions": [],
    "hiringManagerUserId": null,
    "requiresApproval": false,
    "status": "draft",
    "approvedBy": null,
    "approvedAt": null,
    "openedAt": null,
    "closedAt": null,
    "version": 1,
    "createdBy": "u_admin",
    "createdAt": "2026-10-05T09:00:00.000Z",
    "updatedAt": "2026-10-05T09:00:00.000Z"
  },
  "stages": [
    {
      "id": "stg_8311f837fc954ceab968e6d519ebd2ed",
      "roleId": "role_508daddaeb2c4c61953c890b5fec7f57",
      "name": "Applied",
      "kind": "applied",
      "position": 0,
      "scorecardCriteria": []
    },
    {
      "id": "stg_00ceeff2d7ca43c6ba787eef72fae5ad",
      "roleId": "role_508daddaeb2c4c61953c890b5fec7f57",
      "name": "Screening",
      "kind": "screening",
      "position": 1,
      "scorecardCriteria": []
    },
    {
      "id": "stg_7915fc35d9db4835b843243c1dee3618",
      "roleId": "role_508daddaeb2c4c61953c890b5fec7f57",
      "name": "Interview",
      "kind": "interview",
      "position": 2,
      "scorecardCriteria": []
    },
    {
      "id": "stg_9de00235dc964b42905e017e50a34e4b",
      "roleId": "role_508daddaeb2c4c61953c890b5fec7f57",
      "name": "Offer",
      "kind": "offer",
      "position": 3,
      "scorecardCriteria": []
    },
    {
      "id": "stg_c042c71e091f4af6b8ae9cd7e893cdd3",
      "roleId": "role_508daddaeb2c4c61953c890b5fec7f57",
      "name": "Hired",
      "kind": "hired",
      "position": 4,
      "scorecardCriteria": []
    },
    {
      "id": "stg_15d88a57dc314346b2dc6d42383add9f",
      "roleId": "role_508daddaeb2c4c61953c890b5fec7f57",
      "name": "Rejected",
      "kind": "rejected",
      "position": 5,
      "scorecardCriteria": []
    }
  ]
}

HTTP 200. Confirm $.role.id equals the requested id.

Refused request · not_found

Actual dispatcher and migration-created SQLite; verified Auth/workspace context, object storage, mail and Notify dependencies are simulated. No live delivery or credential authorization is established. This is a refused request; diagnose it before retrying.

Input · payload.json:

{
  "id": "role_example"
}

CLI:

topolo actions validate app_topolo_recruit.roles.get --data @payload.json --json
topolo actions plan app_topolo_recruit.roles.get --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 404:

{
  "error": {
    "code": "not_found",
    "message": "Role was not found in this workspace."
  }
}

HTTP 404. Preserve the exact response code and details. Do not claim success.

Refused request · hiring_team_role_required

Actual dispatcher and migration-created SQLite; verified Auth/workspace context, object storage, mail and Notify dependencies are simulated. No live delivery or credential authorization is established. This is a refused request; diagnose it before retrying.

Input · payload.json:

{
  "id": "role_example"
}

CLI:

topolo actions validate app_topolo_recruit.roles.get --data @payload.json --json
topolo actions plan app_topolo_recruit.roles.get --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 403:

{
  "error": {
    "code": "hiring_team_role_required",
    "message": "Your hiring-team role in this workspace does not allow this action.",
    "details": {
      "teamRole": null,
      "allowedRoles": [
        "recruiter",
        "hiring_manager",
        "interviewer"
      ]
    }
  }
}

HTTP 403. Preserve the exact response code and details. Do not claim success.

Verify the result

  • Confirm $.role.id equals the requested id.

Errors and recovery

  • organization_context_required (HTTP 403): Select the organization authorized by the credential; do not send an organization id in the action input.
  • permission_denied (HTTP 403): Grant the credential the required Recruit workspace permission.
  • hiring_team_role_required (HTTP 403): Ask a recruiter to give the caller a hiring-team role that allows this action (team.members.set); error.details lists the allowed roles.
  • workspace_required (HTTP 409): Create a Recruit workspace, or pass the workspace resource context.
  • invalid_input (HTTP 422): Correct the fields named in error.details using inputSchema, then retry.
  • not_found (HTTP 404): List roles to find a valid id. Records outside the caller's hiring-team view also answer 404.

Authentication or gateway failures may occur before the Recruit handler. Preserve the exact discovered service error, request id and credential context. The local fixtures do not establish live credential authorization.

Recovery boundary

This action does not change service state.

  • Update a role: Change a role's fields; only the fields sent change and each save is a new version (roles.versions.list). Changing an open role changes the public job board immediately. Only a recruiter can reassign the hiring manager.
  • Open a role: Open a draft, paused or closed role so it appears on the published job board and accepts applications. A role that requires approval and has not been approved moves to pending_approval instead (approvalRequired true) until a recruiter calls roles.approve.

Evidence

Actual dispatcher and migration-created SQLite or Worker handlers; Auth/workspace identity, object storage, mail and Notify dependencies are simulated. These synthetic fixtures establish no live authorization or delivery. Test capture provenance is retained with each fixture. API, database and integration outcomes require separate verification in the target environment.