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

# Set the primary country

> Mark a TenantCountry relation as the tenant primary operating country.

This route sets the provided `TenantCountry` as the only primary country for the current tenant.

Use the `TenantCountry` relation identifier, not the country code. For example, send `42` if the tenant-country relation for `CMR` has identifier `42`.

The change is transactional: the previous primary country is disabled and the target relation becomes the tenant's only primary relation.


## OpenAPI

````yaml en/api-reference/openapi.json PATCH /country/tenant-countries/{id}/primary
openapi: 3.1.0
info:
  title: Mysoleas API
  version: 3.0.0
  description: >-
    New Mysoleas architecture: business gateway, Mysoleas Identity Cloud, and
    SoleasPay ecosystem.
servers:
  - url: https://api.mysoleas.com
    description: Mysoleas gateway
  - url: https://account.mysoleas.com
    description: Mysoleas authentication
security:
  - spAuthToken: []
tags:
  - name: Identity Cloud
  - name: Plugin
  - name: Payment links
  - name: Subscriptions
  - name: Collections
  - name: Disbursements
  - name: Verification
  - name: Catalog
paths:
  /country/tenant-countries/{id}/primary:
    patch:
      tags:
        - Catalog
      summary: Set the primary operating country
      description: >-
        Atomically sets the provided TenantCountry as the current tenant's only
        primary country.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: Identifiant de la relation TenantCountry.
      responses:
        '200':
          description: Pays primaire mis a jour
        '400':
          description: Pays invalide ou inactif
        '401':
          description: Unauthenticated
        '404':
          description: Relation ou tenant introuvable
      security:
        - spAuthToken: []
components:
  securitySchemes:
    spAuthToken:
      type: apiKey
      in: header
      name: x-sp-auth-token
      description: >-
        JWT Bearer emis par Mysoleas Identity Cloud. Format: Bearer
        <access_token>.

````