> ## 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.

# Issue policy

> For issuing a new policy



## OpenAPI

````yaml /property-api-reference/openapi.json post /policies
openapi: 3.0.1
info:
  title: OpenAPI For Property Insurance
  description: APIs for requesting and managing policies for your clients
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.yasmina.ai/api/v1/property
  - url: https://production.yasmina.ai/api/v1/property
security:
  - bearerAuth: []
paths:
  /policies:
    post:
      tags:
        - Policies
      summary: Issue policy
      description: For issuing a new policy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                insurance_provider:
                  type: string
                  example: walaa
                  enum:
                    - walaa
                personal_details:
                  type: object
                  properties:
                    email:
                      type: string
                      format: email
                      example: fahad@gmail.com
                    phone_number:
                      type: string
                      example: '+966501234567'
                    name:
                      type: string
                      example: Fahad Al-Qahtani
                    birthdate:
                      type: string
                      format: date
                      example: '1990-05-14'
                    nationality:
                      type: string
                      example: SA
                      enum:
                        - SA
                        - AF
                        - AL
                        - DZ
                        - AS
                        - AD
                        - AO
                        - AI
                        - AQ
                        - AG
                        - AR
                        - AM
                        - AW
                        - AU
                        - AT
                        - AZ
                        - BS
                        - BH
                        - BD
                        - BB
                        - BY
                        - BE
                        - BZ
                        - BJ
                        - BM
                        - BT
                        - BO
                        - BA
                        - BW
                        - BV
                        - BR
                        - BQ
                        - IO
                        - VG
                        - BN
                        - BG
                        - BF
                        - BI
                        - KH
                        - CM
                        - CA
                        - CT
                        - CV
                        - KY
                        - CF
                        - TD
                        - CL
                        - CN
                        - CX
                        - CC
                        - CO
                        - KM
                        - CG
                        - CD
                        - CK
                        - CR
                        - HR
                        - CU
                        - CY
                        - CZ
                        - CI
                        - DK
                        - DJ
                        - DM
                        - DO
                        - NQ
                        - DD
                        - EC
                        - EG
                        - SV
                        - GQ
                        - ER
                        - EE
                        - ET
                        - FK
                        - FO
                        - FJ
                        - FI
                        - FR
                        - GF
                        - PF
                        - TF
                        - FQ
                        - GA
                        - GM
                        - GE
                        - DE
                        - GH
                        - GI
                        - GR
                        - GL
                        - GD
                        - GP
                        - GU
                        - GT
                        - GG
                        - GN
                        - GW
                        - GY
                        - HT
                        - HM
                        - HN
                        - HK
                        - HU
                        - IS
                        - IN
                        - ID
                        - IR
                        - IQ
                        - IE
                        - IM
                        - IT
                        - JM
                        - JP
                        - JE
                        - JT
                        - JO
                        - KZ
                        - KE
                        - KI
                        - KW
                        - KG
                        - LA
                        - LV
                        - LB
                        - LS
                        - LR
                        - LY
                        - LI
                        - LT
                        - LU
                        - MO
                        - MK
                        - MG
                        - MW
                        - MY
                        - MV
                        - ML
                        - MT
                        - MH
                        - MQ
                        - MR
                        - MU
                        - YT
                        - FX
                        - MX
                        - FM
                        - MI
                        - MD
                        - MC
                        - MN
                        - ME
                        - MS
                        - MA
                        - MZ
                        - MM
                        - NA
                        - NR
                        - NP
                        - NL
                        - AN
                        - NT
                        - NC
                        - NZ
                        - NI
                        - NE
                        - NG
                        - NU
                        - NF
                        - KP
                        - VD
                        - MP
                        - 'NO'
                        - OM
                        - PC
                        - PK
                        - PW
                        - PS
                        - PA
                        - PZ
                        - PG
                        - PY
                        - YD
                        - PE
                        - PH
                        - PN
                        - PL
                        - PT
                        - PR
                        - QA
                        - RO
                        - RU
                        - RW
                        - RE
                        - BL
                        - SH
                        - KN
                        - LC
                        - MF
                        - PM
                        - VC
                        - WS
                        - SM
                        - SN
                        - RS
                        - CS
                        - SC
                        - SL
                        - SG
                        - SK
                        - SI
                        - SB
                        - SO
                        - ZA
                        - GS
                        - KR
                        - ES
                        - LK
                        - SD
                        - SR
                        - SJ
                        - SZ
                        - SE
                        - CH
                        - SY
                        - ST
                        - TW
                        - TJ
                        - TZ
                        - TH
                        - TL
                        - TG
                        - TK
                        - TO
                        - TT
                        - TN
                        - TR
                        - TM
                        - TC
                        - TV
                        - UM
                        - PU
                        - VI
                        - UG
                        - UA
                        - SU
                        - AE
                        - GB
                        - US
                        - ZZ
                        - UY
                        - UZ
                        - VU
                        - VA
                        - VE
                        - VN
                        - WK
                        - WF
                        - EH
                        - YE
                        - ZM
                        - ZW
                        - AX
                    nationality_id:
                      type: string
                      example: '1023456789'
                    gender:
                      type: string
                      enum:
                        - M
                        - F
                  required:
                    - email
                    - phone_number
                    - name
                    - birthdate
                    - nationality
                    - nationality_id
                building_details:
                  type: object
                  properties:
                    building_age:
                      type: integer
                      example: 8
                    building_type:
                      type: string
                      example: Apartment
                      enum:
                        - villa
                        - apartment
                        - private_accommodation
                    apartment_size:
                      type: integer
                      example: 120
                  required:
                    - building_age
                    - building_type
                    - apartment_size
                address:
                  type: object
                  properties:
                    street_name:
                      type: string
                      example: King Abdulaziz Road
                    building_number:
                      type: string
                      example: '345'
                    district_name:
                      type: string
                      example: Al Olaya
                    city_name:
                      type: string
                      example: Riyadh
                      enum:
                        - Abha
                        - Abu Arish
                        - Ad Dair
                        - Ad Darb
                        - Ad Dilam
                        - Ad Diriyah
                        - Ad Duwadimi
                        - Adam
                        - Afif
                        - Ahad Al Masarihah
                        - Ahad Rufaydah
                        - Al Aflaj
                        - Al Ahsa
                        - Al Aqiq
                        - Al Ardiyat
                        - Al Aridah
                        - Al Asyah
                        - Al Aydabi
                        - Al Bad
                        - Al Badai
                        - Al Bahah
                        - Al Birk
                        - Al Bukayriyah
                        - Al Ghat
                        - Al Ghazalah
                        - Al Hait
                        - Al Hajrah
                        - Al Hariq
                        - Al Harjah
                        - Al Harth
                        - Al Hinakiyah
                        - Al Is
                        - Al Jumum
                        - Al Kamil
                        - Al Khafji
                        - Al Kharj
                        - Al Khurmah
                        - Al Lith
                        - Al Mahd
                        - Al Majardah
                        - Al Majmaah
                        - Al Mandaq
                        - Al Midhnab
                        - Al Mukhwah
                        - Al Muwayh
                        - Al Muzahimiyah
                        - Al Nuayriyah
                        - Al Qara
                        - Al Qatif
                        - Al Qunfudhah
                        - Al Qurayyat
                        - Al Quwayiyah
                        - Al Udayd
                        - Al Ula
                        - Al Uwayqilah
                        - Al Wajh
                        - An Nabhaniyah
                        - An Namas
                        - Ar Rass
                        - Ar Rayn
                        - Ar Rayth
                        - Arar
                        - As Sulaymi
                        - As Sulayyil
                        - Ash Shamli
                        - Ash Shimasiyah
                        - Ash Shinan
                        - At Tuwal
                        - Az Zulfi
                        - Badr
                        - Badr Al Janub
                        - Bahrah
                        - Baljurashi
                        - Balqarn
                        - Bani Hasan
                        - Baqa
                        - Bariq
                        - Baysh
                        - Bishah
                        - Buqayq
                        - Buraydah
                        - Damad
                        - Dammam
                        - Dariyah
                        - Dawamat Al Jandal
                        - Duba
                        - Duruma
                        - Farasan
                        - Farat Ghamid Az Zinad
                        - Fayfa
                        - Hafar Al Batin
                        - Hail
                        - Haqil
                        - Harub
                        - Hawtat Bani Tamim
                        - Hubuna
                        - Huraymila
                        - Jazan
                        - Jeddah
                        - Jubail
                        - Khamis Mushayt
                        - Khaybar
                        - Khobar
                        - Khubash
                        - Khulays
                        - Makkah
                        - Marat
                        - Mawqaq
                        - Maysan
                        - Medina
                        - Muhayil
                        - Najran
                        - Qaryah Al Ulya
                        - Qilwah
                        - Rabigh
                        - Rafha
                        - Ranyah
                        - Ras Tannurah
                        - Rijal Al Ma
                        - Riyadh
                        - Riyadh Al Khabra
                        - Rumah
                        - Sabya
                        - Sakaka
                        - Samtah
                        - Sarat Abidah
                        - Shaqra
                        - Sharurah
                        - Simira
                        - Tabuk
                        - Taif
                        - Tanumah
                        - Tarib
                        - Tathlith
                        - Tayma
                        - Thadiq
                        - Thar
                        - Tubarjal
                        - Turayf
                        - Turubah
                        - Umluj
                        - Unayzah
                        - Uqlat As Suqur
                        - Uyun Al Jiwa
                        - Wadi Ad Dawasir
                        - Wadi Al Fara
                        - Yadamah
                        - Yanbu
                        - Zahran Al Janub
                    additional_number:
                      type: string
                      example: '1234'
                    zip_code:
                      type: string
                      example: '12233'
                    unit_number:
                      type: string
                      example: 12B
                  required:
                    - street_name
                    - building_number
                    - district_name
                    - city_name
                    - additional_number
                    - zip_code
                    - unit_number
                property_cost:
                  type: number
                  example: 500000
                contents_cost:
                  type: number
                  example: 100000
                start_date:
                  type: string
                  format: date
                  description: >-
                    Desired policy start date in YYYY-MM-DD format. Must be
                    tomorrow or later.
                  example: '2025-12-11'
                has_agreed_to_terms_and_conditions:
                  type: boolean
                  example: true
              required:
                - insurance_provider
                - personal_details
                - building_details
                - address
                - start_date
                - has_agreed_to_terms_and_conditions
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Problem in the values that you submitted
          content:
            application/json:
              schema:
                type: object
                example:
                  code: '42201'
                  message: The insurance provider field cannot be empty.
                  details:
                    insurance_provider:
                      - The insurance provider field cannot be empty.
components:
  schemas:
    Policy:
      type: object
      properties:
        id:
          type: integer
          example: 655
        meta_data:
          type: object
          properties:
            insurance_provider:
              type: string
              example: walaa
            has_agreed_to_terms_and_conditions:
              type: boolean
              example: true
            start_date:
              type: string
              format: date
              example: '2025-12-11'
            property_cost:
              type: number
              example: 500000
            documents:
              type: array
              items:
                type: string
                example: gOSkcUZnQQpV3YLvUygSrmkTh6L9g3gxKvFbIfwU.docx
            personal_details:
              type: object
              properties:
                name:
                  type: string
                  example: Fahad Al-Qahtani
                email:
                  type: string
                  format: email
                  example: fahad@gmail.com
                birthdate:
                  type: string
                  format: date
                  example: '1990-05-14'
                nationality:
                  type: string
                  example: SA
                phone_number:
                  type: string
                  example: '+966501234567'
                nationality_id:
                  type: string
                  example: '1023456789'
            building_details:
              type: object
              properties:
                building_age:
                  type: integer
                  example: 8
                building_type:
                  type: string
                  example: Apartment
                apartment_size:
                  type: integer
                  example: 120
            address:
              type: object
              properties:
                street_name:
                  type: string
                  example: King Abdulaziz Road
                building_number:
                  type: string
                  example: '345'
                district_name:
                  type: string
                  example: Al Olaya
                city_name:
                  type: string
                  example: Riyadh
                additional_number:
                  type: string
                  example: '1234'
                zip_code:
                  type: string
                  example: '12233'
                unit_number:
                  type: string
                  example: 12B
        provider_policy_id:
          type: string
          nullable: true
          example: null
        provider_policy:
          type: string
          nullable: true
          example: null
        client_id:
          type: string
          format: uuid
          example: 9f7db0ed-0783-4654-9b18-47c316809204
        created_at:
          type: string
          format: date-time
          example: '2025-07-28T09:54:03.000000Z'
        canceled_at:
          type: string
          format: date-time
          nullable: true
          example: null
        status:
          type: integer
          example: 0
  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

````