For the complete documentation index, see llms.txt. This page is also available as Markdown.

Acknowledge FiveM Configuration

Report the saved FiveM configuration revision loaded by a server.

POST https://api.sonorancad.com/v2/fivem/servers/{serverId}/configuration/acknowledge/{revision}

Report the saved revision that the resource has loaded. This updates appliedRevision and appliedAt for this community/server. It does not save settings, send a push event, or restart the resource.

Only acknowledge after loading the configuration. The examples use revision 4 as an example of a revision already loaded by the caller; substitute the revision you actually loaded. The official SonoranCADFiveM resource performs this acknowledgement automatically. An acknowledgement is not a health check of every submodule.

Authentication and parameters

Use Authorization: Bearer YOUR_API_KEY. serverId is the numeric ID of a server in that key's community (example: 1). SDKs can use the configured default server by passing nil / undefined / None / null as the first argument.

revision is the positive saved revision that was loaded. There is no request body. If a newer revision was saved before acknowledgement, the API returns 409; fetch again and apply the newer configuration before acknowledging it.

Example request

-- luarocks install sonoran.lua
-- For SonoranCADFiveM in-game usage, see the SonoranCADFiveM tab for the export-based client.
local Sonoran = require("sonoran")

local sonoran = Sonoran.createClient({
  product = Sonoran.productEnums.CAD,
  communityId = "YOUR_COMMUNITY_ID",
  apiKey = "YOUR_API_KEY",
  defaultServerId = 1
})

local response = sonoran.cad:acknowledgeFiveMConfigurationV2(1, 4)

if response.success then
  print("Loaded revision acknowledged")
else
  print(response.reason)
end

Use this tab when calling the v2 API from the server side of an in-game FiveM resource.

  • Sonoran.lua and Sonoran.js: use the sonorancad export to get the configured CAD client.

  • Sonoran.Net: FiveM exports do not return a .NET client, so read the protected Sonoran CAD convars and create a client.

  • Sonoran.py: FiveM does not run Python resources; use the Sonoran.py tab for external integrations.

The API key is stored in sonoran_apiKey as a protected FiveM convar. Grant an authorized server resource access with add_convar_permission your-resource-name read sonoran_apiKey.

Sonoran.lua

local cad = exports["sonorancad"]:getCadClient()
local response = cad:acknowledgeFiveMConfigurationV2(nil, 4)

if response.success then
  print("Loaded revision acknowledged")
else
  print(response.reason)
end

Sonoran.js

(async () => {
  const cad = exports["sonorancad"].getCadClient();
  const response = await cad.acknowledgeFiveMConfigurationV2(undefined, 4);

  if (response.success) {
    console.log(response.data);
  } else {
    console.error(response.reason);
  }
})();

Sonoran.Net

Import this YAML into Postman using Import > Raw text.

Response

200 OK returns {"success": true}. A repeated acknowledgement of the current revision succeeds and refreshes its applied timestamp. A stale or unsaved revision returns 409 Conflict.

401 means authentication failed. 404 means the server is not part of the authenticated community. Fetch configuration to inspect the saved and applied revisions.

Last updated

Was this helpful?