Leyr
Setup Guides for our EHRs

Athena Practice

Athena Practice

Reviewed: 5 December 2025

Athena Practice is athenahealth's established cloud-based EHR and practice management platform designed for ambulatory care settings. The system serves outpatient clinics, physician offices, and specialty practices with a comprehensive suite that combines clinical documentation, scheduling, billing, and revenue cycle management in a single cloud-native platform. Known for its structured, template-driven approach to clinical workflows, athenaPractice emphasizes efficient documentation and strong revenue cycle performance, helping practices maximize collections and streamline claims management. The platform operates within athenahealth's broader network model, where practices benefit from shared insights and best practices across the user community.

Athena Practice

Setup Type

Self-Service with 3-Legged OAuth - You can obtain credentials yourself through athenahealth's developer portal. This integration uses a 3-legged OAuth flow, which requires your application to handle user authorization and pass the authorization code to Leyr.

Required Credentials

To integrate with Athena Practice in production or using your own credentials in Leyr Sandbox, you'll need:

  • Base URL
  • Auth URL (Redirect URI)
  • Client ID
  • Client Secret

Setup Guide

Step 1: Create Your Application

  1. Go to athenahealth's developer portal at https://mydata.athenahealth.com/my-apps
  2. Log in with your athenahealth account or create a new developer account
  3. Click "Add Application" in the top right corner to register a new app
  4. Fill in your application details:
    • Application Name - according to your needs, e.g. "Leyr Integration"
    • Redirect URI - this will be your auth_url (the URL where users will be redirected after authorization)
    • Configure any other required fields according to your use case
  5. After creating the application, you'll receive your Client ID and Client Secret - save these securely!

Step 2: Implement 3-Legged OAuth Flow

Athena Practice uses a 3-legged OAuth flow. This means your application must handle user authorization before making API requests through Leyr.

2.1 Construct the Authorization URL

Build the authorization URL using the following format:

{base_url}/oauth2/authorize?state=defaultState&scope=openid%20profile%20user/*.*%20offline_access&response_type=code&redirect_uri={auth_url}&aud={base_url}&client_id={client_id}

Parameters:

  • {base_url} - The Athena Practice API base URL
  • {auth_url} - Your registered redirect URI
  • {client_id} - Your application's Client ID

Example:

https://awesomeclinic.athenahealth.com/oauth2/authorize?state=defaultState&scope=openid%20profile%20user/*.*%20offline_access&response_type=code&redirect_uri=https://yourapp.com/callback&aud=https://awesomeclinic.athenahealth.com&client_id=your_client_id

2.2 Redirect User for Authorization

Direct your users to the constructed authorization URL. They will:

  1. Log in to their Athena Practice account (if not already logged in)
  2. Review and approve the requested permissions
  3. Be redirected back to your auth_url with an authorization code

2.3 Capture the Authorization Code

After the user authorizes your application, they will be redirected to your auth_url.

Important: Unlike many other implementations, Athena Practice, redirects to your page with POST request and code sent as a form field.

Extract the code value from the form payload.

Step 3: Pass the Code to Leyr API

When making requests to the Leyr API for Athena Practice, include the authorization code in a special header:

x-leyr-emr-oauth-code: AUTHORIZATION_CODE

Example request:

curl -X GET "https://api.leyr.io/api/emrs/athenapractice/care-units" \
  -H "x-leyr-client-id: YOUR_CLIENT_ID" \
  -H "x-leyr-client-secret: YOUR_CLIENT_SECRET" \
  -H "x-leyr-emr-oauth-code: AUTHORIZATION_CODE" \
  -H "Content-Type: application/json"
Important: You must include the x-leyr-emr-oauth-code header with a valid authorization code in every request to the Leyr API when working with Athena Practice.

OAuth Flow Summary

You're now ready to test and launch your integration with Athena Practice via Leyr. Check our API specification for implementation details.