Topolo Docs Topolo Platform
Open workspace

Reject an application

Reject an application with a reason: it moves to the role's rejected stage (or is marked rejected when the role has none). With sendEmail true the candidate gets the rejection email (templateId, else the workspace's rejection template, else Recruit's default) through Nexus. The rejection stands even if the email cannot be sent; email reports what happened.

Outcome

Reject an application with a reason: it moves to the role's rejected stage (or is marked rejected when the role has none). With sendEmail true the candidate gets the rejection email (templateId, else the workspace's rejection template, else Recruit's default) through Nexus. The rejection stands even if the email cannot be sent; email reports what happened.

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.reject --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.email_templates.list --detail --json

Request

POST /api/applications/{id}/reject

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
idRequiredstringApplication id from applications.list. {"minLength":1,"maxLength":64}
reasonRequiredstring{"minLength":1,"maxLength":500}
sendEmailOptionalboolean{}
templateIdOptionalstringTemplate id from email_templates.list; inspect kind and active status before using it. {"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
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "sendEmail": {
      "type": "boolean"
    },
    "templateId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "id",
    "reason"
  ],
  "additionalProperties": false
}

Effects

  • Marks the application rejected, records history and timeline entries and, with sendEmail, sends one email.

Interpret the response

Call applications.get and confirm status rejected; with sendEmail, candidates.emails.list shows the email.

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",
    "email"
  ],
  "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."
        }
      }
    },
    "email": {
      "type": [
        "object",
        "null"
      ]
    }
  }
}

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": "apl_e41be88a8c294d638ed5b2adf10c7816",
  "reason": "x",
  "sendEmail": true
}

CLI:

topolo actions validate app_topolo_recruit.applications.reject --data @payload.json --json
topolo actions plan app_topolo_recruit.applications.reject --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_recruit.applications.reject --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.reject",
    "input": {
      "id": "apl_e41be88a8c294d638ed5b2adf10c7816",
      "reason": "x",
      "sendEmail": true
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "application": {
    "id": "apl_e41be88a8c294d638ed5b2adf10c7816",
    "candidateId": "cand_df2749ccc5294b9d8a7994005684da66",
    "roleId": "role_4c043befca77491a94a0ba46487164cd",
    "stageId": "stg_32bf0f2197994cc58e40c1f7e266abd0",
    "status": "rejected",
    "source": "manual",
    "answers": [],
    "coverLetter": null,
    "appliedAt": "2026-10-05T09:00:00.000Z",
    "updatedAt": "2026-10-05T09:00:00.000Z"
  },
  "email": {
    "status": "not_sent",
    "error": {
      "code": "unresolved_merge_fields",
      "message": "These merge fields have no value: interview.when.",
      "details": {
        "unresolved": [
          "interview.when"
        ]
      }
    }
  }
}

HTTP 200. Call applications.get and confirm status rejected; with sendEmail, candidates.emails.list shows the email.

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": "apl_b8026a155f4a498e9905482dc7ce2981",
  "reason": "Role cancelled"
}

CLI:

topolo actions validate app_topolo_recruit.applications.reject --data @payload.json --json
topolo actions plan app_topolo_recruit.applications.reject --resource-type workspace --resource-id "$RECRUIT_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_recruit.applications.reject --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.reject",
    "input": {
      "id": "apl_b8026a155f4a498e9905482dc7ce2981",
      "reason": "Role cancelled"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "application": {
    "id": "apl_b8026a155f4a498e9905482dc7ce2981",
    "candidateId": "cand_1fbe8870b72747669a0e7eacf7543306",
    "roleId": "role_4594faa389d5459b8c7a7d676d6cfa58",
    "stageId": "stg_08c524c52fe54e4e9a62c86557069d0f",
    "status": "rejected",
    "source": "manual",
    "answers": [],
    "coverLetter": null,
    "appliedAt": "2026-10-05T09:00:00.000Z",
    "updatedAt": "2026-10-05T09:00:00.000Z"
  },
  "email": null
}

HTTP 200. Call applications.get and confirm status rejected; with sendEmail, candidates.emails.list shows the email.

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": "apl_example",
  "reason": "Not enough backend experience",
  "sendEmail": true
}

CLI:

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

Captured local response · HTTP 404:

{
  "error": {
    "code": "not_found",
    "message": "Application 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": "apl_example",
  "reason": "Not enough backend experience",
  "sendEmail": true
}

CLI:

topolo actions validate app_topolo_recruit.applications.reject --data @payload.json --json
topolo actions plan app_topolo_recruit.applications.reject --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 applications.get and confirm status rejected; with sendEmail, candidates.emails.list shows the email.

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 applications or email templates to find a valid id. Records outside the caller's hiring-team view also answer 404.
  • role_not_managed (HTTP 403): Only a recruiter or the role's hiring manager can do this.
  • application_withdrawn (HTTP 409): A withdrawn application cannot change; add the candidate to the role again only if they reapply.
  • already_rejected (HTTP 409): Nothing to do.
  • invalid_json (HTTP 400): Send a valid JSON object. The request is rejected before workspace resolution or record creation.

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

Move the application back to an active stage; an email already sent cannot be recalled.

  • Move an application to a stage: Move an application to another stage of its role, with an optional reason. Moving to the hired stage marks it hired, to the rejected stage marks it rejected, any other stage makes it active again. Every move appends to the stage history and the candidate timeline.

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.