Skip to main content
GET
/
v1
/
countries
List of countries
curl --request GET \
  --url https://api.cloro.dev/v1/countries \
  --header 'Authorization: Bearer <token>'
[
  "AF",
  "AX",
  "AL",
  "DZ",
  "AS"
]

Overview

The Countries endpoint returns a list of all supported ISO 3166-1 alpha-2 country codes that can be used with the monitoring API. This endpoint provides the complete list of supported countries and territories.

Request Parameters

Required Parameters

None - this endpoint accepts a simple GET request with no parameters.

Optional Parameters

None

Example Usage

Basic Request

curl -X GET "https://api.cloro.dev/v1/countries" \
  -H "Authorization: Bearer sk_live_1234567890abcdef1234567890abcdef"

Response Schema

FieldTypeDescription
ResponsearrayArray of supported country codes in ISO 3166-1 alpha-2 format

Authentication

This endpoint requires authentication using a Bearer token in the Authorization header:
Authorization: Bearer sk_live_1234567890abcdef1234567890abcdef

Best Practices

Caching and Performance

PracticeRecommendationReason
Cache Duration24+ hoursCountry list rarely changes
ImplementationStore locally after first callReduces API calls and improves performance
ValidationUse for client-side country validationPrevents invalid country codes in monitor requests

Integration Guidelines

  1. Fetch Once: Retrieve the country list when your application initializes
  2. Validate Input: Use the list to validate country codes before sending monitor requests
  3. Handle Updates: Implement a refresh mechanism for occasional updates
  4. Error Handling: Have fallback behavior if the endpoint is temporarily unavailable

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

List of supported country codes

The response is of type string[].