Skip to main content
This page covers the shared conventions for the Prior Auth API. Use the generated OpenAPI pages in the sidebar for route-level request and response schemas.

Base URLs

EnvironmentBase URLCredential
Sandboxhttps://api.sandbox.trycollate.aiSandbox bearer token
Productionhttps://api.trycollate.aiProduction bearer token
The Quickstart uses sandbox because it includes /v1/sandbox/* testing calls.

Authentication

All /v1/* endpoints use bearer authentication. GET /health is public.
Authorization: Bearer your-token
Use:
  • a WorkOS organization API key or WorkOS session token for /v1/prior-auth/*, /v1/files/*, /v1/payers/*, and /v1/sandbox/*
Requests without a valid bearer token return 401 unauthorized.
Use the same base URL and bearer token for both the core integration routes and /v1/sandbox/* within sandbox. Sandbox and production use separate credentials, even when both credentials belong to the same WorkOS organization.
https://api.trycollate.ai does not expose /v1/sandbox/*. A valid production credential cannot be used to call sandbox-only routes.

Endpoint groups

Prior authorization

MethodEndpointPurpose
GET/v1/prior-auth/authorizationsList authorizations with cursor pagination and filters.
POST/v1/prior-auth/authorizationsCreate a draft authorization and resolve the matching questionnaire internally.
GET/v1/prior-auth/authorizations/{authorizationId}Read the current authorization state.
PATCH/v1/prior-auth/authorizations/{authorizationId}Update mutable case data.
POST/v1/prior-auth/authorizations/{authorizationId}/previewGenerate the current preview documents.
POST/v1/prior-auth/authorizations/{authorizationId}/attachmentsAttach a previously uploaded file.
DELETE/v1/prior-auth/authorizations/{authorizationId}/attachments/{attachmentId}Remove an attachment while the authorization is mutable.
POST/v1/prior-auth/authorizations/{authorizationId}/submitSubmit the authorization.
POST/v1/prior-auth/authorizations/{authorizationId}/cancelCancel the authorization.
GET/v1/prior-auth/authorizations/{authorizationId}/eventsList lifecycle events.
GET/v1/prior-auth/authorizations/{authorizationId}/artifactsList generated and payer-provided artifacts.
POST/v1/prior-auth/authorizations/{authorizationId}/actions/{actionId}/resolveResolve a payer request for information.

Files

MethodEndpointPurpose
POST/v1/filesCreate a file upload session.
PUT/v1/files/{fileId}/contentUpload file bytes.
POST/v1/files/{fileId}/completeMark the uploaded file ready for use.
GET/v1/files/{fileId}Read file metadata and the downloadUrl once the file is ready.

Sandbox

MethodEndpointPurpose
POST/v1/sandbox/prior-auth/authorizations/{authorizationId}/payer-eventsInject an approval, denial, or payer request for information for testing.

Payer catalog

MethodEndpointPurpose
GET/v1/payersList supported payers.

System

MethodEndpointPurpose
GET/healthHealth check.

Request conventions

JSON

Requests and responses use JSON unless the endpoint is uploading binary content or returning no response body.

Idempotency

POST /v1/prior-auth/authorizations and POST /v1/prior-auth/authorizations/{authorizationId}/submit accept an optional Idempotency-Key header.
Idempotency-Key: create-auth-abc123
Behavior:
  • same create key + same request body: returns the existing authorization
  • same create key + different request body: returns 409 idempotency_key_reused_with_different_request
  • same submit key + same authorization: returns the current submission result without duplicating artifacts
  • same submit key + different authorization: returns 409 idempotency_key_reused_for_different_authorization

Files

Supporting documents and sandbox payer documents are uploaded through the file API. The sequence is:
  1. POST /v1/files
  2. PUT /v1/files/{fileId}/content
  3. POST /v1/files/{fileId}/complete
  4. reference the resulting fileId from an authorization attachment request or sandbox payer event
The public contract does not require raw Blob URLs in request payloads. When you upload content with PUT /v1/files/{fileId}/content, set Content-Type to exactly the value you used when you created the file session.

Patch semantics

PATCH /v1/prior-auth/authorizations/{authorizationId} uses explicit merge rules:
  • patient, coverage, and requestedBy merge by field
  • locations.servicing and locations.referring replace the provided slot object
  • providers replaces the full provider collection
  • questionnaireResponse merges by linkId
  • incoming answers for disabled questionnaire items are rejected with questionnaire_item_not_enabled
  • previously stored answers are cleared automatically when an upstream answer disables their branch
Requirement-defining inputs are not mutable on the authorization. If payer coverage context or the coded service changes, create a new authorization.

Error shape

Every error response uses the same envelope:
{
  "code": "validation_error",
  "message": "Request validation failed.",
  "details": {
    "...": "..."
  },
  "issues": [
    {
      "field": "workflowState",
      "code": "invalid_enum",
      "message": "..."
    }
  ]
}
  • details is optional
  • issues is optional
Validation, query parsing, header parsing, and domain errors all use this shape.

Common errors

StatusCodeMeaning
400validation_errorRequest body, query parameters, or headers failed validation.
400invalid_cursorThe supplied pagination cursor is invalid.
400questionnaire_item_not_enabledA request tried to write an answer for a questionnaire item that is currently disabled.
401unauthorizedMissing or invalid bearer token.
403insufficient_permissionsThe credential is valid, but it does not have access to the target environment.
404unsupported_caseNo requirement template matches the provided coverage and service case.
404authorization_not_foundAuthorization ID not found.
404action_not_foundAction ID not found.
404attachment_not_foundAttachment ID not found.
404file_not_foundFile ID not found.
409validation_failedSubmit detected blocking validation issues and created validation_issue actions.
409authorization_not_submittableSubmit was attempted in the wrong state or while blocking actions were open.
409authorization_not_updatableUpdate was attempted in an immutable state.
409authorization_attachments_not_mutableAttachment mutation was attempted in an immutable state.
409authorization_not_cancellableCancel was attempted in a disallowed state.
409authorization_not_previewablePreview was attempted in a disallowed state.
409idempotency_key_reused_with_different_requestCreate idempotency key was reused with a different request body.
409idempotency_key_reused_for_different_authorizationSubmit idempotency key was reused for a different authorization.
409action_already_resolvedThe action was already resolved.
409action_not_resolvableThe action is system-managed and cannot be resolved manually.
409file_not_readyA file was referenced before upload completion.
409file_not_uploadedFile completion was requested before bytes were uploaded.
409file_upload_already_completedUpload content was sent again for a file that is already ready.
409file_content_type_mismatchUploaded file bytes used a Content-Type that does not match the file session.
409file_purpose_mismatchA file was used for the wrong operation, such as using a sandbox payer document as an authorization attachment.
409unsupported_attachment_mime_typeAn authorization attachment used an unsupported MIME type.
409inbound_event_not_allowed_for_stateA sandbox payer event was sent while the authorization was not pending_payer.

Pagination

List endpoints use cursor pagination.
ParameterTypeDefaultDescription
limitinteger25Number of items to return, from 1 to 100.
cursorstringOpaque cursor returned from a previous list response.
Response shape:
{
  "data": [],
  "pagination": {
    "hasMore": true,
    "nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAzLTEyVDA5OjAwOjAwLjAwMFoiLCJpZCI6ImNt..."
  }
}
Pass nextCursor back unchanged.

Filters

GET /v1/prior-auth/authorizations supports:
  • repeated workflowState query parameters
  • repeated decisionState query parameters
  • payerId
  • memberId
  • urgency
  • createdAfter
  • createdBefore
Example:
?workflowState=needs_input&workflowState=ready_to_submit&decisionState=pending
Invalid filter or cursor values return 400.

Previews, artifacts, and events

POST /v1/prior-auth/authorizations/{authorizationId}/preview is the pre-submit generation step. It returns:
  • submittable
  • validationIssues
  • contextRequirements
  • questionStates
  • activeRequirementGroups
  • supportingDocumentRequests
  • mappingSummary
  • documents.filledForm
  • documents.draftPacket
Authorization responses also include static supportingDocumentationGuidance, while preview exposes the currently active supportingDocumentRequests for the case in its present state. After submit, use the authorization, events, and artifacts endpoints to track lifecycle state and preserve the documents correlated to the case.

OpenAPI

The generated OpenAPI document on this site is the schema source of truth for:
  • request and response bodies
  • enum values
  • required fields
  • route-specific status codes