# Set up a GraphQL API call to Healthie
URL: https://docs.awellhealth.com/docs/connect-systems/healthie-graphql-api-call

> For the complete documentation index, see [llms.txt](https://docs.awellhealth.com/llms.txt).



A care flow orchestrates actions in Healthie through the **GraphQL API call action**. This page covers
configuring it.

## Add the action [#add-the-action]

Add a **GraphQL API call action** to a step, the same way as any other
[API call action](/docs/connect-systems/the-api-call-action-graphql-and-rest).

## Point the URL at the right Healthie environment [#point-the-url-at-the-right-healthie-environment]

Healthie has two API environments, **staging** and **production**, with different endpoints. Check
Healthie's own documentation for the current URLs.

Store the URL in a [constant](/docs/connect-systems/store-static-values-in-constants): the endpoint
appears in every Healthie call, and the value differs between the Sandbox and Production environments.
A constant makes changing it a one-line edit instead of an audit of every action.

## Authenticate with an API key in the headers [#authenticate-with-an-api-key-in-the-headers]

Healthie authenticates with an API key in the request headers. Put the key in a constant too, and never
type it directly into an action.

## Configure the operation and variables [#configure-the-operation-and-variables]

Write the GraphQL query or mutation, and pass values in as variables. Use Awell
[variables](/docs/design-care-flows/use-variables-in-your-actions) to insert care flow data, such as
the patient identifier.

## Store what comes back [#store-what-comes-back]

Use JSON path to store response values in data points, so the rest of the care flow can use them.
Skip this and the response is discarded.

## Next steps [#next-steps]

If a Healthie setup requires OAuth rather than a static key, see
[Connecting to systems that require OAuth](/docs/connect-systems/oauth-client-credentials).
