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

Upload Bodycam Recording

Upload a bodycam recording clip to Sonoran CAD through the dedicated v2 bodycam endpoint.

Rate limit: 30 requests per minute Authenticated v2 endpoints are rate limited per API key rather than per IP address.

Upload a single bodycam clip into Sonoran CAD's bodycam recordings system through a dedicated v2 endpoint.

This API endpoint is available on Free and higher Sonoran CAD plans. The rolling 24 hour upload allowance depends on your plan. For more information, see our pricing.

Endpoint

POST https://api.sonorancad.com/v2/general/bodycam-recordings

Request Type

multipart/form-data

Authentication

Use standard v2 bearer authentication:

Header
Value
Description

Authorization

Bearer YOUR_API_KEY

Authenticates the request.

Form Fields

Name
Type
Required
Description

file

file

Yes

A single .webm clip to upload.

accountUuid

string

Conditionally

Account UUID that owns the recording. Provide exactly one of accountUuid, communityUserId, roblox, or discord.

communityUserId

string

Conditionally

Community user ID that owns the recording. Provide exactly one of accountUuid, communityUserId, roblox, or discord.

roblox

integer

Conditionally

Roblox user ID linked to the account that owns the recording. Provide exactly one target identifier.

discord

string

Conditionally

Discord user ID linked to the account that owns the recording. Provide exactly one target identifier.

durationMs

number

Yes

Clip duration in milliseconds. Must be between 1 and 120000.

identId

number

No

Identifier ID associated with the clip.

unitNumber

string

No

Unit number to store with the recording metadata.

unitLocation

string

No

Unit location to store with the recording metadata.

The authenticated API key determines the community. You do not need to send community, sessionId, username, or type=bodycam.

Upload Limits

Limit
Value

Max files per request

1

Allowed file type

.webm

Max file size

6000000 bytes (6 MB)

Max clip duration

120000 ms (120 seconds)

Bodycam uploads are also limited by your community's rolling 24 hour plan allowance:

Plan
Max uploaded bodycam minutes per 24 hours

Free

10

Standard

100

Pro

1000

Frontend Video Target

The backend validates the file type, file size, and duration. It does not directly reject uploads by resolution or frame rate.

To match the built-in Sonoran CAD frontend bodycam flow and stay within the 6 MB upload limit, send clips using these target settings:

Setting
Target

Resolution

960x540

Frame rate

10 FPS

Format

webm

The built-in frontend bodycam capture requests 960x540 at 10 FPS, and the recording uploader encodes clips as WebM with a 300000 bps video bitrate and 64000 bps audio bitrate. Third-party integrations should match those settings as closely as possible.

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 sonorancad export 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

Import this YAML into Postman with Import -> Raw text to create a single-endpoint request collection for this route.

Response

Successful requests return the uploaded file URL list.

Common Errors

Last updated

Was this helpful?