Pterodactyldocs
Admin A P I

Create mount

Creates a mount definition and generates its UUID.

POST/api/admin/mounts
AuthorizationBearer <token>

Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/admin/mounts" \  -H "Content-Type: application/json" \  -d '{    "name": "Example Resource",    "source": "/server.properties",    "target": "/server.properties"  }'
{  "object": "mount",  "attributes": {    "id": 1,    "uuid": "1b19cf3f-2f89-4f88-a81e-321e7fe326bc",    "name": "Shared Mods",    "description": "Shared mod files for servers.",    "source": "/mnt/shared-mods",    "target": "/home/container/mods",    "read_only": true,    "user_mountable": false,    "eggs_count": 1,    "nodes_count": 1,    "servers_count": 0,    "mounted": true,    "relationships": {      "eggs": {        "object": "list",        "data": [          {            "object": "egg",            "attributes": {              "id": 9880,              "uuid": "f05076e2-3f79-44fe-b9c3-007df7879f42",              "author": "[email protected]",              "name": "Mrs. Justina Gaylord",              "description": "Mollitia modi deserunt aut ab provident perspiciatis quo. Nostrum aut adipisci quidem nostrum. Commodi incidunt iure odit.",              "features": [                "eula"              ],              "docker_image": "ghcr.io/pterodactyl/yolks:java_23",              "docker_images": {                "Java 23": "ghcr.io/pterodactyl/yolks:java_23"              },              "force_outgoing_ip": false,              "config": {                "files": {                  "server.properties": {                    "parser": "properties",                    "find": {                      "server-port": "{{server.build.default.port}}"                    }                  }                },                "startup": {                  "done": [                    "Done"                  ]                },                "stop": "stop",                "logs": {                  "custom": true,                  "location": "logs/latest.log"                },                "file_denylist": [                  "secret.txt"                ],                "extends": 0              },              "startup": "java -jar test.jar",              "script": {                "privileged": true,                "install": "string",                "entry": "ash",                "container": "alpine:3.4",                "extends": 0              },              "created_at": "2026-09-22T14:45:26+00:00",              "updated_at": "2026-09-22T14:45:26+00:00",              "relationships": {                "variables": {                  "object": "list",                  "data": [                    {                      "object": "egg_variable",                      "attributes": {                        "id": 3952,                        "egg_id": 9881,                        "name": "Payton",                        "description": "Ipsum nostrum omnis autem et consequatur aut dolores enim.",                        "env_variable": "NON_FACERE",                        "default_value": "GoldenRod",                        "user_viewable": false,                        "user_editable": false,                        "rules": "required|string",                        "sort_order": 0,                        "created_at": "2026-09-22T14:45:26+00:00",                        "updated_at": "2026-09-22T14:45:26+00:00"                      }                    }                  ]                },                "tags": {                  "object": "list",                  "data": [                    {                      "object": "tag",                      "attributes": {                        "id": 510,                        "name": "fugiat sunt",                        "slug": "fugiat-sunt",                        "color": "#54db8e",                        "is_predefined": false,                        "legacy_nest_id": 1,                        "eggs_count": 0,                        "nodes_count": 0,                        "created_at": "2026-09-22T14:45:25+00:00",                        "updated_at": "2026-09-22T14:45:25+00:00"                      },                      "meta": {                        "resource": "https://panel.example.com/api/admin/tags/1"                      }                    }                  ]                },                "servers": {                  "object": "list",                  "data": [                    {                      "object": "server",                      "attributes": {                        "id": 8140,                        "external_id": "string",                        "uuid": "e5628a06-7ba6-4206-8a87-c2aeb91669ec",                        "identifier": "kqhvptzk",                        "name": "Leo",                        "description": "Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora. Voluptatem laboriosam praesentium quis adipisci.",                        "status": "string",                        "suspended": false,                        "limits": {                          "memory": 512,                          "swap": 0,                          "disk": 512,                          "io": 500,                          "cpu": 0,                          "threads": "string",                          "oom_disabled": false                        },                        "feature_limits": {                          "databases": 0,                          "allocations": 0,                          "backups": 0                        },                        "user": 22139,                        "node": 13361,                        "allocation": 9849,                        "egg": 9866,                        "container": {                          "startup_command": "/bin/bash echo \"hello world\"",                          "image": "foo/bar:latest",                          "skip_scripts": false,                          "installed": 1,                          "environment": {                            "SERVER_JARFILE": "server.jar"                          }                        },                        "updated_at": "2026-09-22T14:45:24+00:00",                        "created_at": "2026-09-22T14:45:24+00:00",                        "relationships": {                          "allocation": {                            "object": "allocation",                            "attributes": {}                          },                          "allocations": {                            "object": "list",                            "data": [                              null                            ]                          },                          "user": {                            "object": "user",                            "attributes": {                              "relationships": {}                            },                            "meta": {}                          },                          "egg": {},                          "variables": {                            "object": "list",                            "data": [                              null                            ]                          },                          "node": {                            "object": "node",                            "attributes": {                              "allocated_resources": {},                              "relationships": {}                            },                            "meta": {}                          }                        }                      },                      "meta": {                        "resource": "https://panel.example.com/api/admin/servers/1"                      }                    }                  ]                }              }            },            "meta": {              "resource": "https://panel.example.com/api/admin/eggs/1"            }          }        ]      },      "nodes": {        "object": "list",        "data": [          {            "object": "node",            "attributes": {              "id": 13380,              "uuid": "0c8baf15-4a20-49b5-b738-109796b553e1",              "public": true,              "name": "FactoryNode_K98YXFAsPq",              "description": "string",              "location_id": 16046,              "fqdn": "74.174.140.253",              "scheme": "http",              "behind_proxy": false,              "maintenance_mode": false,              "memory": 1024,              "memory_overallocate": 0,              "disk": 10240,              "disk_overallocate": 0,              "upload_size": 100,              "daemon_listen": 8080,              "daemon_sftp": 2022,              "daemon_base": "/var/lib/pterodactyl/volumes",              "created_at": "2026-09-22T14:45:25+00:00",              "updated_at": "2026-09-22T14:45:25+00:00",              "servers_count": 0,              "allocated_resources": {                "memory": 0,                "disk": 0              },              "relationships": {                "location": {                  "object": "location",                  "attributes": {                    "id": 16053,                    "short": "yXYh3ig7",                    "long": "DtTf5dbTXXUq1fV3VBHWMKFch7pKkxN4",                    "nodes_count": 0,                    "servers_count": 0,                    "created_at": "2026-09-22T14:45:26+00:00",                    "updated_at": "2026-09-22T14:45:26+00:00",                    "relationships": {                      "nodes": {}                    }                  },                  "meta": {                    "resource": "https://panel.example.com/api/admin/locations/1"                  }                }              }            },            "meta": {              "resource": "https://panel.example.com/api/admin/nodes/1"            }          }        ]      },      "servers": {        "object": "list",        "data": [          {            "object": "server",            "attributes": {              "id": 8140,              "external_id": "string",              "uuid": "e5628a06-7ba6-4206-8a87-c2aeb91669ec",              "identifier": "kqhvptzk",              "name": "Leo",              "description": "Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora. Voluptatem laboriosam praesentium quis adipisci.",              "status": "string",              "suspended": false,              "limits": {                "memory": 512,                "swap": 0,                "disk": 512,                "io": 500,                "cpu": 0,                "threads": "string",                "oom_disabled": false              },              "feature_limits": {                "databases": 0,                "allocations": 0,                "backups": 0              },              "user": 22139,              "node": 13361,              "allocation": 9849,              "egg": 9866,              "container": {                "startup_command": "/bin/bash echo \"hello world\"",                "image": "foo/bar:latest",                "skip_scripts": false,                "installed": 1,                "environment": {                  "SERVER_JARFILE": "server.jar"                }              },              "updated_at": "2026-09-22T14:45:24+00:00",              "created_at": "2026-09-22T14:45:24+00:00",              "relationships": {                "allocation": {                  "object": "allocation",                  "attributes": {                    "id": 9864,                    "ip": "43.197.122.240",                    "alias": "string",                    "port": 23726,                    "notes": "string",                    "server_id": 0,                    "server_name": "string",                    "assigned": false                  }                },                "allocations": {                  "object": "list",                  "data": [                    {                      "object": "allocation",                      "attributes": {                        "id": 9864,                        "ip": "43.197.122.240",                        "alias": "string",                        "port": 23726,                        "notes": "string",                        "server_id": 0,                        "server_name": "string",                        "assigned": false                      }                    }                  ]                },                "user": {                  "object": "user",                  "attributes": {                    "id": 22129,                    "external_id": "string",                    "uuid": "39ff92cf-453d-43be-ac47-89569dfba75e",                    "username": "alayna44_cuxzkyiji9",                    "email": "[email protected]",                    "first_name": "Kenyatta",                    "last_name": "O'Keefe",                    "language": "en",                    "root_admin": false,                    "2fa": false,                    "image": "https://gravatar.com/avatar/7dd464c5201a58aafc8fa80660971d52",                    "servers_count": 0,                    "subuser_of_count": 0,                    "created_at": "2026-09-22T14:45:24+00:00",                    "updated_at": "2026-09-22T14:45:24+00:00",                    "relationships": {                      "servers": {}                    }                  },                  "meta": {                    "resource": "https://panel.example.com/api/admin/users/1"                  }                },                "egg": {                  "object": "egg",                  "attributes": {                    "id": 9880,                    "uuid": "f05076e2-3f79-44fe-b9c3-007df7879f42",                    "author": "[email protected]",                    "name": "Mrs. Justina Gaylord",                    "description": "Mollitia modi deserunt aut ab provident perspiciatis quo. Nostrum aut adipisci quidem nostrum. Commodi incidunt iure odit.",                    "features": [                      "eula"                    ],                    "docker_image": "ghcr.io/pterodactyl/yolks:java_23",                    "docker_images": {                      "Java 23": "ghcr.io/pterodactyl/yolks:java_23"                    },                    "force_outgoing_ip": false,                    "config": {                      "files": {                        "server.properties": {                          "parser": "properties",                          "find": {                            "server-port": "{{server.build.default.port}}"                          }                        }                      },                      "startup": {                        "done": [                          "Done"                        ]                      },                      "stop": "stop",                      "logs": {                        "custom": true,                        "location": "logs/latest.log"                      },                      "file_denylist": [                        "secret.txt"                      ],                      "extends": 0                    },                    "startup": "java -jar test.jar",                    "script": {                      "privileged": true,                      "install": "string",                      "entry": "ash",                      "container": "alpine:3.4",                      "extends": 0                    },                    "created_at": "2026-09-22T14:45:26+00:00",                    "updated_at": "2026-09-22T14:45:26+00:00",                    "relationships": {                      "variables": {                        "object": "list",                        "data": [                          {                            "object": "egg_variable",                            "attributes": {}                          }                        ]                      },                      "tags": {                        "object": "list",                        "data": [                          {                            "object": "tag",                            "attributes": {},                            "meta": {}                          }                        ]                      },                      "servers": {}                    }                  },                  "meta": {                    "resource": "https://panel.example.com/api/admin/eggs/1"                  }                },                "variables": {                  "object": "list",                  "data": [                    {                      "object": "server_variable",                      "attributes": {                        "id": 1,                        "egg_id": 1,                        "name": "Server Jar File",                        "description": "The jar file to run.",                        "env_variable": "SERVER_JARFILE",                        "default_value": "server.jar",                        "server_value": "server.jar",                        "user_viewable": true,                        "user_editable": true,                        "rules": "required|string",                        "required": true,                        "sort_order": 1,                        "created_at": "2026-01-01T00:00:00+00:00",                        "updated_at": "2026-01-01T00:00:00+00:00"                      }                    }                  ]                },                "node": {                  "object": "node",                  "attributes": {                    "id": 13380,                    "uuid": "0c8baf15-4a20-49b5-b738-109796b553e1",                    "public": true,                    "name": "FactoryNode_K98YXFAsPq",                    "description": "string",                    "location_id": 16046,                    "fqdn": "74.174.140.253",                    "scheme": "http",                    "behind_proxy": false,                    "maintenance_mode": false,                    "memory": 1024,                    "memory_overallocate": 0,                    "disk": 10240,                    "disk_overallocate": 0,                    "upload_size": 100,                    "daemon_listen": 8080,                    "daemon_sftp": 2022,                    "daemon_base": "/var/lib/pterodactyl/volumes",                    "created_at": "2026-09-22T14:45:25+00:00",                    "updated_at": "2026-09-22T14:45:25+00:00",                    "servers_count": 0,                    "allocated_resources": {                      "memory": 0,                      "disk": 0                    },                    "relationships": {                      "location": {                        "object": "location",                        "attributes": {                          "id": 16053,                          "short": "yXYh3ig7",                          "long": "DtTf5dbTXXUq1fV3VBHWMKFch7pKkxN4",                          "nodes_count": 0,                          "servers_count": 0,                          "created_at": "2026-09-22T14:45:26+00:00",                          "updated_at": "2026-09-22T14:45:26+00:00",                          "relationships": {                            "nodes": {                              "data": []                            }                          }                        },                        "meta": {                          "resource": "https://panel.example.com/api/admin/locations/1"                        }                      }                    }                  },                  "meta": {                    "resource": "https://panel.example.com/api/admin/nodes/1"                  }                }              }            },            "meta": {              "resource": "https://panel.example.com/api/admin/servers/1"            }          }        ]      }    }  },  "meta": {    "resource": "https://panel.example.com/api/admin/mounts/1"  }}