POST https://api.sonorancad.com/v2/general/photos
Rate limit:Send files to a user in your CAD community. The existing10 requests per minute
Authenticated v2 endpoints are rate limited per API key rather than per IP address.
/v2/general/photos route and SDK method names are unchanged.
View and attach photos in CAD
Files sent through this endpoint appear in Recent files, where users can preview images, videos, audio clips, and PDFs, or open external links. In the custom record builder, add an Evidence section. When filling out a record, click Select evidence, select the files to attach, and click Attach selected. You can also use Add file URL to attach a link directly. Click an attachment to preview it, then save the record to keep the attachments. Record PDF exports include clickable file links. Existing Image fields continue to support photos: click the folder icon, choose a photo, and click Use photo or Replace photo.Multiple files and Evidence sections are available on CAD staging. Existing single-photo requests remain compatible with production.
Request Body
Authenticate withAuthorization: Bearer YOUR_API_KEY.
communityUserId(required): the recipient’s community user ID in the authenticated community.- Supply exactly one of
url(one URL) orurls(an array of 1–30 URLs). Each must be an absolute HTTPS URL without embedded credentials. Duplicate URLs are delivered once. The entire batch is validated before delivery. fileType(optional):image,video,audio,pdf, orlink. Applies to every URL in the request; use it for extensionless or signed file URLs. Without it, the type is inferred separately from each URL’s path. Unrecognized paths inurlsbecome external links; an unrecognized legacyurlremains an image.
jpg, jpeg, png, gif, webp, avif, bmp, svg), video (mp4, webm, mov, m4v, ogv), audio (mp3, wav, ogg, m4a, aac, flac, opus), and pdf. Playback and embedded PDF viewing depend on the browser and file host; Open file is available when a preview is unavailable.
"urls": ["https://cdn.example.com/signed-file"], "fileType": "pdf".
Example Request
- Sonoran.lua
- SonoranCADFiveM
- Sonoran.js
- Sonoran.py
- Sonoran.Net
- OpenAPI
- cURL
Response
Successful requests returnapplication/json. The delivered value counts recipient CAD connections, and files counts distinct file URLs. Delivery confirms routing to those connections, not that the browser loaded every file.
400 Bad Request for missing or invalid inputs and 404 Not Found when the recipient has no eligible CAD connection in the authenticated community.
