---
title: "Ask AI about the open columns of a kept draft"
description: "Mappings API"
---

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

# Ask AI about the open columns of a kept draft

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/mappings/drafts/&#123;id&#125;/ai</code>
</div>
</div>

Map with AI. The model is asked only about columns the draft leaves open: all of them, or the ones in `columns`. It sees the file's structure (column names, places and value types), never a data value. It needs a yes for this request (`consent: true`) or the company's AI setting. Each answer is kept on the draft as a proposal (`proposal.by` is `ai-suggest`) that a person accepts with a decision; nothing is mapped by this request. A PDF draft is not asked this way: its page is read when it is uploaded, after its own question. Every request that reaches the model is recorded with the tokens it cost.

## Path parameters

## Request body

`application/json`

## Status codes

| Status | Meaning |
|---|---|
| `200` | The draft, as `GET /v1/mappings/drafts/{id}` answers it, and `ai`: `asked` (the columns asked), `suggestions` (a field per asked column, or `null` when none fits) and `usage` (`inputTokens`, `outputTokens`). |
| `400` | The body is not JSON (`invalid_json`), or `columns` is not a list of strings or `consent` not a boolean (`invalid_ai_request`). |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `403` | `ai_consent_required`: no yes for this request, and the company setting for AI is off. Nothing was asked. |
| `404` | This company has no such draft (`unknown_mapping_draft`). |
| `409` | `mapping_draft_finalized`: the draft is finalized and never changes. |
| `422` | `ai_not_for_pdf`: a PDF draft; `ai_nothing_open`: every column is mapped or left out; `ai_column_not_open` (`detail.columns`): a named column is mapped, and a mapped column is never asked. Nothing was asked. |
| `429` | `ai_limit_reached`: the company made 50 Map with AI requests that reached the model in the last 24 hours. Nothing was asked; the columns can be mapped by hand. |
| `502` | `ai_unavailable`: the AI service gave no usable answer. Nothing was changed. |
| `503` | `ai_not_set_up`: AI is not set up on this server, nothing was sent; or `profiler_unavailable`. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/mappings/ask-ai-about-the-open-columns-of-a-kept-draft/index.mdx
