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

# Create an underwriting manual

> An underwriting manual: a carrier's underwriting program written in RSL (its products, coverage parts, questions, referrals, authority and quote rules), compiled and bound to the exact rater bundles it prices with. Underwriting files are pinned to one manual for good.

Send the source files by path and bind each rater package the sources rate with to one of your rater releases. The binding is resolved now to that release's bundle and never moves, even if the rater release is later repointed. Every rating of a file on the manual is made with that bundle through the platform rater path (as `rateRaterRelease` rates), as the person whose write made it due, with its execution record. Sources with errors, or whose ratings do not match the bound raters, are refused with 400 and one `details` item per problem; nothing is stored.

Manuals cannot change. The same sources bound to the same bundles are the same manual, so sending them again is safe: it returns 200 with the stored manual instead of 201. Requires underwriting write access and permission to run every bound rater.



## OpenAPI

````yaml /openapi.json post /insurance/underwriting/manuals
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.canary.effectiveai.app/api/v2
    description: Canary
security:
  - bearerAuth: []
paths:
  /insurance/underwriting/manuals:
    post:
      tags:
        - Underwriting workbench
      summary: Create an underwriting manual
      description: >-
        An underwriting manual: a carrier's underwriting program written in RSL
        (its products, coverage parts, questions, referrals, authority and quote
        rules), compiled and bound to the exact rater bundles it prices with.
        Underwriting files are pinned to one manual for good.


        Send the source files by path and bind each rater package the sources
        rate with to one of your rater releases. The binding is resolved now to
        that release's bundle and never moves, even if the rater release is
        later repointed. Every rating of a file on the manual is made with that
        bundle through the platform rater path (as `rateRaterRelease` rates), as
        the person whose write made it due, with its execution record. Sources
        with errors, or whose ratings do not match the bound raters, are refused
        with 400 and one `details` item per problem; nothing is stored.


        Manuals cannot change. The same sources bound to the same bundles are
        the same manual, so sending them again is safe: it returns 200 with the
        stored manual instead of 201. Requires underwriting write access and
        permission to run every bound rater.
      operationId: createUnderwritingManual
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2UnderwritingManualCreate'
      responses:
        '200':
          description: The same manual was already stored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingManual'
        '201':
          description: The new manual.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingManual'
        '400':
          description: >-
            Invalid request, manual sources with errors, or rater bindings that
            do not match; `details` names each problem. Restart a list after
            `invalid_cursor`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '403':
          description: >-
            `authority_required`: your role may not make this statement, another
            may. `underwriting_role_required`: you have no underwriting role. Or
            access is denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '404':
          description: Manual or underwriting file not found, or not visible to you.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '409':
          description: >-
            `stale_after`: the log moved past `after`; read the underwriting
            file and resend with `lastSeq`. `file_closed` or `wrong_stage`: the
            file or offer is not where the statement needs it. `offer_blocked`:
            something open (`blockers`) holds the offer a quote or bind is for.
            `rating_not_valid`: that offer has no valid rating of its current
            inputs (`rating` says why and how to recover). `target_stale`: the
            statement's `target` is not in the file's view for you now; read the
            file again. `idempotency_conflict`: the key was used with another
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '413':
          description: Request body is too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '415':
          description: Content-Type must be application/json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '422':
          description: >-
            `statement_rejected`: the manual cannot apply it (type, path or
            another rule); `no_route`: no one may do it. `target_wrong_kind`:
            that node does not take this statement; `target_wrong_scope`: the
            statement's path, choice, offer or package is not the node's.
            `statementIndex` (and `target`) say which.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
        '503':
          description: >-
            `temporarily_unavailable`: the underwriting runtime is not
            configured on this server yet, or could not answer. Honor
            Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2UnderwritingManualCreate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
          description: A label for people; not unique.
        productId:
          type: string
          format: uuid
          description: The managed product the manual underwrites, if any.
        files:
          type: object
          additionalProperties:
            type: string
            maxLength: 8388608
          description: >-
            The manual's source files by relative path, such as `owner.rsl` or
            `tables/rates.csv`. At most 500 files and 8 MiB in all.
        raters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/V2UnderwritingRaterBindingInput'
          default: {}
          description: >-
            Each rater package the sources rate with, such as `imperium/g2`,
            bound to one of your rater releases. Every package the sources read
            must be bound, and only those.
      required:
        - files
      additionalProperties: false
    V2UnderwritingManual:
      type: object
      properties:
        id:
          type: string
          pattern: ^[a-f0-9]{64}$
          description: >-
            Underwriting manual ID: a SHA-256 of its sources and the rater
            bundles they are bound to.
        publicId:
          type: string
          description: >-
            Globally unique readable manual identifier, such as
            security-guards_a2b3c4d. Stable across republication of the same
            manual within an organization.
        name:
          type: string
          nullable: true
        productId:
          type: string
          nullable: true
        owners:
          type: array
          items:
            type: string
          description: The carriers whose units the manual defines.
        raters:
          type: object
          additionalProperties:
            type: object
            properties:
              raterId:
                type: string
              releaseVersion:
                type: integer
              bundleId:
                type: string
            required:
              - raterId
              - releaseVersion
              - bundleId
          description: Each rater package, bound to the exact bundle that rates for it.
        warnings:
          type: array
          items:
            type: string
          description: What compiling reported; a stored manual has no errors.
        source:
          type: object
          properties:
            digest:
              type: string
              description: SHA-256 of the source files as sent.
            files:
              type: integer
            bytes:
              type: integer
          required:
            - digest
            - files
            - bytes
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
      required:
        - id
        - publicId
        - name
        - productId
        - owners
        - raters
        - warnings
        - source
        - createdAt
        - createdBy
    V2UnderwritingError:
      allOf:
        - $ref: '#/components/schemas/V2CodedError'
        - type: object
          properties:
            runtimeCode:
              type: string
              description: >-
                For underwriting refusals: the underwriting runtime’s own code,
                for diagnosis only. Act on `code`.
            statementIndex:
              type: integer
              nullable: true
              description: >-
                For underwriting refusals: the index of the statement it is
                about, when known.
            lastSeq:
              type: integer
              description: >-
                The underwriting file log’s last seq, for stale_after: send it
                as `after` after re-reading.
            target:
              type: string
              nullable: true
              description: >-
                The view node id a target_stale, target_wrong_kind or
                target_wrong_scope statement named.
            offer:
              type: string
              description: >-
                The offer a wrong_stage, offer_blocked or rating_not_valid quote
                or bind was for, when the server read it.
            blockers:
              type: array
              items:
                type: string
              description: >-
                For offer_blocked: the ids of the view nodes that hold the
                offer.
            rating:
              type: object
              properties:
                status:
                  type: string
                  description: >-
                    The offer's rating status (`rating.status` of its view):
                    `pending`, `stale`, `refused`, `unavailable`, or
                    `incomplete` when inputs it needs are not accepted.
                runIds:
                  type: array
                  items:
                    type: string
                  description: The runs its outcomes are valued from.
                waitingOn:
                  type: array
                  items:
                    type: string
                  description: The paths the price waits on.
                recovery:
                  type: string
                  nullable: true
                  description: What makes the rating valid again.
              required:
                - status
                - runIds
                - waitingOn
                - recovery
              description: >-
                For rating_not_valid: why the offer’s price is not usable, and
                how to recover.
    V2UnderwritingRaterBindingInput:
      type: object
      properties:
        raterId:
          type: string
          minLength: 1
          maxLength: 200
          description: One of your raters, from `listRaters`.
        releaseVersion:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 2147483647
          description: >-
            The rater release to bind. Its bundle is fixed for the life of this
            manual.
      required:
        - raterId
        - releaseVersion
      additionalProperties: false
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
                - osha
              description: Dataset needed for dataset_not_enabled.
            businessCode:
              type: string
              description: The rater’s own refusal code, for business_rejection.
            violations:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Authored or built-in constraint code
                  message:
                    type: string
                    description: Authored message for the failed constraint
                  path:
                    type: string
                    description: Input path of the offending value; empty for the request
                  value:
                    nullable: true
                    description: Offending input value, size-bounded by the runtime
                  constraint:
                    type: string
                    description: The constraint the value failed, as text
                  cite:
                    type: string
                    nullable: true
                    description: >-
                      Filing citation of the constraint, when the source cites
                      one
                required:
                  - code
                  - message
                  - path
                  - value
                  - constraint
                  - cite
                additionalProperties: false
              maxItems: 256
              description: >-
                Each input constraint the submission failed, for invalid_inputs
                and business_rejection.
            violationsTruncated:
              type: boolean
              description: >-
                True when the rater reported more violations than violations
                holds.
            executionId:
              type: string
              description: >-
                The recorded execution of a failed rating, for rater rating
                failures.
            accessUrl:
              type: string
              nullable: true
              format: uri
              description: Not currently returned.
          required:
            - code
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.