# Unregister a server

> Tell Bloxlytics a game server is shutting down, so it's taken off the live server list at once.

Sent when a game server shuts down. Bloxlytics records when the server stopped, removes it from the list of live servers and tells anyone watching the project in the dashboard that its bridge went offline. No more commands are sent to it.

The Luau bridge sends it from `game:BindToClose`. It's a courtesy, not a requirement: if a server stops without saying bye (for example, it crashes), Bloxlytics stops treating it as online 90 seconds after it was last heard from.

The body uses the same shape as a [poll](https://docs.bloxlytics.app/api/bridge/poll). Unlike the other bridge endpoints, bye has no per-project rate limit.

## Headers

- `Content-Type` (string, header, required): `application/json`.

- `Authorization` (string, header, required): `Bearer ` followed by the project's bridge key, `bxb_…`.

- `X-Bloxlytics-Project` (string, header, required): The experience's Universe ID (`game.GameId`).

- `X-Bloxlytics-Timestamp` (string, header, required): The current Unix time in seconds, within 120 seconds of Bloxlytics' clock.

- `X-Bloxlytics-Nonce` (string, header, required): A new random value for this request, 16 to 64 characters from `A–Z a–z 0–9 - { }`.

## Body

- `protocol` (number, body, required): Must be `1`.

- `jobId` (string, body, required): The id of the server that's stopping, up to 64 characters.

- `placeId` (integer, body, required): `game.PlaceId`. A whole number, `0` or more.

- `players` (integer[], body, default []): Accepted for compatibility with the poll body and ignored. The Luau bridge sends `[]`.

- `tags` (object, body): Accepted and ignored. Must still be valid [server tags](https://docs.bloxlytics.app/api/ingest/event-format#server-tags) if sent.

- `studio` (boolean, body): Accepted and ignored.

## Response

`200 OK`.

- `ok` (boolean, required): Always `true`. Saying bye for a server Bloxlytics doesn't know about still succeeds.

> **Note:** Bye only concerns the bridge's view of the server. The analytics SDK sends its own `$server_stop` event through [ingest](https://docs.bloxlytics.app/api/ingest/send-events) at shutdown, which also takes the server off the live list. Sessions of players still in the server are ended by their `$session_end` events, not by bye.

**Request example**

```bash cURL
curl -X POST https://api.bloxlytics.app/v1/bridge/bye \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer bxb_…" \
  -H "X-Bloxlytics-Project: <universe id>" \
  -H "X-Bloxlytics-Timestamp: $(date +%s)" \
  -H "X-Bloxlytics-Nonce: $(uuidgen)" \
  -d '{ "protocol": 1, "jobId": "<job id>", "placeId": 1234567890, "players": [] }'
```

**Response example**

```json 200
{ "ok": true }
```

```json 400
{ "error": { "code": "invalid_payload", "message": "placeId: Invalid input: expected number, received undefined" } }
```

```json 401
{ "error": { "code": "replayed", "message": "Nonce already used." } }
```
