# Satisfactory Server HTTPS API (Tokens, Endpoints, Examples) (/docs/satisfactory/https-api)



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

Satisfactory dedicated servers expose an **HTTPS API** for automation and monitoring — check server health, read state, change settings, and shut the server down without opening the game. Everything runs on the game port over HTTPS.

Endpoint & Format [#endpoint--format]

|                  |                                                   |
| ---------------- | ------------------------------------------------- |
| **URL**          | `https://<your-ip>:7777/api/v1`                   |
| **Method**       | `POST` (some read-only queries also accept `GET`) |
| **Auth**         | `Authorization: Bearer <token>` header            |
| **Body**         | JSON: `{ "function": "<Name>", "data": { ... } }` |
| **Content-Type** | `application/json` (utf-8)                        |

The API listens on the **TCP** side of your game port (7777 by default) — the same port players use over UDP. No extra port needed.

> The server uses a self-signed certificate, so tools like `curl` need `-k` (insecure) or you must trust the cert.

Generate an API Token [#generate-an-api-token]

<Steps>
  <Step>
    Open the **Console** tab for your server on the [XGamingServer Panel](https://panel.xgamingserver.com).
  </Step>

  <Step>
    Run:

    ```
    server.GenerateAPIToken
    ```
  </Step>

  <Step>
    Copy the token it prints. Treat it like a password — it grants admin access to the API.
  </Step>
</Steps>

Example Calls [#example-calls]

Health check (no auth required) [#health-check-no-auth-required]

```bash
curl -k -X POST https://<ip>:7777/api/v1 \
  -H "Content-Type: application/json" \
  -d '{"function":"HealthCheck","data":{"ClientCustomData":""}}'
```

Query server state (no auth required) [#query-server-state-no-auth-required]

```bash
curl -k -X POST https://<ip>:7777/api/v1 \
  -H "Content-Type: application/json" \
  -d '{"function":"QueryServerState","data":{}}'
```

Returns the active session name, connected players, tech tier, game phase, and more.

Apply server options (admin token required) [#apply-server-options-admin-token-required]

```bash
curl -k -X POST https://<ip>:7777/api/v1 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"function":"ApplyServerOptions","data":{"UpdatedServerOptions":{"FG.AutosaveInterval":"300"}}}'
```

Shut the server down (admin token required) [#shut-the-server-down-admin-token-required]

```bash
curl -k -X POST https://<ip>:7777/api/v1 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"function":"Shutdown","data":{}}'
```

Common Functions [#common-functions]

| Function                                 | Auth  | Purpose                          |
| ---------------------------------------- | ----- | -------------------------------- |
| `HealthCheck`                            | None  | Is the server up and responsive? |
| `QueryServerState`                       | None  | Session, players, tier, phase    |
| `GetServerOptions`                       | None  | Read current server options      |
| `ApplyServerOptions`                     | Admin | Change server options live       |
| `RenameServer`                           | Admin | Set the server name              |
| `SetClientPassword` / `SetAdminPassword` | Admin | Manage passwords                 |
| `Shutdown`                               | Admin | Stop the server process          |

Use Cases [#use-cases]

* **Uptime monitoring** — poll `HealthCheck` from a monitor and alert on failure.
* **Player-count dashboards / Discord bots** — read `QueryServerState` on a schedule.
* **Automation** — apply settings or trigger a graceful shutdown before a scheduled restart.

Related Guides [#related-guides]

* [Server Configuration](/docs/satisfactory/server-config)
* [Save Management](/docs/satisfactory/save-management)
* [Ports Reference](/docs/satisfactory/ports)
