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

# Get Countries

> Returns all available countries. Use the country `id` when setting a worker's `country_id`.

<Tip>
  Use the country `id` from this response when setting a worker's `country_id` via [Create Worker](/api-reference/v01.12.00/workers/create-worker) or [Edit Worker](/api-reference/v01.12.00/workers/edit-worker).
</Tip>


## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json GET /countries
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /countries:
    get:
      tags:
        - Configuration
      summary: Get Countries
      description: >-
        Returns all available countries. Use the country `id` when setting a
        worker's `country_id`.
      operationId: get-countries
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Country'
              examples:
                Countries list:
                  value:
                    - id: 2
                      name: United States
                    - id: 3
                      name: Canada
                    - id: 4
                      name: United Kingdom
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid category:
                  value:
                    code: CFG-100
                    error: Invalid category
                Invalid subcategory:
                  value:
                    code: CFG-200
                    error: Invalid subcategory for the specified category
                Invalid item:
                  value:
                    code: CFG-300
                    error: Invalid item for the specified subcategory
                Invalid value:
                  value:
                    code: CFG-400
                    error: Invalid value for the specified item
                Category required:
                  value:
                    code: CFG-500
                    error: Category is required
                Subcategory required:
                  value:
                    code: CFG-600
                    error: Subcategory is required
                Item required:
                  value:
                    code: CFG-700
                    error: Item is required
                Value required:
                  value:
                    code: CFG-800
                    error: Value is required
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid API key:
                  value:
                    code: ATH-100
                    error: Invalid or missing API key
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Resource not found:
                  value:
                    code: CFG-1100
                    error: Resource not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Internal server error:
                  value:
                    code: CFG-1000
                    error: An unexpected error occurred
components:
  schemas:
    Country:
      type: object
      description: A country record.
      properties:
        id:
          type: integer
          description: Country identifier. Use this value for `country_id` fields.
        name:
          type: string
          description: Country name.
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````