PolyAI integrates with eClinicalWorks (eCW) through SMART on FHIR, giving virtual agents read access to patient and operational data (subject to permissions). PolyAI handles the OAuth client-credentials token exchange on your behalf and uses scoped, short-lived access tokens for each FHIR request. This integration uses the eCW FHIR R4 API and the FHIR R4 specification standards.Documentation Index
Fetch the complete documentation index at: https://polyai-docs-ecw-integration.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
How to integrate eCW with PolyAI
To complete the integration, you register PolyAI as a trusted application in your eCW developer portal, then confirm the request in PolyAI Agent Studio so PolyAI can review and approve it.Step 1: Register PolyAI in your eCW developer portal
- Log in to the eCW developer portal.
- Open your app and start a new integration request.
- Select System (backend services) as the launch type and choose FHIR R4.
- Add the FHIR scopes your agent needs (for example,
system/Patient.read system/Group.read).
Step 2: Submit an integration request to the PolyAI eCW App
Invite the PolyAI eCW App as a trusted application using the client ID provided by your PolyAI representative. Make sure the scopes you select match what your agent needs to read during a call. Once all required fields are completed, submit the integration request in eCW.Step 3: Submit the request in PolyAI Agent Studio
After submitting the request in eCW:- Log in to PolyAI Agent Studio.
- Open your Project.
- Navigate to Integrations.
- Locate the eClinicalWorks integration tile.
- Click Submit Request.
Step 4: PolyAI review and approval
Once both steps are complete:- Your request will remain in a pending state.
- PolyAI will review the eCW integration request.
- PolyAI will reach out if additional information or configuration is required.
Differences from Epic
If you have used PolyAI’s Epic integration, eCW behaves similarly with a few practical differences:- Scopes are per-request. PolyAI requests a separate access token for each set of FHIR scopes and caches them independently.
- Tokens are shorter-lived. eCW access tokens default to 300 seconds, so PolyAI refreshes them more frequently than Epic’s 3600-second tokens.
Useful links
- SMART on FHIR documentation — Official SMART App Launch framework
- eCW FHIR developer portal — eCW’s FHIR API reference
- FHIR R4 specification — HL7 FHIR R4 standard
Support
If you encounter any issues during the eCW integration process or have questions about required permissions or scopes, please contact your PolyAI representative or PolyAI Support.Related pages
Epic
Connect to Epic EHR for patient data access.
Integrations overview
Browse all available integrations.

