> ## 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 a horse policy

> Creates a new horse policy record with detailed horse information.



## OpenAPI

````yaml /horse-api-reference/openapi.json post /policies
openapi: 3.0.1
info:
  title: OpenAPI For Horse Insurance
  description: API's that you need to use to issue insurance policies to your clients
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.yasmina.ai/api/v1/horse
  - url: https://production.yasmina.ai/api/v1/horse
security:
  - bearerAuth: []
paths:
  /policies:
    post:
      tags:
        - Policies
      summary: Create a horse policy
      description: Creates a new horse policy record with detailed horse information.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Thunderbolt
                proposer_name:
                  type: string
                  example: Ahmed Al Saeed
                owner_email:
                  type: string
                  format: email
                  example: ahmed@example.com
                owner_phone:
                  type: string
                  example: '+966512345678'
                date_of_birth:
                  type: string
                  format: date
                  example: '2018-05-20'
                sex:
                  type: string
                  enum:
                    - male
                    - female
                  example: female
                color:
                  type: string
                  example: Bay
                breed:
                  type: string
                  example: other
                breed_name:
                  type: string
                  example: Arabian Mix
                microchip_number:
                  type: string
                  example: '1234567890'
                purchased:
                  type: boolean
                  example: true
                purchase_date:
                  type: string
                  format: date
                  example: '2023-07-15'
                purchase_place:
                  type: string
                  example: Riyadh
                did_participate:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                  example: 'yes'
                participation_details:
                  type: string
                  example: Won first place in endurance race 2022
                has_abortion:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                  example: 'yes'
                abortion_details:
                  type: string
                  example: Occurred in 2021 due to illness
                has_embryo_transfers:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                  example: 'yes'
                embryo_transfers_details:
                  type: string
                  example: 2 embryo transfers completed
                recipient_or_donor:
                  type: string
                  enum:
                    - recipient
                    - donor
                  example: donor
                use:
                  type: string
                  example: racing
                declaration:
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                  example: 'yes'
                upload:
                  type: string
                  format: binary
              required:
                - name
                - owner_name
                - owner_email
                - owner_phone
                - date_of_birth
                - sex
                - color
                - breed
                - purchased
                - did_participate
                - has_abortion
                - has_embryo_transfers
                - use
                - declaration
      responses:
        '201':
          description: Horse policy created successfully
        '400':
          description: Validation error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````