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

# Get User country

> Get country for the user if the user exists.

This endpoint returns the country for the user if the user exists. If the user does not exist, it returns an 400 error.

## Path Params

<ParamField path="user_id" type="string" required>
  A [User ID](../users/01_users).
</ParamField>

## Body Params

## Response

<ResponseField name="user" type="object">
  Object containing user details

  <Expandable>
    <ResponseField name="country" type="string">
      Country of the user
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="error_message" type="string">
  Details of the error if response is not a success response
</ResponseField>

<ResponseField name="success" type="string">
  Has the value false if the response is not a success
</ResponseField>

<RequestExample>
  ```
  curl --request GET \
       --url 'https://client.corrily.com/v1/users/test_user_id' \
       --header 'Accept: application/json' \
       --header 'Content-Type: application/json'
  ```

  ```js Node theme={null}
  const fetch = require("node-fetch");

  const url = "https://client.corrily.com/v1/users/test_user_id";
  const options = {
    method: "GET",
    headers: { Accept: "application/json", "Content-Type": "application/json" }
    }),
  };

  fetch(url, options)
    .then((res) => res.json())
    .then((json) => console.log(json))
    .catch((err) => console.error("error:" + err));
  ```

  ```python Python theme={null}
  import requests

  url = "https://client.corrily.com/v1/users/test_user_id"

  headers = {
      "Accept": "application/json",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)

  print(response.text)
  ```
</RequestExample>

<ResponseExample>
  ```json Example theme={null}
  {
      "user": {
          "country": "AU"
      }
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json Example theme={null}
  {
      "success": false,
      "error_message": "User does not exist"
  }
  ```
</ResponseExample>
