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

# Answer an open information request

> Autosaves the answers to the round in `remediation[]` of the widget state. Same soft draft validation as the section form (format issues come back in errors[] while the save succeeds); the round is closed by POST /api/v4/kyb/widget/{publicId}/submit, which refuses while any target is still unanswered.

Targets carry their own `section_key` because a round crosses sections. Only the FIELD targets of the live round are accepted: anything else is a 409 `not_requested`, a document group included, since a group is answered by uploading through POST /api/v4/upload/kyb/{publicId}/documents.

A requested field brings its `required_if` siblings with it, so picking "Other" in an asked select lets the specify-field the catalog then makes required be answered in the same body. The widening is one hop off a real ask: a `required_if` field whose trigger the round did not ask for is still a 409 `not_requested`.

A custom ask is answered under `custom` instead, addressed by `item_id` because it has no catalog keys: `{"custom":[{"item_id":"...","text":"..."}]}`. Both lists are optional and a body carrying neither is a 400; anything but an open custom ask of the live round that takes text is a 409 `not_requested`, a file-only ask included. Clearing the text un-answers the ask, which the re-submit then refuses if it is `required`; an ask the officer marked optional may stay empty. Text of nothing but whitespace IS clearing it, both here and at the gate.

`comments` carries the merchant's own note on an item, addressed by `item_id` the way a custom answer is, because that is the one key every kind has: `{"comments":[{"item_id":"...","text":"..."}]}`. Any item of the live round takes one, a document group and a file-only custom ask included. It is not an answer: it resolves nothing, leaves `items_open` where it was and does not open the re-submit gate, so an item carrying only a comment is still outstanding. Empty text erases the note. All three lists are optional and a body carrying none of them is a 400; an `item_id` outside the live round is a 409 `not_requested`.

`remediation` in the response is the round after this write, the same block the widget state carries as `info_request`: `items_open` counts the targets still outstanding.



## OpenAPI

````yaml https://api.dataspike.io/openapi/kyb/public.json post /api/v4/kyb/widget/{publicId}/remediation
openapi: 3.1.0
info:
  description: Know Your Business (KYB) — case creation and the embedded onboarding widget.
  title: Dataspike KYB API
  version: '1.0'
servers: []
security: []
paths:
  /api/v4/kyb/widget/{publicId}/remediation:
    post:
      tags:
        - KYB Widget
      summary: Answer an open information request
      description: >-
        Autosaves the answers to the round in `remediation[]` of the widget
        state. Same soft draft validation as the section form (format issues
        come back in errors[] while the save succeeds); the round is closed by
        POST /api/v4/kyb/widget/{publicId}/submit, which refuses while any
        target is still unanswered.


        Targets carry their own `section_key` because a round crosses sections.
        Only the FIELD targets of the live round are accepted: anything else is
        a 409 `not_requested`, a document group included, since a group is
        answered by uploading through POST
        /api/v4/upload/kyb/{publicId}/documents.


        A requested field brings its `required_if` siblings with it, so picking
        "Other" in an asked select lets the specify-field the catalog then makes
        required be answered in the same body. The widening is one hop off a
        real ask: a `required_if` field whose trigger the round did not ask for
        is still a 409 `not_requested`.


        A custom ask is answered under `custom` instead, addressed by `item_id`
        because it has no catalog keys:
        `{"custom":[{"item_id":"...","text":"..."}]}`. Both lists are optional
        and a body carrying neither is a 400; anything but an open custom ask of
        the live round that takes text is a 409 `not_requested`, a file-only ask
        included. Clearing the text un-answers the ask, which the re-submit then
        refuses if it is `required`; an ask the officer marked optional may stay
        empty. Text of nothing but whitespace IS clearing it, both here and at
        the gate.


        `comments` carries the merchant's own note on an item, addressed by
        `item_id` the way a custom answer is, because that is the one key every
        kind has: `{"comments":[{"item_id":"...","text":"..."}]}`. Any item of
        the live round takes one, a document group and a file-only custom ask
        included. It is not an answer: it resolves nothing, leaves `items_open`
        where it was and does not open the re-submit gate, so an item carrying
        only a comment is still outstanding. Empty text erases the note. All
        three lists are optional and a body carrying none of them is a 400; an
        `item_id` outside the live round is a 409 `not_requested`.


        `remediation` in the response is the round after this write, the same
        block the widget state carries as `info_request`: `items_open` counts
        the targets still outstanding.
      operationId: POST_/api/v4/kyb/widget/:publicId/remediation
      parameters:
        - description: KYB case public id.
          in: path
          name: publicId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveRemediationRequest'
          application/xml:
            schema:
              $ref: '#/components/schemas/SaveRemediationRequest'
        description: Request body for kyb.SaveRemediationRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveRemediationResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/SaveRemediationResponse'
          description: Answers saved.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrInvalidBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrInvalidBody'
          description: A body with none of `targets`, `custom` and `comments`.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrCaseNotFound'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrCaseNotFound'
          description: Case not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrCaseLocked'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrCaseLocked'
          description: >-
            `case_locked` when the case does not accept writes at all (a
            re-submitted round included), or `not_requested` when there is no
            open information request, it did not ask for one of these targets,
            or it carries no item under a comment's `item_id`.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrUnknownSectionOrField'
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrUnknownSectionOrField'
          description: >-
            Invalid value for a closed-set field, an `item_id` that is not a
            uuid, or answer or comment text past its length limit.
components:
  schemas:
    SaveRemediationRequest:
      description: SaveRemediationRequest schema
      example:
        targets:
          - section_key: registration
            field_key: registration_number
            value: 36-2382580
        custom:
          - item_id: 019f1b00-0000-7000-8000-000000000005
            text: Suite 400, 1 Market Street, San Francisco, CA 94105.
        comments:
          - item_id: 019f17aa-1b2c-73d4-95e6-0123456789ab
            text: >-
              The registry still lists our old name; the rename filing is with
              them since May.
      properties:
        comments:
          items:
            properties:
              item_id:
                example: 019f179b-0fa7-72c8-818e-819652540477
                type: string
              text:
                example: >-
                  The registry still lists our old name; the rename filing is
                  attached.
                maxLength: 1000
                type: string
            required:
              - item_id
            type: object
          type: array
        custom:
          items:
            properties:
              item_id:
                example: 019f179b-0fa7-72c8-818e-819652540477
                type: string
              text:
                example: Suite 400, 1 Market Street.
                maxLength: 10000
                type: string
            required:
              - item_id
            type: object
          type: array
        targets:
          items:
            properties:
              field_key:
                example: legal_name
                type: string
              section_key:
                example: business
                type: string
              value:
                example: '"Acme Holdings Inc."'
            required:
              - field_key
              - section_key
            type: object
          type: array
      type: object
    SaveRemediationResponse:
      description: SaveRemediationResponse schema
      properties:
        errors:
          items:
            properties:
              code:
                enum:
                  - required
                  - document_required
                  - min_one_owner_required
                  - ownership_total_below_80
                  - ownership_total_above_100
                  - invalid_number
                  - invalid_email
                  - invalid_date
                  - invalid_bool
                  - invalid_option
                  - invalid_country
                  - too_short
                  - too_long
                  - invalid_format
                  - kyc_required
                  - date_in_future
                  - date_implausible
                  - underage
                example: invalid_email
                type: string
              field:
                example: contact_email
                type: string
              message:
                example: Invalid email address
                type: string
            type: object
          type: array
        remediation:
          nullable: true
          properties:
            items_open:
              example: 1
              type: integer
            items_total:
              example: 2
              type: integer
            status:
              enum:
                - draft
                - sent
                - received
                - canceled
              example: sent
              type: string
          type: object
        saved:
          example: true
          type: boolean
      type: object
    ErrInvalidBody:
      description: ErrInvalidBody schema
      example:
        code: invalid_body
        message: Invalid request body
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object
    ErrCaseNotFound:
      description: ErrCaseNotFound schema
      example:
        code: case_not_found
        message: Case not found
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object
    ErrCaseLocked:
      description: ErrCaseLocked schema
      example:
        code: case_locked
        message: Case is locked and cannot be modified
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object
    ErrUnknownSectionOrField:
      description: ErrUnknownSectionOrField schema
      example:
        code: unknown_field
        message: Unknown field
        param: not_a_field
      properties:
        code:
          example: email_otp_expired
          type: string
        message:
          example: OTP has expired
          type: string
        param:
          nullable: true
          type: string
      type: object

````

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