{"record":{"id":"87f4ceae89c8fda2","repo":"phacility/phabricator","slug":"api-method-s-does-not-define-these-parameters","errorCode":null,"errorMessage":"API Method \"%s\" does not define these parameters: %s.","messagePattern":"API Method \"(.+?)\" does not define these parameters: (.+?)\\.","errorType":"validation","errorClass":"ConduitException","httpStatus":null,"severity":"error","filePath":"src/applications/conduit/call/ConduitCall.php","lineNumber":37,"sourceCode":"    $this->method = $method;\n    $this->handler = $this->buildMethodHandler($method);\n\n    $param_types = $this->handler->getParamTypes();\n\n    foreach ($param_types as $key => $spec) {\n      if (ConduitAPIMethod::getParameterMetadataKey($key) !== null) {\n        throw new ConduitException(\n          pht(\n            'API Method \"%s\" defines a disallowed parameter, \"%s\". This '.\n            'parameter name is reserved.',\n            $method,\n            $key));\n      }\n    }\n\n    $invalid_params = array_diff_key($params, $param_types);\n    if ($invalid_params) {\n      throw new ConduitException(\n        pht(\n          'API Method \"%s\" does not define these parameters: %s.',\n          $method,\n          \"'\".implode(\"', '\", array_keys($invalid_params)).\"'\"));\n    }\n\n    $this->request = new ConduitAPIRequest($params, $strictly_typed);\n  }\n\n  public function getAPIRequest() {\n    return $this->request;\n  }\n\n  public function setUser(PhabricatorUser $user) {\n    $this->user = $user;\n    return $this;\n  }\n","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/conduit/call/ConduitCall.php#L19-L55","documentation":"ConduitCall performs strict parameter checking: any key in the request params that the method did not declare in defineParamTypes() is rejected with this message listing the offending names. This surfaces typos and client/server API drift immediately instead of silently ignoring unknown parameters.","triggerScenarios":"Calling a conduit method with a misspelled or extra parameter, e.g. passing 'project' to a method that declares 'projects', or passing 'limit' to a method with no such parameter; A newer client (or arc/libphutil wrapper) using parameters an older server build does not define yet","commonSituations":"Script drift after a Phabricator upgrade renames parameters; copy-pasted conduit calls between methods; typed client stubs generated from newer API docs than the deployed server.","solutions":["Remove or correct the extra parameters to match the method's defineParamTypes() (check the method class or conduit.query docs on the instance)","Align client and server versions — upgrade the Phabricator instance or pin the client to the deployed API","When writing wrappers, validate param keys against ConduitAPIMethod::getConduitMethod($name)->getParamTypes() before issuing the call"],"exampleFix":"// before\n$params = array('project' => 'PHID-PROJ-xyz');\n$conduit->callMethod('project.query', $params);\n\n// after\n$params = array('projects' => array('PHID-PROJ-xyz'));\n$conduit->callMethod('project.query', $params);","handlingStrategy":"validation","validationCode":"$method = ConduitAPIMethod::getConduitMethod($method_name);\n$param_types = $method->getParamTypes();\n$unknown = array_diff_key($params, $param_types);\nif ($unknown) {\n  throw new Exception(\n    'Unknown parameters for '.$method_name.': '.implode(', ', array_keys($unknown)));\n}\n$response = id(new ConduitCall($method_name, $params))->execute();","typeGuard":null,"tryCatchPattern":"try {\n  $result = $conduit->callMethod($method_name, $params);\n} catch (ConduitException $ex) {\n  if (strpos($ex->getMessage(), 'does not define these parameters') !== false) {\n    // Strip the listed params and retry once with only declared keys.\n  }\n}","preventionTips":["Pin client scripts to the API of the deployed server version; check conduit.query for the live spec","Diff your params against the method's defineParamTypes() during development","Treat parameter renames across upgrades as breaking changes and update all callers in the same change"],"tags":["phabricator","conduit","api","parameter-validation","client-server-drift"],"backgroundTag":"unrecognized-request-parameter","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}