> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/developer-tools/integrations/snyk-ci-cd-integrations/github-actions-for-snyk-setup-and-checking-for-vulnerabilities/regional-api-endpoints.md).

# Regional API endpoints

How to configure Snyk GitHub Actions to use a regional Snyk API endpoint, and troubleshoot related authentication errors

For information about using GitHub Actions with Snyk, visit [GitHub Actions for Snyk setup and checking for vulnerabilities](/developer-tools/integrations/snyk-ci-cd-integrations/github-actions-for-snyk-setup-and-checking-for-vulnerabilities.md).

By default, Snyk GitHub Actions use the `https://api.snyk.io` endpoint. To configure Snyk to use a different endpoint, set a `SNYK_API` environment variable in your workflow, for example, `https://api.eu.snyk.io`.

For more information about environment configuration, visit [Configure the Snyk CLI](/developer-tools/snyk-cli/configure-the-snyk-cli.md). For the list of available regions, visit [Regional hosting and data residency](https://github.com/snyk/user-docs/tree/main/snyk-data-and-governance/regional-hosting-and-data-residency.md#available-snyk-regions).

An example follows of how you can modify a Snyk GitHub Actions workflow to use an alternate endpoint:

```yaml
name: Example workflow using Snyk
on: push
jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Run Snyk to check for vulnerabilities
        uses: snyk/actions/node@master
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
          SNYK_API: https://api.us.snyk.io
```

## Troubleshooting

If a workflow fails to authenticate, the token and the API endpoint likely belong to different regions.

### Why this happens

Each Snyk region issues tokens that only work against that region's API endpoint. If `SNYK_API` points to the default endpoint, `https://api.snyk.io`, but your Snyk Organization is provisioned in a different region, Snyk rejects the request with an authentication error, even though the token itself is valid.

### Identify your region

Check your Snyk Organization's URL in the Snyk web UI, or contact your account team to confirm your region. New Enterprise and Pilot accounts provisioned in the United States through Automated Provisioning use SNYK-US-02 (`https://app.us.snyk.io`), not the default SNYK-US-01.

### Common mistakes

* Using the default `api.snyk.io` endpoint for an account provisioned outside SNYK-US-01
* Setting `SNYK_API` to the web UI URL, for example `https://app.us.snyk.io`, instead of the API URL, `https://api.us.snyk.io`
* Assuming SNYK-US-01 and SNYK-US-02 are interchangeable — both are US-hosted, but they are separate regions with separate endpoints


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/developer-tools/integrations/snyk-ci-cd-integrations/github-actions-for-snyk-setup-and-checking-for-vulnerabilities/regional-api-endpoints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
