---
updatedAt: 2025-06-02T23:41:23.000Z
agentTools:
  projectIndex: https://docs.stake.fish/llms.txt
---

# /v1/create-validators-admin

Given count and withdrawal credentials, creates a list of deposit information for validators. Resulting list can be used to stake using stakefish's batch deposit contract.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Ethereum Staking API",
    "version": "1.0.0",
    "description": "This API facilitates the management of non-custodial Ethereum validators hosted by Stakefish. It equips users with essential tools and datapoints to manage a seamless staking experience at scale, supporting operations from keypair generation through to validator exit."
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "API key required to authenticate the request, provided on the header in the format of `Authorization: <API key>`. Alternatively, this can be supplied as an `api_key` query parameter."
      }
    }
  },
  "paths": {
    "/v1/create-validators-admin": {
      "post": {
        "tags": [
          "enterprise staking"
        ],
        "description": "Given count and withdrawal credentials, creates a list of deposit information for validators. Resulting list can be used to stake using stakefish's batch deposit contract.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 100,
                    "example": 1,
                    "description": "The number of validators to be created."
                  },
                  "withdrawalCredentials": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(0x)?[0-9a-fA-F]*$",
                        "example": "0x01000000000000000000000044473b8695e4286cb8ad24814a69d96e974a4fc2",
                        "description": "The withdrawal credentials used by the validator(s). All of the consensus rewards and the validator's balance after exiting will be sent to this address."
                      },
                      {
                        "type": "string",
                        "pattern": "^(0x)?[0-9a-fA-F]*$",
                        "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
                      }
                    ],
                    "description": "The withdrawal credentials used by the validator(s)."
                  },
                  "customFeeRecipient": {
                    "type": "string",
                    "pattern": "^(0x)?[0-9a-fA-F]*$",
                    "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
                    "description": "The fee recipient for the validators. Allowed only when the organization is not using the fee pool."
                  }
                },
                "required": [
                  "count",
                  "withdrawalCredentials"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns data for initiating a batch deposit using the stakefish BatchDeposit contract.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pubkeys": {
                      "type": "string",
                      "pattern": "^0x",
                      "description": "Concatenated pubkeys of the created validators.",
                      "example": "0x80000001677f23a227dfed6f61b132d114be83b8ad0aa5f3c5d1d77e6ee0bf5f73b0af750cc34e8f2dae73c21dc36f4a"
                    },
                    "withdrawalCredentials": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^0x",
                          "example": "0x01000000000000000000000044473b8695e4286cb8ad24814a69d96e974a4fc2",
                          "description": "The withdrawal credentials used by the validator(s). All of the consensus rewards and the validator's balance after exiting will be sent to this address."
                        },
                        {
                          "type": "string",
                          "pattern": "^0x",
                          "example": "0x02000000000000000000000044473b8695e4286cb8ad24814a69d96e974a4fc2",
                          "description": "The withdrawal credentials used by the validator(s). All of the consensus rewards and the validator's balance after exiting will be sent to this address."
                        }
                      ],
                      "example": "0x02000000000000000000000044473b8695e4286cb8ad24814a69d96e974a4fc2",
                      "description": "The withdrawal credentials used by the validator(s). All of the consensus rewards and the validator's balance after exiting will be sent to this address."
                    },
                    "signatures": {
                      "type": "string",
                      "pattern": "^0x",
                      "example": "0xac1af0450a0e512c1e610bfb98b92b17559fbd8aeffcda3d576f92d1b8d605780c15848a85a379c5cb54a7aa612c30c478f5150e1baf9fca66e795588c8f56181c",
                      "description": "The <a href=\"https://eips.ethereum.org/EIPS/eip-191\" target=\"_blank\">EIP-191</a> or the <a href=\"https://eip1271.io/\" target=\"_blank\">EIP-1271</a> signature of the message."
                    },
                    "depositDataRoots": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^0x",
                        "example": "0xc8d4e52072b53b3bafb6ee5c61381c9bb5d37937a467563b5c6de03522401d9d",
                        "description": "Deposit data root of the validator. <a href=\"https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/deposit-contract.md#staking-deposit-contract\" target=\"_blank\">Read more</a>."
                      }
                    }
                  },
                  "required": [
                    "pubkeys",
                    "withdrawalCredentials",
                    "signatures",
                    "depositDataRoots"
                  ],
                  "description": "Returns data for initiating a batch deposit using the stakefish BatchDeposit contract."
                }
              }
            }
          },
          "400": {
            "description": "Returns an error object describing the payload validation issues.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "description": "Returns an error object describing the payload validation issues."
                },
                "example": {
                  "error": {
                    "issues": [
                      {
                        "code": "custom",
                        "message": "Invalid Ethereum address",
                        "path": [
                          "withdrawalCredentials"
                        ]
                      }
                    ],
                    "name": "ZodError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "description": "Returns an error message"
                },
                "example": {
                  "error": "Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Returns an error message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "description": "Returns an error message"
                },
                "examples": {
                  "example1": {
                    "value": {
                      "error": "Unauthorized"
                    }
                  },
                  "example2": {
                    "value": {
                      "error": "Setting custom fee recipient is not allowed"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.stake.fish/eth/stake"
    },
    {
      "url": "https://api.hoodi.stake.fish/eth/stake"
    }
  ],
  "tags": [
    {
      "name": "enterprise staking",
      "description": "Endpoints which require an API key with elevated privileges - enables requests to be completed without requiring a cryptographic signature and other eligibility checks."
    }
  ]
}
```