Skip to main content
Python
import requests

url = 'https://api.simplex.sh/pa_submit'
headers = {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json'
}
data = {
    'portal': 'covermymeds',
    'type': 'pharmacy',
    'drug_id': '221271',
    'diagnosis_code': 'E11.9',
    'diagnosis_name': 'Type 2 diabetes mellitus without complications',
    'plan': 'Aetna',
    'state': 'CA',
    'patient': {
        'first_name': 'John',
        'last_name': 'Smith',
        'dob': '01/15/1980',
        'sex': 'm',
        'zip_code': '90210',
        'state': 'CA',
        'street': '123 Main St',
        'city': 'Beverly Hills',
        'phone': '310-555-1234'
    },
    'provider': {
        'npi': '1234567890',
        'first_name': 'Jane',
        'last_name': 'Doctor',
        'address1': '456 Medical Dr',
        'city': 'Los Angeles',
        'state': 'CA',
        'zip': '90001',
        'phone': '213-555-6789',
        'fax': '213-555-6780'
    },
    'prescription': {
        'quantity': '1',
        'days_supply': '30'
    }
}

response = requests.post(url, headers=headers, json=data)
result = response.json()
print(f"PA created: {result['success']}")
print(f"Key: {result['redirect_key']}")
print(f"URL: {result['redirect_url']}")
{
  "success": true,
  "redirect_key": "<string>",
  "redirect_url": "<string>"
}
Submit a prior authorization request. All drug and diagnosis identifiers must be exact — use Search Drugs and Search ICD Codes to resolve them first. This is a two-phase process:
  1. Resolve — Search for drugs and ICD codes, pick exact matches
  2. Submit — Use the resolved IDs to create the prior authorization
You cannot pass fuzzy drug names or diagnosis descriptions to this endpoint. Both drug_id and diagnosis_code must be exact identifiers resolved via the search endpoints. The submission will be rejected if unresolved values are provided.
Forms are resolved automatically. When you submit a prior auth, the system searches for available ePA forms based on the drug, plan, and state combination and selects the best match. You do not need to specify a form ID.

Authorizations

X-API-Key
string
header
required

Simplex API Key

Body

application/json
portal
enum<string>
required

The prior authorization portal to submit to (e.g. "covermymeds").

Available options:
covermymeds
credential_name
string
required

The name of the stored credential to authenticate with the portal. Create one via the Create Credential endpoint.

type
enum<string>
required

The type of prior authorization.

Available options:
pharmacy,
medical,
dental
drug_id
string
required

Exact Drug DDID (e.g. "221271"). Obtained from the search_drugs endpoint.

diagnosis_code
string
required

Exact ICD-10 code (e.g. "E11.9"). Obtained from the search_icd_codes endpoint.

diagnosis_name
string
required

Full ICD-10 description (e.g. "Type 2 diabetes mellitus without complications").

plan
string
required

Insurance plan name (e.g. "Aetna").

state
string
required

Two-letter state code (e.g. "CA").

patient
object
required

Patient information.

provider
object
required

Prescribing provider information.

prescription
object

Prescription details.

Response

200 - application/json

Submit prior auth response

success
boolean
required

Whether the prior authorization was created successfully.

redirect_key
string
required

Unique key for the created PA request.

redirect_url
string
required

URL to the PA request in the payer portal.