Skip to main content
Sometimes a claim needs evidence attached to it, a photo of the damage, an invoice, anything that helps the carrier review it. This page walks through how to upload one of those documents to an existing claim. Uploading a document is a three-step process: you tell Opereit you’re about to upload a file, you upload the file itself to a link you get back, and then you tell Opereit the upload is done. For the full field-by-field breakdown, see the API reference for Initiate document upload and Confirm document upload.

Before you start

You’ll need:
  • An API key (see Authentication if you don’t have one yet).
  • The ID of an existing claim to attach the document to (you get this back when you create a claim, it looks like clm_3Ccox6eQUYYeg9RIo6qXCwGN3nQ).
  • The file itself, in one of the accepted formats: PDF, JPEG, PNG, or WEBP, and no bigger than 10 MB.

Step 1: Tell Opereit you’re about to upload a file

This registers the document and hands you back a one-time upload link:
Two things worth knowing here:
  • Hang onto id. You’ll pass it back in step 3 to confirm the upload.
  • content_type has to be one of application/pdf, image/jpeg, image/png, or image/webp. Anything else gets rejected with a 400 before anything is registered.

Step 2: Upload the file

metadata.upload_url is a link that’s ready to accept the raw file. Upload directly to it with an HTTP PUT:
Use the same Content-Type you sent in step 1. There’s nothing to parse from the response here, a successful PUT just means the upload went through.

Step 3: Confirm the upload

Once the file is uploaded, tell Opereit it’s there:
You can confirm up to 10 documents in a single request, just list all their IDs. Opereit checks that each file was actually received, and reports back one result per document:
If a document didn’t make it, it shows up with "status": "failed" and a reason instead, rather than silently being left out:
attached is just the count of documents with "status": "confirmed", it’s there so you don’t have to count the array yourself if you don’t need the per-document detail.
There’s currently no endpoint to list the documents already attached to a claim. Keep track of the ids you get back from step 1 on your side if you need to reference them again later.

Document statuses

A document moves through exactly two states, tracked in the status field you get back in step 1:

Confirm results

The status inside each entry of documents[] in step 3’s response is a different, smaller vocabulary, it’s the outcome of that specific confirm attempt, not the document’s lifecycle state:

Failure reasons

reason is only present when status is failed.

Handling errors

Both endpoints use the same error envelope as the rest of the API:
A rejected content type on a document you’re actively confirming (step 3) doesn’t come back as one of these top-level errors, it shows up as "status": "failed", "reason": "unsupported_content_type" for that specific document instead, see Failure reasons above.
Last modified on September 14, 2026