> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fssportal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Countries

> Get list of available countries

# Get Countries

Get a list of all available countries.

## Endpoint

```
POST /api/v1/countries/index
```

<Note>This endpoint does not require authentication</Note>

## Headers

<ParamField header="X-API-Token" type="string" required>
  Your API access token. You can also set this globally in the API playground.
</ParamField>

<ParamField header="platform" type="string" required>
  The platform making the request: `WEB`, `IOS`, or `ANDROID`.
</ParamField>

## Request Body

```json theme={null}
{}
```

## Response

<ResponseField name="status" type="string">
  Success status
</ResponseField>

<ResponseField name="data" type="array">
  Array of countries
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST http://localhost/fss/public/api/v1/countries/index \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('http://localhost/fss/public/api/v1/countries/index', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({})
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": "success",
    "data": [
      {
        "id": 1,
        "name": "United States",
        "code": "US"
      },
      {
        "id": 2,
        "name": "Canada",
        "code": "CA"
      }
    ]
  }
  ```

  ```json Error Response theme={null}
  {
    "status": "error",
    "message": "Failed to fetch countries"
  }
  ```
</ResponseExample>
