By the Court, C. L. Allen, J.
Where the facts on which the claim of the relator depends are in dispute, or the parties wish to bring the case before the court of dernier resort, an alternative mandamus is usually awarded. In such writ the relator is required to set forth his title, or the facts on which he claims a right to the relief sought by his application; and the defendant is required to do the particular act, or show why he has not done it. The writ performs the office of a declaration or complaint in other suits. In like manner, if the writ is not quashed, which it may be if defective in form or substance, the defendant is required to make a return; and if a return is made, it must either deny the facts stated in the writ, on which the claim of the relator is founded, or it must state other facts sufficient in law to defeat the relator’s claim. (10 Wend. 25.) It is objected by the defendants, that the writ in this case is' substantially defective, in not setting out a good title, inasmuch as it does not state that a certified copy of the certiorari had been served on the district attorney, with a certified copy of the affidavits on which it was allowed, and the return thereto, and that four days’ notice of argument had been served. It is answered, that the defendants cannot be permitted to set up, on argument of the demurrer, that the services were not legally required or rendered; that the question should be raised by the return, if at all. This position is not tenable. In the Com*55mercial Bank of Albany v. The Canal Commissioners, (10 Wend. 25,) it was expressly decided, that after a return has been made to a writ, any defect in substance may be taken advantage of at any time before the peremptory mandamus is awarded. The material facts on which the relator founds his claim must be stated in the writ; otherwise the relator will be deprived of the power of traversing them; for the defendants are only bound to answer what is alledged in the writ. The defendants have a right, therefore, to object to the sufficiency of the writ. And the first question is, does it set forth a sufficient title ? The first section of the act relative to the office of attorney general and district attorney, and to defray certain contingent expenses of the state officers, (Laws of 1848, p. 477, ch, 357,) declares, that “ a certified copy of every certiorari, to remove into the supreme court a conviction had before a court of special sessions, together with a certified copy of the affidavits upon which the writ is allowed, and of the return thereto, shall be served, by the party presenting the writ, upon the district attorney of the county in which the conviction to*be reviewed was had, with at least four days’ notice of the argument thereof ; and it shall be the duty of such district attorney, to attend to the argument of the same, and perform such duties in relation thereto, as have heretofore been performed by the attorney general; for which service, a reasonable compensation, to be certified by one of the justices of the supreme court, shall be audited and allowed by the board of supervisors, and paid out of the treasury of the county.” Before the passage of this act, it was the duty of the party prosecuting the writ of certiorari, to serve a certified copy of the certiorari, affidavit and return, upon the attorney general, with at least four days’ notice of the argument thereof. (1 R. S. 713, § 48.) It was not made the duty of the attorney general, under that section, to notice the cause for argument; but among his general duties, he was undoubtedly required to attend to the argument in all such cases, which of course would be necessarily preceded by the preparation of a brief, points, &c. If the party prosecuting the writ, unreasonably delayed to notice, or bring on for argument, *56the return to such writ, the court might enter a rule to quash such certiorari. (1 R. S. 719, § 57.)
The act of 1848 substitutes the district attorney for the attorney general, requiring the same papers and notice to be served on him, that were before required to be served on the latter officer, and makes it the duty of the district attorney “ to attend to the argument of the same, and to perform such duties in relation thereto as have heretofore been performed by the attorney general
Now what does the writ set out in this case to show that the relator is entitled to the relief asked for 7 It states, that as acting district attorney in 1849, he exhibited before and presented to the board, and to their committee, his bill of charges for services rendered, during that year, to be audited and allowed; that such bill was duly verified; that among other items was the one in dispute, to which the certificate of a justice of the supreme court was annexed, and that he requested the balance of f>80, to be audited and allowed, which the board refused to do. It does not state, except by inference, that a certified copy of the certiorari had been served on the district attorney, with a certified copy of the affidavit on which it was allowed, and the return thereto. It does not state that any notice of argument had been served. Now what duty had the relator to perform until these steps had been taken 7 Clearly none, by the act. It is said that the court sanctioned this practice by affirming the judgment. Suppose they did—and this can only be assumed by inference—was the relator authorized or required to pursue such a course 7 The act is silent on that subject ; and a subsequent section, before referred to, points out the remedy in case the party prosecuting the writ unreasonably delayed, by providing that the court may quash the certiorari. It has been held that where a district attorney acts within the scope of his authority, and renders services for his principal, he is entitled to be paid both for his disbursements and services. (People v. Van Wyck, (4 Cowen, 260.) But the same case holds, that if services are rendered which are not provided for by statute, however meritorious, they are to be gratuitous, and *57the party is not entitled to compensation. (And see People v. Supervisors of New- York, 1 Hill, 362, and 6 Id. 244.) So here, for aught that appears upon the writ, the whole services rendered were unnecessary, and were not in accordance with the act under which they are claimed; or if it is to be inferred that the plaintiff in error had complied with the requisitions of the statute, by noticing the cause for argument, and serving the necessary papers, and that the relator attended the argument in consequence thereof, as he would in that case be required to do, then the justice has certified to compensation for some services-which were not required by the relator, and which it was not his duty to perform. It is said all questions are settled by the certificate. That might be so, if the certificate had been confined to the compensation for attending to the argument of the case, and perhaps preparing brief and points; but the judge certifies as to some services not required, and although they may have formed, and probably did, but a small part of the compensation to which he was of opinion the relator was entitled, the court cannot say from the writ how much he did allow for these services. Like the case of a salary officer, he could not claim compensation, extra his salary, or extra for services which he was not required to perform, or for a service or duty for which no compensation is provided by statute. (1 Hill, 362.) But admitting that the writ is sufficient, and that the relator is entitled to a return, what facts have the defendants interposed against' the relief demanded 1 The return shows that the item has been twice presented to the board for allowance; that it was referred to Judge Wells, with the whole bill presented by the relator for taxation. The judge taxed the bill, except as to this item, which he declined to tax. The defendants, in 1849, allowed $15 for the services claimed, alledging that sum was a reasonable compensation therefor, and refused to allow any more ; in 1850 the item was again presented, and referred to the same judge, who declined to tax it, and the board refused to allow the balance claimed, of $30. If the relator was entitled to any compensation, the defendants have passed upon that question, and have awarded him a sum which they, in the exercise of their discretion, considered *58sufficient for the services rendered. I do not think they were controlled by the certificate of the justice of the supreme court; but I incline to the opinion that they had a discretion as to the amount which they would allow, notwithstanding the act of 1848' provides that a reasonable compensation, to be certified by one of the justices of the supreme court, shall be audited and allowed by the board of supervisors, and paid out of the treasury of the county. If they had such discretion, a mandamus will not lie. It is only where the board has refused to act altogether, that the writ is sent. Its office is to put them in motion. But if they have acted on the subject matter, the court will not undertake to control them in the exercise of their discretion, as to the amount at which an account presented shall be audited. (1 Hill, 362. 12 John. 414.)
But if the board had no discretion in the matter, and were required to audit and allow the whole amount as certified by the justice, ought a peremptory mandamus to be awarded ? It has been repeatedly decided that a writ of mandamus will only go when no other legal remedy exists ; but when a party is entitled to relief, or can enforce his claim by action at law, he must pursue that remedy, and cannot ask the aid of the court by mandamus. (12 John. 414. 25 Wend. 680. 6 Hill, 243. 2 Id. 45, and numerous other cases.) The relator contends in this case, that he was required to perform the services claimed, and that the certificate of the justice was conclusive, as to the amount which he was entitled to be allowed. Be it so. The board have refused to allow it, and what is his remedy ? I think it is by action. The first section, 1st R. S. 384, enacts that, whenever any controversy or cause of action shall exist between any of the counties of this state, or between any such county and an individual or individuals, such proceedings shall be had, either at law or in equity, for the purpose of trying and finally settling such controversy, and the same shall be conducted in like manner, and the judgment or decree thereon shall have the like effect, as in other suits or proceedings of a similar kind between individuals and corporations. Section 2d provides that all such suits and proceedings shall be brought by or against the board *59of supervisors of the county. If the board has neglected or refused to perform a legal duty enjoined upon them, and which they are bound to discharge, an action will lie against them. In Ex parte Lynch, (2 Hill, 45,) it was held that a mandamus would not lie to compel the supervisors of the city and county of New-York to audit and allow the salary of an associate judge, the remedy being by action at law. So in The People v. Lawrence, (6 Hill, 243, 4,) it was decided that if the allowance by the board had been authorized, and payment improperly withheld, the remedy was not by mandamus, but by action. And when a new court was created, and the common council were directed to pay salaries, which they refused to do, a mandamus was refused, because an action could be maintained to recover the amount of the salary. (People v. Mayor of New- York, 25 Wend. 680.) These are analogous cases to the one under consideration, and I think decisive of the question. The relator has a clear remedy by action, and therefore the application for a peremptory mandamus must be denied, and judgment be rendered for the defendants on the demurrer to the return, with costs to be paid by the relator. *61tendent for one year, in April, 1847; that in March, 1848, and before the annual town meeting of that year, he received as such superintendent from the county treasurer of Warren county the sum of $299,30, that of this sum over $100 remained in his hands, which he had never disbursed- or paid over, although it had been demanded of him by the plaintiff since his election to the office. Fullerton’s term of office would have expired in April, 1848, but by the act of 1847 he continued to hold his office till the 1st day of November of that year. The money was in his hands until August, 1848. It appeared in evidence, on the part of the defendant, that the collector of Athol was notified by one of the bail, and that he at his request notified the supervisor and county treasurer in February, 1848, and before Fullerton received any money, not to pay any money over to him, as they, the bail, would not be responsible or answerable for its faithful application or disbursement by him. The cause was tried by a jury, who rendered a verdict for the plaintiff for $100, for which sum, with $5 costs, the justice rendered judgment against the defendants on the 6th of May, 1850. The defendants appealed to the Warren county court, and the judge of that county certified the appeal to this court.
*59[Franklin General Term,
July 5, 1852.
Willard, Hand, Cady and C. L. Allen, Justices.]