> For the complete documentation index, see [llms.txt](https://cde-inc.gitbook.io/cde-cad-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cde-inc.gitbook.io/cde-cad-documentation/rest-api/fivem-settings.md). Agents can also search and read this documentation through its [MCP server](https://cde-inc.gitbook.io/cde-cad-documentation/~gitbook/mcp).

# FiveM Settings Management

These endpoints require JWT authentication with Admin role privileges.

{% hint style="success" %}
**GET →** `/api/fivem-settings/:communityId/fivem-settings`
{% endhint %}

**Auth:** JWT + Admin

Retrieve the current FiveM integration settings for a community.

{% hint style="warning" %}
**PUT →** `/api/fivem-settings/:communityId/fivem-settings`
{% endhint %}

**Auth:** JWT + Admin

Update FiveM integration settings.

```
{
  "enableHeartbeat": true,
  "enable911": true,
  "enablePanic": true,
  "heartbeatInterval": 60,
  "serverName": "My RP Server"
}
```

{% hint style="info" %}
**POST →** `/api/fivem-settings/:communityId/api-key/generate`
{% endhint %}

**Auth:** JWT + Admin

Generate a new API key for the community. This invalidates any previously issued key.

**Response:**

```
{
  "apiKey": "fvm_newkey789abc123def456ghi",
  "message": "API key generated. Previous key has been revoked."
}
```

{% hint style="info" %}
**Quick Reference**

|                           |             |                                          |
| ------------------------- | ----------- | ---------------------------------------- |
| **Endpoint**              | **Auth**    | **Purpose**                              |
| POST /api/fivem/register  | None        | Register server                          |
| POST /api/fivem/heartbeat | API Key     | Server heartbeat                         |
| POST /api/fivem/911       | API Key     | Create 911 call                          |
| POST /api/fivem/panic     | API Key     | Panic button                             |
| GET /api/fivem/records    | API Key     | List records (alias of GET /api/records) |
| GET .../fivem-settings    | JWT + Admin | Get settings                             |
| PUT .../fivem-settings    | JWT + Admin | Update settings                          |
| POST .../api-key/generate | JWT + Admin | Generate API key                         |
| {% endhint %}             |             |                                          |
