openapi: 3.1.0
info:
  title: K2 Cyber API
  version: 1.0.0
paths:
  /submit:
    post:
      operationId: PostSubmit
      summary: Create Bindable Quote
      tags:
        - Quote
      requestBody:
        description: POST /submit Request body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PostSubmitRequestBody"
        required: true
      security:
        - OAUTH2_1: []
          APIKEY_1: []
      responses:
        "200":
          description: POST /submit Positive response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PostSubmitPositiveResponse"
        "400":
          description: POST /submit Negative response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PostSubmitNegativeResponse"
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
                example2:
                  value:
                    status: declined
                    error:
                      message: Sample declined message
  /status/{id}:
    get:
      operationId: GetStatusId
      summary: Get Quote
      tags:
        - Quote
      parameters:
        - name: id
          in: path
          required: true
          description: GET /status/:id Parameter
          schema:
            $ref: "#/components/schemas/GetStatusIdParameterId"
      security:
        - OAUTH2_1: []
          APIKEY_1: []
      responses:
        "200":
          description: GET /status/:id Positive response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetStatusIdPositiveResponse"
        "400":
          description: GET /status/:id Negative response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetStatusIdNegativeResponse"
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
  /update/{id}:
    put:
      operationId: PutUpdateId
      summary: Update Quote before bind
      tags:
        - Quote
      parameters:
        - name: id
          in: path
          required: true
          description: PUT /update/:id Parameter
          schema:
            $ref: "#/components/schemas/PutUpdateIdParameterId"
      requestBody:
        description: PUT /update/:id Request body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PutUpdateIdRequestBody"
      security:
        - OAUTH2_1: []
          APIKEY_1: []
      responses:
        "200":
          description: PUT /update/:id Positive response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PutUpdateIdPositiveResponse"
        "400":
          description: PUT /update/:id Negative response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PutUpdateIdNegativeResponse"
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
  /bind/{id}:
    put:
      operationId: PutBindId
      summary: Bind & Issue Quote
      tags:
        - Quote
      parameters:
        - name: id
          in: path
          required: true
          description: PUT /bind/:id Parameter
          schema:
            $ref: "#/components/schemas/PutBindIdParameterId"
      requestBody:
        description: PUT /bind/:id Request body
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PutBindIdRequestBody"
      security:
        - OAUTH2_1: []
          APIKEY_1: []
      responses:
        "200":
          description: PUT /bind/:id Positive response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PutBindIdPositiveResponse"
        "400":
          description: PUT /bind/:id Negative response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PutBindIdNegativeResponse"
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
  /document/quote-preview/stream/{id}:
    get:
      operationId: GetDocumentQuotePreviewStreamId
      summary: Get Quote Preview Document as Byte Stream
      tags:
        - Quote
      parameters:
        - name: id
          in: path
          required: true
          description: GET /document/quote-preview/stream/:id Parameter
          schema:
            $ref: "#/components/schemas/GetDocumentQuotePreviewStreamIdParameterId"
      security:
        - OAUTH2_1: []
          APIKEY_1: []
      responses:
        "200":
          description: GET /document/quote-preview/stream/:id Positive response
          content:
            application/pdf:
              schema:
                $ref: "#/components/schemas/GetDocumentQuotePreviewStreamIdPositiveResponse"
        "400":
          description: GET /document/quote-preview/stream/:id Negative response
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/GetDocumentQuotePreviewStreamIdNegativeResponse"
  /document/policy/stream/{id}:
    get:
      operationId: GetDocumentPolicyStreamId
      summary: Get Policy Document as Byte Stream
      tags:
        - Policy
      parameters:
        - name: id
          in: path
          required: true
          description: GET /document/policy/stream/:id Parameter
          schema:
            $ref: "#/components/schemas/GetDocumentPolicyStreamIdParameterId"
      security:
        - OAUTH2_1: []
          APIKEY_1: []
      responses:
        "200":
          description: GET /document/policy/stream/:id Positive response
          content:
            application/pdf:
              schema:
                $ref: "#/components/schemas/GetDocumentPolicyStreamIdPositiveResponse"
        "400":
          description: GET /document/policy/stream/:id Negative response
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/GetDocumentPolicyStreamIdNegativeResponse"
components:
  schemas:
    PostSubmitPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: approved
        data:
          type: object
          properties:
            created_at:
              type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            quote_id:
              type: string
            quote_status:
              type: string
              enum:
                - pending
                - approved_rate
                - ready_to_bind
                - bound
                - issued
                - declined
                - underwriter_review
                - failed
            checkout_link:
              type: string
            product_details:
              type: object
              properties:
                product_name:
                  type: string
              required:
                - product_name
              additionalProperties: false
            policy_term:
              type: object
              properties:
                premium_only:
                  type: string
                policy_fee:
                  type: string
                agg_limit:
                  type: string
                retention:
                  type: string
                effective_date:
                  type: string
                  format: date
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                expiration_date:
                  type: string
                  format: date
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                include_tria:
                  type: boolean
                prior_acts:
                  type: string
              required:
                - premium_only
                - policy_fee
                - agg_limit
                - retention
                - effective_date
                - expiration_date
                - include_tria
                - prior_acts
              additionalProperties: false
            personal_cyber:
              type: object
              properties:
                premium:
                  type: string
                count:
                  type: number
                limit:
                  type: string
                retention:
                  type: string
              required:
                - premium
                - count
                - limit
                - retention
              additionalProperties: false
            coverage_details:
              type: object
              properties:
                info_privacy_network_limit:
                  type: string
                regulatory_limit:
                  type: string
                pci_dss_limit:
                  type: string
                business_interruption_limit:
                  type: string
                vendor_bi_limit:
                  type: string
                cyber_extortion_limit:
                  type: string
                funds_transfer_limit:
                  type: string
                fraudulent_instruction_limit:
                  type: string
                invoice_manipulation_limit:
                  type: string
                media_liability_limit:
                  type: string
                system_failure_limit:
                  type: string
                vendor_system_failure_limit:
                  type: string
                incident_response_limit:
                  type: string
                data_recovery_limit:
                  type: string
                utility_fraud_limit:
                  type: string
                business_interruption_restoration_period:
                  type: number
                business_interruption_waiting_period:
                  type: number
                vendor_bi_restoration_period:
                  type: number
                vendor_bi_waiting_period:
                  type: number
                vendor_system_failure_restoration_period:
                  type: number
                vendor_system_failure_waiting_period:
                  type: number
                system_failure_restoration_period:
                  type: number
                system_failure_waiting_period:
                  type: number
              required:
                - info_privacy_network_limit
                - regulatory_limit
                - pci_dss_limit
                - business_interruption_limit
                - vendor_bi_limit
                - cyber_extortion_limit
                - funds_transfer_limit
                - fraudulent_instruction_limit
                - invoice_manipulation_limit
                - media_liability_limit
                - system_failure_limit
                - vendor_system_failure_limit
                - incident_response_limit
                - data_recovery_limit
                - utility_fraud_limit
                - business_interruption_restoration_period
                - business_interruption_waiting_period
                - vendor_bi_restoration_period
                - vendor_bi_waiting_period
                - vendor_system_failure_restoration_period
                - vendor_system_failure_waiting_period
                - system_failure_restoration_period
                - system_failure_waiting_period
              additionalProperties: false
          required:
            - created_at
            - quote_id
            - quote_status
            - checkout_link
            - product_details
            - policy_term
            - personal_cyber
            - coverage_details
          additionalProperties: false
      required:
        - status
        - data
      additionalProperties: false
    PostSubmitNegativeResponse:
      type: object
      properties:
        status:
          anyOf:
            - type: string
              const: error
            - type: string
              const: declined
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
          additionalProperties: false
      required:
        - status
        - error
      additionalProperties: false
    PostSubmitRequestBody:
      type: object
      properties:
        broker_email:
          type: string
          format: email
          pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        insured_name:
          type: string
        insured_location:
          type: object
          properties:
            address_line1:
              type: string
            address_line2:
              type: string
            address_city:
              type: string
            address_state:
              type: string
            address_zip:
              type: string
          required:
            - address_line1
            - address_city
            - address_state
            - address_zip
        insured_taxid:
          type: string
        claims:
          type: object
          properties:
            claims_count:
              type: number
            claims_amount:
              anyOf:
                - type: number
                - type: string
          required:
            - claims_count
            - claims_amount
        year_founded:
          type: number
        effective_date:
          type: string
          format: date
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        revenue:
          anyOf:
            - type: number
            - type: string
        naics:
          type: number
        question_highrisk:
          type: boolean
        agg_limit:
          anyOf:
            - type: number
            - type: string
        retention:
          anyOf:
            - type: number
            - type: string
        website:
          type: object
          properties:
            has_website:
              type: boolean
            domainName:
              type: string
              format: uri
          required:
            - has_website
        insured_contact:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
            phone:
              type: string
            preferred_method:
              type: string
          required:
            - first_name
            - last_name
            - email
            - preferred_method
      required:
        - broker_email
        - insured_name
        - insured_location
        - claims
        - year_founded
        - effective_date
        - revenue
        - naics
        - question_highrisk
        - agg_limit
        - retention
        - website
        - insured_contact
      example:
        broker_email: someemail@brokerdomain.com
        insured_name: Company Name
        insured_location:
          address_line1: "510 Meadowmont Village Circle #142"
          address_city: Chapel Hill
          address_state: NC
          address_zip: "27514"
        insured_taxid: 12-3456789 or 123456789
        claims:
          claims_count: 1
          claims_amount: 1000000
        year_founded: 2025
        effective_date: 2025-08-19
        revenue: 100000
        naics: 111110
        question_highrisk: false
        agg_limit: 50000
        retention: 2500
        website:
          has_website: true
          domainName: https://api-test.k2cyber.co/
        insured_contact:
          first_name: First Name
          last_name: Last Name
          email: email@somedomain.com
          phone: 123-456-7890
          preferred_method: Email
    GetStatusIdParameterId:
      type: string
      format: uuid
      pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    GetStatusIdPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            created_at:
              type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            quote_id:
              type: string
            quote_status:
              type: string
              enum:
                - pending
                - approved_rate
                - ready_to_bind
                - bound
                - issued
                - declined
                - underwriter_review
                - failed
            checkout_link:
              type: string
            product_details:
              type: object
              properties:
                product_name:
                  type: string
              required:
                - product_name
              additionalProperties: false
            policy_term:
              type: object
              properties:
                premium_only:
                  type: string
                policy_fee:
                  type: string
                agg_limit:
                  type: string
                retention:
                  type: string
                effective_date:
                  type: string
                  format: date
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                expiration_date:
                  type: string
                  format: date
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                include_tria:
                  type: boolean
                prior_acts:
                  type: string
              required:
                - premium_only
                - policy_fee
                - agg_limit
                - retention
                - effective_date
                - expiration_date
                - include_tria
                - prior_acts
              additionalProperties: false
            personal_cyber:
              type: object
              properties:
                premium:
                  type: string
                count:
                  type: number
                limit:
                  type: string
                retention:
                  type: string
              required:
                - premium
                - count
                - limit
                - retention
              additionalProperties: false
            coverage_details:
              type: object
              properties:
                info_privacy_network_limit:
                  type: string
                regulatory_limit:
                  type: string
                pci_dss_limit:
                  type: string
                business_interruption_limit:
                  type: string
                vendor_bi_limit:
                  type: string
                cyber_extortion_limit:
                  type: string
                funds_transfer_limit:
                  type: string
                fraudulent_instruction_limit:
                  type: string
                invoice_manipulation_limit:
                  type: string
                media_liability_limit:
                  type: string
                system_failure_limit:
                  type: string
                vendor_system_failure_limit:
                  type: string
                incident_response_limit:
                  type: string
                data_recovery_limit:
                  type: string
                utility_fraud_limit:
                  type: string
                business_interruption_restoration_period:
                  type: number
                business_interruption_waiting_period:
                  type: number
                vendor_bi_restoration_period:
                  type: number
                vendor_bi_waiting_period:
                  type: number
                vendor_system_failure_restoration_period:
                  type: number
                vendor_system_failure_waiting_period:
                  type: number
                system_failure_restoration_period:
                  type: number
                system_failure_waiting_period:
                  type: number
              required:
                - info_privacy_network_limit
                - regulatory_limit
                - pci_dss_limit
                - business_interruption_limit
                - vendor_bi_limit
                - cyber_extortion_limit
                - funds_transfer_limit
                - fraudulent_instruction_limit
                - invoice_manipulation_limit
                - media_liability_limit
                - system_failure_limit
                - vendor_system_failure_limit
                - incident_response_limit
                - data_recovery_limit
                - utility_fraud_limit
                - business_interruption_restoration_period
                - business_interruption_waiting_period
                - vendor_bi_restoration_period
                - vendor_bi_waiting_period
                - vendor_system_failure_restoration_period
                - vendor_system_failure_waiting_period
                - system_failure_restoration_period
                - system_failure_waiting_period
              additionalProperties: false
          required:
            - created_at
            - quote_id
            - quote_status
            - checkout_link
            - product_details
            - policy_term
            - personal_cyber
            - coverage_details
          additionalProperties: false
      required:
        - status
        - data
      additionalProperties: false
    GetStatusIdNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
          additionalProperties: false
      required:
        - status
        - error
      additionalProperties: false
    PutUpdateIdParameterId:
      type: string
      format: uuid
      pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    PutUpdateIdPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            status:
              type: string
              enum:
                - pending
          required:
            - id
            - status
          additionalProperties: false
      required:
        - status
        - data
      additionalProperties: false
    PutUpdateIdNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
          additionalProperties: false
      required:
        - status
        - error
      additionalProperties: false
    PutUpdateIdRequestBody:
      type: object
      properties:
        insured_contact:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
            phone:
              type: string
            preferred_method:
              type: string
        it_manager_same:
          type: boolean
        it_manager_contact:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
            title:
              type: string
      required: []
    PutBindIdParameterId:
      type: string
      format: uuid
      pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    PutBindIdPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: accepted
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required:
            - id
          additionalProperties: false
      required:
        - status
        - data
      additionalProperties: false
    PutBindIdNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
          additionalProperties: false
      required:
        - status
        - error
      additionalProperties: false
    PutBindIdRequestBody:
      type: object
      properties: {}
      required: []
    GetDocumentQuotePreviewStreamIdParameterId:
      type: string
      format: uuid
      pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    GetDocumentQuotePreviewStreamIdPositiveResponse:
      externalDocs:
        description: raw binary data
        url: https://swagger.io/specification/#working-with-binary-data
    GetDocumentQuotePreviewStreamIdNegativeResponse:
      type: string
    GetDocumentPolicyStreamIdParameterId:
      type: string
      format: uuid
      pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    GetDocumentPolicyStreamIdPositiveResponse:
      externalDocs:
        description: raw binary data
        url: https://swagger.io/specification/#working-with-binary-data
    GetDocumentPolicyStreamIdNegativeResponse:
      type: string
  responses: {}
  parameters: {}
  examples: {}
  requestBodies: {}
  headers: {}
  securitySchemes:
    OAUTH2_1:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api-sandbox.k2cyber.co/auth/token
          scopes:
            quote: ""
    APIKEY_1:
      type: apiKey
      in: header
      name: x-integration-key
  links: {}
  callbacks: {}
tags: []
servers:
  - url: https://api-sandbox.k2cyber.co/quote/firstcyber
    description: Sandbox
