---
title: "Get a list of supported countries and their states"
method: GET
path: "/countries"
tags: ["Locations"]
---

# Get a list of supported countries and their states

`GET /countries`

## Request

- Base URL: `https://api.synup.com/api/v4`
- URL: `https://api.synup.com/api/v4/countries`
- Auth: none required
- TypeScript: <https://skmtc.dev/synup/apis/synup-api/docs/countries/get.ts> (a function with typed inputs; its response is checked against the schema)

This API fetches a list of supported countries, including their database IDs, ISO codes, and states. The retrieved ISO codes should be used as input values when creating or updating locations.

## Headers

- `Authorization` string, required

## Response `200`

Successfully retrieved the list of countries and their states

- object
  - `data` object
    - `supportedCountries` object[]: List of supported countries
      - `databaseId` integer: Unique identifier for the country in the database.
      - `id` string: Base64 encoded unique country identifier.
      - `iso` string: ISO 3166-1 alpha-2 country code.
      - `name` string: Name of the country.
      - `states` object[]: List of states within the country (if available).
        - `countryId` integer: Unique identifier of the country associated with the state.
        - `id` string: Unique identifier for the state.
        - `iso` string: State ISO code (if applicable).
        - `name` string: Name of the state.

## Other responses

- `401`: Unauthorized. API key is missing or invalid.
- `500`: Internal server error.

---

[API](https://skmtc.dev/synup/apis/synup-api.md) - [All operations](https://skmtc.dev/synup/apis/synup-api/llms.txt) - [OpenAPI document](https://skmtc.dev/synup/apis/synup-api/revisions/67de2d51c22e?raw)
