# Prepare client intake Autofill supporting-file upload

`client_intake_applications.prepare_autofill_file_upload`

Prepare a five-minute upload of a supporting document for Autofill. Read preparation first. POST multipart field file to the returned URL using transfer_token as the Bearer credential. No API key is needed. Read the upload receipt and preparation again before starting Autofill. This does not start Autofill or change application answers. Limit: 25 MiB per file. Retry the same bytes at the returned URL while its credential is valid. After completion, do not prepare the upload again with the old preparation revision. Use a new idempotency_key for a new upload.

[Intake applications guide](https://docs.levr.ai/mcp/resources/client_intake_applications.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: write. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "application_id": {
      "description": "Copy client_intake_application.id from businesses.get; not the Business ID. Prefix: ciappl_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "content_sha256": {
      "description": "SHA-256 of the exact file bytes to upload.",
      "pattern": "^[0-9a-f]{64}$",
      "type": "string"
    },
    "expected_preparation_revision": {
      "description": "Read Autofill preparation first and copy its revision.",
      "minimum": 1,
      "type": "integer"
    },
    "filename": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "idempotency_key": {
      "format": "uuid",
      "type": "string"
    },
    "provider_slug": {
      "description": "Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "size_bytes": {
      "maximum": 26214400,
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "provider_slug",
    "application_id",
    "expected_preparation_revision",
    "idempotency_key",
    "filename",
    "content_sha256",
    "size_bytes"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "expires_in_seconds": {
          "type": "integer"
        },
        "instructions": {
          "type": "string"
        },
        "method": {
          "const": "POST",
          "type": "string"
        },
        "transfer_token": {
          "type": "string"
        },
        "url": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "url",
        "method",
        "transfer_token",
        "expires_in_seconds",
        "instructions"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```

Check the result, then read the affected record to confirm your change.
