Attaching files

Use this guide when an authorization requires supporting documents such as clinical notes, labs, or images.

Documents move through two resources: a File stores uploaded bytes, and an authorization attachment links a ready file to a requirement.

Supported files

Content typeFile extensions
application/pdf.pdf
image/jpeg.jpg, .jpeg
image/png.png

The filename extension must match contentType when an extension is present. Empty uploads, oversized uploads, mismatched file content, and unavailable storage targets return typed errors.

Upload and attach

1

Create a file

1POST /v1/files
2Authorization: Bearer <API_KEY>
3Content-Type: application/json
4
5{
6 "fileName": "clinical-note.pdf",
7 "contentType": "application/pdf",
8 "purpose": "authorization_attachment"
9}

The response includes a file in pending_upload and a single-use upload target.

2

Upload bytes

Upload the raw bytes exactly as instructed by upload.method, upload.url, and upload.headers.

1{
2 "upload": {
3 "strategy": "single_put",
4 "method": "PUT",
5 "url": "https://...",
6 "headers": {}
7 }
8}
3

Complete the file

1POST /v1/files/file_123/complete
2Authorization: Bearer <API_KEY>

Only files with status = ready can be attached. Files that fail validation remain unusable.

4

Attach the ready file

Read the latest authorization first and use its current version.

1POST /v1/prior-authorizations/auth_123/attachments
2Authorization: Bearer <API_KEY>
3If-Match: "7"
4Content-Type: application/json
5
6{
7 "fileId": "file_123",
8 "documentTypes": ["clinical_notes"],
9 "description": "Most recent oncology visit note"
10}

documentTypes must contain at least one value. Use the type values from requirements.documents.

Replace an attachment

Before the authorization is terminal:

  1. Delete the existing attachment.
  2. Upload and complete the replacement file.
  3. Attach the new file with the current authorization version.

Removing an attachment can reintroduce a blocker and move the authorization back to requirements resolution.

Attachment writes recompute requirements. They do not resume Collate processing by themselves.