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

# Create company

> You need to create a company record before requesting medical insurance to the employees of the company



## OpenAPI

````yaml /medical-api-reference/openapi.json post /companies
openapi: 3.0.1
info:
  title: OpenAPI For SME Medical Insurance
  description: API's that you need to use to request insurance(s) for your clients
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://production.yasmina.ai/api/v1/medical
  - url: https://sandbox.yasmina.ai/api/v1/medical
security:
  - bearerAuth: []
paths:
  /companies:
    post:
      tags:
        - Company
      summary: Create company
      description: >-
        You need to create a company record before requesting medical insurance
        to the employees of the company
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the company
                name_ar:
                  type: string
                  description: Arabic name of the company
                sponsor_number:
                  type: string
                  description: Sponsor number
                email_address:
                  type: string
                  description: Email address
                phone_number:
                  type: string
                  description: Phone number
                commercial_registration_number:
                  type: string
                  description: The registration number of the company
              required:
                - name
                - name_ar
                - sponsor_number
                - email_address
                - phone_number
                - commercial_registration_number
      responses:
        '200':
          description: Company created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Problem in the values that you submitted
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: '42201'
                  message:
                    type: string
                    example: >-
                      The email address must be a valid email address. (and 1
                      more error)
                  details:
                    type: object
                    example:
                      email_address:
                        - The email address must be a valid email address.
                      commercial_registration_number:
                        - >-
                          The commercial registration number field cannot be
                          empty.
components:
  schemas:
    Company:
      type: object
      properties:
        name:
          type: string
        name_ar:
          type: string
        sponsor_number:
          type: string
        email_address:
          type: string
        phone_number:
          type: string
        commercial_registration_number:
          type: string
        client_id:
          type: string
        updated_at:
          type: string
        created_at:
          type: string
        id:
          type: integer
      example:
        name: Example company name
        name_ar: مثال اسم شركة
        sponsor_number: '789'
        email_address: example@example.com
        phone_number: '+966512345678'
        commercial_registration_number: '9876543210'
        client_id: a1b2c3d4-5678-90ab-cdef-1234567890ab
        updated_at: '2025-08-01T14:22:30.000000Z'
        created_at: '2025-08-01T14:22:30.000000Z'
        id: 42
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: '40101'
              message:
                type: string
                example: Unauthenticated
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````