Create Record
Create a new custom record using template replacement values.
POST https://api.sonorancad.com/v2/general/records
Rate limit:
30 requests per minuteAuthenticated v2 endpoints are rate limited per API key rather than per IP address.
Create a custom record for a target account.
Request Body
Use communityUserId by default, or provide exactly one of roblox, discord, or accountUuid as the target user.
The recommended path is to set useDictionary to true, provide the target recordTypeId, and pass replaceValues keyed by the template field placeholders. This avoids building the full record section and field structure yourself.
Advanced integrations may provide a full record object instead of useDictionary, recordTypeId, and replaceValues, but this is not recommended unless you need full control over the raw record payload.
This endpoint is also used to create civilian characters. The key difference is which template recordTypeId you submit.
Choosing a recordTypeId
recordTypeIdUse GET /v2/general/templates first if you need to inspect the templates available in your community.
Some built-in template families use fixed IDs from the backend, while custom templates keep the community-specific recordTypeId shown by the templates endpoint.
Record kind
type
recordTypeId to use
Notes
Character
7
7
Creates a civilian character for the target account.
Warrant
2
2
Built-in required type.
BOLO
3
3
Built-in required type.
License
4
4
Built-in required type.
Vehicle Registration
5
5
Built-in required type.
Custom Police Record
8
Community template ID
Check GET /v2/general/templates.
Custom Police Report
9
Community template ID
Check GET /v2/general/templates.
Custom Medical Record
10
Community template ID
Check GET /v2/general/templates.
Custom Medical Report
11
Community template ID
Check GET /v2/general/templates.
Custom Fire Record
12
Community template ID
Check GET /v2/general/templates.
Custom Fire Report
13
Community template ID
Check GET /v2/general/templates.
Custom DMV Record
14
Community template ID
Check GET /v2/general/templates.
Custom Lawyer Record
15
Community template ID
Check GET /v2/general/templates.
Custom Lawyer Report
16
Community template ID
Check GET /v2/general/templates.
If you are creating a character, send the character template ID (7) or the raw character record payload with type: 7. For anything else, use the template ID returned by the templates endpoint for that record.
Character Example
This example creates a civilian character for the target user by selecting the built-in character template:
For a non-character custom record, the same endpoint looks like this:
If you need to submit a fully assembled record, you can provide record instead. This is an advanced option and is not recommended for most integrations:
Example Request
Use this tab only when calling the v2 API from the server side of an in-game FiveM resource.
Sonoran.lua and Sonoran.js: use the
sonorancadexport to get the ready CAD client.Sonoran.Net: FiveM exports do not return a .NET client. Read the Sonoran CAD convars and create a fresh client.
Sonoran.py: FiveM does not run Python resources; use the Python tab for external integrations.
The API key is stored in sonoran_apiKey as a protected FiveM convar. FiveM restricts a convar after add_convar_permission is configured, so only explicitly permitted resources can read it. Grant another resource access with add_convar_permission your-resource-name read sonoran_apiKey. If you change the API key in config.json, fully restart the sonorancad resource before reading the updated convar value.
Sonoran.lua
Sonoran.js
Sonoran.Net
After getting the Lua export client:
Import this YAML into Postman with Import -> Raw text to create a single-endpoint request collection for this route.
Response
Successful requests return application/json.
Last updated
Was this helpful?

