> For the complete documentation index, see [llms.txt](https://api.senderwiz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.senderwiz.com/customer/countries/get-all-countries.md).

# Get All Countries

Retrieve the list of all countries supported by SenderWiz, including country name, code, and ID.

### 🌍 Get All Countries

Use this endpoint to fetch paginated country data used for company or contact address fields.

***

#### 🔹 HTTP Request

```http
GET API-URL/countries
```

***

#### 🧾 Query Parameters

| Parameter  | Default | Description                 |
| ---------- | ------- | --------------------------- |
| `page`     | 1       | Current page to retrieve.   |
| `per_page` | 10      | Items per page to retrieve. |

***

#### 🔐 Authorization Header

```
X-API-KEY: your-api-key-here
```

***

#### 💻 PHP Example

```php
// GET ALL ITEMS
$response = $endpoint->getCountries($pageNumber = 23, $perPage = 10);

// DISPLAY RESPONSE
echo '<pre>';
print_r($response->body);
echo '</pre>';
```

***

#### 📦 Sample JSON Response

```json
{
  "status": "success",
  "data": {
    "count": "240",
    "total_pages": 24,
    "current_page": 23,
    "next_page": 24,
    "prev_page": 22,
    "records": [
      {
        "country_id": "101",
        "name": "Tuvalu",
        "code": "TV"
      },
      {
        "country_id": "102",
        "name": "Uganda",
        "code": "UG"
      },
      {
        "country_id": "103",
        "name": "Ukraine",
        "code": "UA"
      },
      {
        "country_id": "104",
        "name": "United Arab Emirates",
        "code": "AE"
      },
      {
        "country_id": "105",
        "name": "United Kingdom",
        "code": "GB"
      },
      {
        "country_id": "106",
        "name": "United States",
        "code": "US"
      },
      {
        "country_id": "107",
        "name": "United States Minor Outlying Islands",
        "code": "UM"
      },
      {
        "country_id": "108",
        "name": "Uruguay",
        "code": "UY"
      },
      {
        "country_id": "109",
        "name": "Uzbekistan",
        "code": "UZ"
      },
      {
        "country_id": "110",
        "name": "Vanuatu",
        "code": "VU"
      }
    ]
  }
}
```
