# Palworld REST API Reference (/docs/palworld/rest-api)



import { Step, Steps } from 'fumadocs-ui/components/steps';

The REST API is the recommended way to manage your Palworld server programmatically. It replaces the deprecated RCON system.

Enabling the REST API [#enabling-the-rest-api]

In `Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`:

```
RESTAPIEnabled=True
RESTAPIPort=8212
AdminPassword="YourPassword123"
```

Authentication [#authentication]

All requests use HTTP Basic Auth:

* **Username:** `admin`
* **Password:** Your `AdminPassword` value

Base URL [#base-url]

```
http://<server-ip>:8212/v1/api
```

Endpoints [#endpoints]

Server Information [#server-information]

| Method | Path               | Description                                                 |
| ------ | ------------------ | ----------------------------------------------------------- |
| GET    | `/v1/api/info`     | Server info (version, name, world GUID)                     |
| GET    | `/v1/api/settings` | Current server settings                                     |
| GET    | `/v1/api/metrics`  | Server metrics (FPS, player count, uptime, base count)      |
| GET    | `/v1/api/players`  | All connected players (name, ID, IP, ping, level, location) |

Player Management [#player-management]

| Method | Path            | Body                                    | Description    |
| ------ | --------------- | --------------------------------------- | -------------- |
| POST   | `/v1/api/kick`  | `{"userid": "id", "message": "reason"}` | Kick a player  |
| POST   | `/v1/api/ban`   | `{"userid": "id", "message": "reason"}` | Ban a player   |
| POST   | `/v1/api/unban` | `{"userid": "id"}`                      | Unban a player |

Server Control [#server-control]

| Method | Path               | Body                                        | Description              |
| ------ | ------------------ | ------------------------------------------- | ------------------------ |
| POST   | `/v1/api/announce` | `{"message": "text"}`                       | Broadcast to all players |
| POST   | `/v1/api/save`     | *(none)*                                    | Force save world         |
| POST   | `/v1/api/shutdown` | `{"waittime": 60, "message": "Restarting"}` | Graceful shutdown        |
| POST   | `/v1/api/stop`     | *(none)*                                    | Force immediate stop     |

Example: Get Player List [#example-get-player-list]

```bash
curl -u admin:YourPassword123 http://localhost:8212/v1/api/players
```

Example: Broadcast Message [#example-broadcast-message]

```bash
curl -X POST -u admin:YourPassword123 \
  -H "Content-Type: application/json" \
  -d '{"message": "Server restarting in 5 minutes!"}' \
  http://localhost:8212/v1/api/announce
```

Response Codes [#response-codes]

| Code | Meaning                                  |
| ---- | ---------------------------------------- |
| 200  | Success                                  |
| 400  | Bad request (missing/invalid parameters) |
| 401  | Unauthorized (wrong password)            |

> ⚠️ **Security:** The REST API is not designed for direct internet exposure. Use within local networks or behind a reverse proxy.

Related Guides [#related-guides]

* [Admin Commands](/docs/palworld/admin-commands)
* [Remote Console (RCON)](/docs/palworld/remote-console)
* [Ports Reference](/docs/palworld/ports-reference)
