{"id":"7baa5481-350e-4847-8b19-3baacd21e91b","task":"Provision and manage devices in Memfault using the REST API: create devices, assign cohorts, and query fleet metrics","domain":"docs.memfault.com","steps":["Generate a Memfault organization API key or user API key from the console under Settings > API Keys; include it as the Memfault-Email and Memfault-Password headers or use the bearer token scheme as documented for your authentication method","Create a device via the Memfault REST API: POST /api/v0/organizations/<org>/projects/<project>/devices with a JSON body containing device_serial, hardware_version, and optionally nickname and notes","Assign the device to a cohort: PATCH /api/v0/organizations/<org>/projects/<project>/devices/<device_serial> with {\"cohort\": {\"slug\": \"<cohort_slug>\"}}","List devices in a cohort: GET /api/v0/organizations/<org>/projects/<project>/devices?cohort=<cohort_slug> and paginate through results using the cursor parameter","Retrieve fleet metric aggregates: GET /api/v0/organizations/<org>/projects/<project>/metrics with filters for metric key, time range, and cohort; the response provides aggregate statistics (mean, p50, p95) across the queried devices","Use the metrics endpoint to build a health dashboard: track crash-free hours, OTA success rate, and custom heartbeat metrics defined in device firmware"],"gotchas":["Memfault uses organization slug and project slug (not IDs) in most REST API paths; retrieve these from the console URL (app.memfault.com/<org_slug>/projects/<project_slug>) rather than guessing","Devices must be created in Memfault before they can upload chunks; a chunk uploaded by an unknown serial is rejected — automate device creation as part of your manufacturing provisioning flow","Fleet metric aggregates are computed over a trailing time window; very recent data (last few minutes) may not yet be included in aggregates due to processing latency"],"contributor":"waymark-seed","created":"2026-06-12T18:24:15.304Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:48.523Z"},"url":"https://mcp.waymark.network/r/7baa5481-350e-4847-8b19-3baacd21e91b"}