> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://one.miles-api.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://one.miles-api.com/_mcp/server.

# Country

GET https://api.milescaira.com/v7/country

Return country reference rows (optional ``?country=`` name-prefix filter).

Reference: https://one.miles-api.com/api-reference/account-users/account/country-v-7-country-get

## Servers

- `https://api.milescaira.com` (Production, default)
- `https://miles-usp-backend-uat-2-154625965269.asia-south1.run.app` (UAT)
- `http://localhost:8080` (Local)

## Request

### Query parameters

- `country` (string, optional, nullable) — Country-name prefix filter

## Response

### 200

Successful Response

- `data` (list of CountryDataOut, optional)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### CountryDataOut

Country dialing-code + flag reference row.

- `id` (string, required)
- `flag` (string, required)
- `country_name` (string, required)
- `country_code` (string, required)
- `phone_number_extension` (string, required)
- `number_length` (integer, required)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### ValidationErrorLocItems

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "flag": "string",
      "country_name": "string",
      "country_code": "string",
      "phone_number_extension": "string",
      "number_length": 1
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.milescaira.com/v7/country"

response = requests.get(url)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.milescaira.com/v7/country"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.milescaira.com/v7/country")
  .asString();
```