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

# Create Clinic

> ### Overview
The Create Clinic API allows you to register a new clinic for your business, including its name, address, pincode, contact number, city, state, and assigned doctors.

**Endpoint:** `{{HOST}}/cdr/v1/clinic`

**Method:** POST
### Request Parameters

| Parameter   | Type    | Description                                   | Required |
| ----------- | ------- | --------------------------------------------- | -------- |
| name        | string  | Name of the clinic                            | Yes      |
| address     | string  | Address of the clinic                         | Yes      |
| partner_id  | string  | Unique id of the clinic in partner's system.  | No      |
| pincode     | string  | Pincode of the clinic                         | No       |
| contact     | string  | Contact number                                | No       |
| doctor_ids  | array   | List of doctor Eka IDs to assign to this clinic| No      |
| partner_doctor_ids  | array   | List of partner doctor IDs to assign to this clinic| No      |
| city        | string  | City name                                     | No       |
| state       | string  | State name                                    | No       |
### Response Parameters

| Parameter   | Type    | Description                                   |
| ----------- | ------- | --------------------------------------------- |
| status      | string  | Status of the response (e.g., "success")      |
| ekaid       | string  | Unique identifier for the created clinic      |



## OpenAPI

````yaml post /cdr/v1/clinic/
openapi: 3.0.0
info:
  title: Ekacare API & Webhook Documentation
  contact: {}
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /cdr/v1/clinic/:
    post:
      tags:
        - Doctor and clinic API
      summary: Create Clinic
      description: >-
        ### Overview

        The Create Clinic API allows you to register a new clinic for your
        business, including its name, address, pincode, contact number, city,
        state, and assigned doctors.


        **Endpoint:** `{{HOST}}/cdr/v1/clinic`


        **Method:** POST

        ### Request Parameters


        | Parameter   | Type    | Description                                  
        | Required |

        | ----------- | ------- | ---------------------------------------------
        | -------- |

        | name        | string  | Name of the clinic                           
        | Yes      |

        | address     | string  | Address of the clinic                        
        | Yes      |

        | partner_id  | string  | Unique id of the clinic in partner's system. 
        | No      |

        | pincode     | string  | Pincode of the clinic                        
        | No       |

        | contact     | string  | Contact number                               
        | No       |

        | doctor_ids  | array   | List of doctor Eka IDs to assign to this
        clinic| No      |

        | partner_doctor_ids  | array   | List of partner doctor IDs to assign
        to this clinic| No      |

        | city        | string  | City name                                    
        | No       |

        | state       | string  | State name                                   
        | No       |

        ### Response Parameters


        | Parameter   | Type    | Description                                  
        |

        | ----------- | ------- | ---------------------------------------------
        |

        | status      | string  | Status of the response (e.g., "success")     
        |

        | ekaid       | string  | Unique identifier for the created clinic     
        |
      operationId: CreateClinic
      parameters:
        - name: auth
          in: header
          description: >-
            The auth token of the business. It is used to authenticate the
            client. This should be fetched from auth api.
          required: true
          style: simple
          schema:
            type: string
            example: >-
              eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
      requestBody:
        description: Request body for creating a clinic
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - address
              properties:
                name:
                  type: string
                  description: Name of the clinic
                  example: Sunrise Clinic
                address:
                  type: string
                  description: Address of the clinic
                  example: 123 Main Street, Block A
                partner_id:
                  type: string
                  description: Unique identifier of the clinic in the partner’s system
                  example: Clinic_321_Indore
                pincode:
                  type: string
                  description: Pincode of the clinic
                  example: '560001'
                contact:
                  type: string
                  pattern: ^\d{10,11}$
                  description: Contact number (10 or 11 digits)
                  example: '9876543210'
                doctor_ids:
                  type: array
                  items:
                    type: string
                  description: List of doctor Eka IDs to assign to this clinic
                  example:
                    - '171266028552522'
                    - '171266028552523'
                partner_doctor_ids:
                  type: array
                  items:
                    type: string
                  description: List of partner doctor IDs to assign to this clinic
                  example:
                    - Part_Doc_1
                    - Part_Doc_2
                city:
                  type: string
                  description: City name
                  example: Bangalore
                state:
                  type: string
                  description: State name
                  example: Karnataka
            example:
              name: Sunrise Clinic
              address: 123 Main Street, Block A
              partner_id: Clinic_321_Indore
              pincode: '560001'
              contact: '9876543210'
              doctor_ids:
                - '171266028552522'
                - '171266028552523'
              partner_doctor_ids:
                - Part_Doc_1
                - Part_Doc_2
              city: Bangalore
              state: Karnataka
      responses:
        '201':
          description: Created - Clinic successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  ekaid:
                    type: string
                    description: Unique identifier for the created doctor
                    example: do1769174683513
        '400':
          description: Bad Request - Invalid or missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  <field>:
                    type: array
                    items:
                      type: string
                      example: This field is required.
                  message:
                    type: array
                    items:
                      type: string
                      example: >-
                        Only one of doctor_ids or partner_doctor_ids should be
                        provided, not both.

````