requests library:
- Aggregated Crash Data
- Commercial Auto Garaging
- Commercial Auto Telematics (file upload + job polling)
requests library using pip:
Note
- Replace
YOUR_API_KEYwith your actual API key or token.- If any endpoint is restricted in your plan or environment, you may receive
403errors.- Make sure you have installed
requests(e.g.pip install requests).- The examples below show minimal usage. Adjust request payloads as needed.
Get an API Key
Create an API key in the dashboard here, which you’ll use to securely access the API. Store the key in a safe location, like a .zshrc file or another text file on your computer. Once you’ve generated an API key, export it as an environment variable in your terminal. For the sake of this example, we’ll useMATRISK_API_KEY.
Make your first API request
1. Aggregated Crash Data
View documentation Endpoint2. Commercial Auto Garaging
View documentation Endpoint
Note: Although this example is for commercial auto, the PPA garaging is the same structure (without the naics_code field).
3. Personal Auto Telematics
View documentation EndpointsNote: Although this example is for personal auto, the CA telematics is the same structure.Sample CSV
You can download a sample-ppa-telematics.csv file to try out.
a) Queue a Telematics Job
b) Check the Job Status
c) Retrieve Final Result
Additional Notes
- File Upload: When using the telematics endpoint, you must send your CSV as
multipart/form-data. The snippet above shows how to open a local file in Python and upload it. - Status Polling: Real-time processing can take several seconds to a few minutes. Continuously call the status endpoint until the
statuschanges fromprocessingtocompletedorfailed. Once completed, fetch the final result.

