Delivering setup files to enrolled devices
When a device is enrolled into an Organization, you often need it to download a JSON file containing setup information. The simplest way to do this is with model files and the device Files API.
Recommended approach
- Upload the setup file as a model file (Partner Portal → Models → Files) with a stable name.
- When the device connects, its firmware calls
GET /v1/devices/{id}/files. This single call returns every file attached to the model, each with itsname,url, andchecksum. - The firmware matches on name, downloads the file from its
url, and verifies thechecksum.
One call, and the device has its file.
Tip: match by name, not by file idThe file id changes whenever the file is re-uploaded or versioned. Matching on the file name means you can update or replace the file at any time without changing the firmware.
Can the file be attached to the Organization instead?
Not currently. The Organization API doesn't expose file endpoints, and devices authenticate as devices (not as the organization), so they can't pull organization-scoped files. Model files are the mechanism for device file delivery.
A note on visibility across tenants
Model files are attached at the model level, so the same file is available to all devices of that model, across every tenant. This works cleanly when the setup file is common and non-sensitive.
If the setup information ever needs to differ per organization or per device — or carry tenant-specific data — use the device Configuration channel (GET /v1/devices/{id}/config) instead. It is per-device and scoped to the organization.
Updated about 9 hours ago
