FiveM CAD System API: Connect Your Game Server to CDE CAD

Learn how to integrate your FiveM server with CDE CAD using the REST API. Generate API keys, authenticate requests, and sync your game server with your CAD in real-time.

FiveM API integration overview

CDE CAD provides a REST API for FiveM servers to connect directly. Instead of manually entering data into the CAD, your FiveM server scripts can push and pull information automatically. When a player dials 911 in-game, the call appears on the dispatcher's screen instantly. When an officer runs a plate, the results come back from your CAD database in milliseconds. Generate API keys from the admin panel, authenticate with x-api-key headers, and send data between your game server and the CAD in real-time. The API follows standard REST conventions with JSON payloads, making it compatible with both Lua and JavaScript FiveM resources. Whether you are running a small private server or a large public community, the API scales to handle your traffic and keeps your CAD data perfectly synchronized with what is happening in-game.

API key management

Generate and manage FiveM API keys from the community admin panel's server integration section. Keys authenticate your FiveM server to the CDE CAD API, ensuring only authorized servers can access your community's data. Each community has its own isolated API access, so your records are never mixed with another community's data. Here is how the key management system works:

Common API endpoints

The CDE CAD API exposes a comprehensive set of endpoints for every common CAD operation. Create 911 calls from in-game, look up civilians by name, check vehicle registrations by plate, submit reports, update unit status, and send BOLO alerts. All accessible via standard HTTP requests from your FiveM Lua or JavaScript scripts. Here are the most commonly used endpoints:

Integration with FiveM scripts

Use Lua PerformHttpRequest or JavaScript fetch to call CDE CAD API endpoints from your FiveM server scripts. When a player dials 911 in-game, your script sends the call to CDE CAD, and dispatchers see it instantly on their dashboard. The same pattern works for plate lookups, civilian searches, report submissions, and every other API endpoint. Below are working examples for both Lua and JavaScript:

FiveM documents the Lua function, its arguments and the shape of its callback on the PerformHttpRequest reference page, which is worth reading before you handle errors in your own script.

Authentication & security

The CDE CAD API uses a layered authentication system to protect your community's data. The x-api-key header authenticates your FiveM server, the x-community-id header scopes requests to your community, and JWT Bearer tokens handle user-level authentication. Rate limiting and input validation provide additional layers of protection. Here is how each authentication method works:

Webhooks and what else can read the API

Webhooks are the other direction: the CAD posts to Discord when something happens, so staff see a new call, a status change or a BOLO in the channel they already watch. Each message carries the time, the units involved, the location and a link back to the record in the CAD.

The API returns JSON over HTTPS, so anything that can make an HTTP request can use it: a Node.js or Python Discord bot, a stats page on your community website, or a script that posts a weekly summary. Keep the API key on the server side of whatever you build, never in client code or a public repository.