Topolo Docs Topolo Platform
Open workspace

Add a candidate to a role

Add a visible candidate to a managed role’s Applied stage.

Outcome

Add a visible candidate to a managed role’s Applied stage.

A candidate can apply to each role once. The candidate must be visible to the caller, and the role must be managed by the caller and not closed.

If the destination stage has connected Forms or Survey steps, Recruit may request notification emails with the candidate’s personal links. Inspect the returned steps result; a successful recruitment operation or a reported email status is not a mailbox delivery receipt.

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:write. 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.applications.create --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.applications.list --detail --json
topolo actions get app_topolo_recruit.candidates.list --detail --json
topolo actions get app_topolo_recruit.roles.list --detail --json

Request

POST /api/applications

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
candidateIdRequiredstringCandidate id from candidates.list. {"minLength":1,"maxLength":64}
roleIdRequiredstringRole id from roles.list. Hiring managers must select a role they manage when creating a candidate. {"minLength":1,"maxLength":64}

Exact input schema:

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

Effects

  • Creates one application and its first stage-history entry; extends the candidate's retention date.

Interpret the response

Call candidates.get and confirm the application for the role.

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

Exact success schema:

{
  "type": "object",
  "required": [
    "application"
  ],
  "properties": {
    "application": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "candidateId": {
          "type": "string"
        },
        "roleId": {
          "type": "string"
        },
        "stageId": {
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "rejected",
            "hired",
            "withdrawn"
          ]
        },
        "source": {
          "type": "string"
        },
        "answers": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "coverLetter": {
          "type": [
            "string",
            "null"
          ]
        },
        "appliedAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "roleTitle": {
          "type": "string",
          "description": "Present on candidates.list and candidates.get."
        },
        "stageName": {
          "type": "string",
          "description": "Present on candidates.list and candidates.get."
        }
      }
    },
    "steps": {
      "type": "object",
      "description": "The stage's steps from other apps (roles.steps.list) sent to the candidate on reaching it: sent counts them; email is the email with their personal links, or null when none were sent.",
      "properties": {
        "sent": {
          "type": "integer"
        },
        "email": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "status": {
              "enum": [
                "sent",
                "failed",
                "skipped"
              ]
            },
            "emailId": {
              "type": "string"
            },
            "error": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      }
    }
  }
}

Inspect optional steps.sent and steps.email separately from the recruitment result. sent counts stage steps; steps.email.status is Recruit’s reported notification result, not proof of mailbox delivery. Use the returned emailId, when present, for separately authorized delivery verification.

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:

{
  "candidateId": "cand_4fd39fba5a7d46839323c08cd829b2b9",
  "roleId": "role_8af98ef393664050824afd951ceeb9c5"
}

CLI:

topolo actions validate app_topolo_recruit.applications.create --data @payload.json --json
topolo actions plan app_topolo_recruit.applications.create --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_recruit.applications.create --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_recruit.applications.create",
    "input": {
      "candidateId": "cand_4fd39fba5a7d46839323c08cd829b2b9",
      "roleId": "role_8af98ef393664050824afd951ceeb9c5"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "application": {
    "id": "apl_88a4037098fa4ee492c08de8096a6a08",
    "candidateId": "cand_4fd39fba5a7d46839323c08cd829b2b9",
    "roleId": "role_8af98ef393664050824afd951ceeb9c5",
    "stageId": "stg_fc97aa7646ce4ea39d58c762a5ccb7f4",
    "status": "active",
    "source": "manual",
    "answers": [],
    "coverLetter": null,
    "appliedAt": "2026-10-05T09:00:00.000Z",
    "updatedAt": "2026-10-05T09:00:00.000Z"
  }
}

HTTP 201. Call candidates.get and confirm the application for the role.

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:

{
  "candidateId": "cand_8090310a228240c791d24680385c6e61",
  "roleId": "role_94e1027cc72c4b6d8b19d268e29d235d"
}

CLI:

topolo actions validate app_topolo_recruit.applications.create --data @payload.json --json
topolo actions plan app_topolo_recruit.applications.create --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_recruit.applications.create --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_recruit.applications.create",
    "input": {
      "candidateId": "cand_8090310a228240c791d24680385c6e61",
      "roleId": "role_94e1027cc72c4b6d8b19d268e29d235d"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "application": {
    "id": "apl_9495a82adeca4435bf111340a9dda339",
    "candidateId": "cand_8090310a228240c791d24680385c6e61",
    "roleId": "role_94e1027cc72c4b6d8b19d268e29d235d",
    "stageId": "stg_a11f12a1ec3043919f86a3445779cdc2",
    "status": "active",
    "source": "manual",
    "answers": [],
    "coverLetter": null,
    "appliedAt": "2026-10-05T09:00:00.000Z",
    "updatedAt": "2026-10-05T09:00:00.000Z"
  }
}

HTTP 201. Call candidates.get and confirm the application for the role.

Refused request · already_applied

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:

{
  "candidateId": "cand_8090310a228240c791d24680385c6e61",
  "roleId": "role_94e1027cc72c4b6d8b19d268e29d235d"
}

CLI:

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

Captured local response · HTTP 409:

{
  "error": {
    "code": "already_applied",
    "message": "Ada Lovelace already has an application for Engineer.",
    "details": {
      "applicationId": "apl_9495a82adeca4435bf111340a9dda339"
    }
  }
}

HTTP 409. 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:

{
  "candidateId": "cand_example",
  "roleId": "role_example"
}

CLI:

topolo actions validate app_topolo_recruit.applications.create --data @payload.json --json
topolo actions plan app_topolo_recruit.applications.create --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": "interviewer",
      "allowedRoles": [
        "recruiter",
        "hiring_manager"
      ]
    }
  }
}

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

Verify the result

  • Call candidates.get and confirm the application for the role.

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): Inspect the required Recruit permission and the credential’s granted workspace access. Use an already authorized credential/scope or request the missing access from its owner. Change credentials or grants only under separate explicit authorization; do not expand permissions automatically to clear this refusal.
  • 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 candidates to find a valid id. Records outside the caller's hiring-team view also answer 404.
  • not_found (HTTP 404): Use roles.list to find a role you manage.
  • role_closed (HTTP 409): Reopen the role with roles.open first.
  • already_applied (HTTP 409): Use error.details.applicationId; the candidate is already on this role.
  • invalid_json (HTTP 400): Send a valid JSON object. The request is rejected before workspace resolution or record creation.
  • api_key_workspace_binding_required (HTTP 403): Use a key explicitly bound to the intended granted workspace. Inspect Auth api_keys.options before creating or changing a key, and obtain approval for any credential or access change; do not widen bindings automatically.
  • workspace_required (HTTP 400): Send the workspace the key is bound to with --resource-type workspace --resource-id <workspace id> (or the X-Topolo-Resource-Type and X-Topolo-Resource-Id headers).
  • workspace_forbidden (HTTP 403): Use a workspace the key is bound to; read the key's bindings in API key management.
  • workspace_access_insufficient (HTTP 403): The required workspace permission is workspace:read for reads or workspace:write for changes, including deletion. Inspect the authorized key options and resource access; request any missing access from its owner rather than granting it automatically.
  • api_key_scope_required (HTTP 403): Read requiredScope in the refusal and inspect Auth api_keys.options for the authorized operation. Request any needed access from its owner; create or update a key only with explicit approval. Do not retry an unchanged 403 or widen scopes automatically.

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

An application is part of the hiring record and is not deleted; reject or withdraw it from the pipeline instead.

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.

Documentation history

2026-10-18

  • Updated the precise application response and clarified connected-stage notification boundaries.
  • Updated this guide from source revision 63171ed7c08aa066adb44cc01e64011e465302e1; retained 4 source-captured request/response examples and their simulated-dependency limitations.
  • Clarified authorized API-key/resource recovery without automatic permission expansion. This documentation update does not establish deployment, live hiring operations or notification delivery.