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

# Upload a proposal

> Store proposal text or a document for later comparison with a specification.

Provide `proposalName` and at least one of `text` or `file`. Text-only requests can use JSON; files use multipart form data.

```bash theme={null}
curl --fail-with-body https://api.pre.dev/upload-proposal \
  -H "Authorization: Bearer $PREDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "proposalName": "Reporting dashboard implementation",
    "text": "We propose organization-scoped reports, CSV export, and audit logging delivered in three milestones."
  }'
```

The HTTP `200` response contains `success: true` and `proposalId`. Save that ID to [retrieve](/architect-agent/api/get-proposal) or [vet](/architect-agent/api/vet-proposal) the proposal.

For file uploads, use the same [formats and 20 MiB limit](/architect-agent/inputs-and-outputs#upload-a-file) as specification uploads. Missing `proposalName`, or missing both file and text, returns `400`.


## OpenAPI

````yaml api-reference/openapi.json POST /upload-proposal
openapi: 3.1.0
info:
  title: pre.dev API
  description: >-
    Public REST API for software specifications, browser automation, proposal
    assessment, and credit balance. Base URL: https://api.pre.dev. MCP is
    documented separately at https://docs.pre.dev/mcp/tools.
  version: 1.1.0
  contact:
    name: pre.dev Support
    url: https://pre.dev
    email: support@pre.dev
  license:
    name: Proprietary
    url: https://pre.dev/terms
servers:
  - url: https://api.pre.dev
    description: Production API Server
security:
  - apiKeyAuth: []
  - xApiKey: []
tags:
  - name: Specifications
  - name: Browser Agents
  - name: Proposals
  - name: Account
paths:
  /upload-proposal:
    post:
      tags:
        - Proposals
      summary: Upload a proposal
      description: >-
        Store a proposal from text or one supported file. proposalName is
        required.
      operationId: uploadProposal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadProposalRequest'
            example:
              proposalName: Task manager implementation
              text: >-
                Projects, assignees, and due dates delivered in three
                milestones.
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadProposalRequest'
      responses:
        '200':
          description: Stored proposal ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadProposalResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, or ineligible authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access or trial eligibility denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --fail-with-body https://api.pre.dev/upload-proposal \
              -H "Authorization: Bearer $PREDEV_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
              "proposalName": "Task manager implementation",
              "text": "Projects, assignees, and due dates delivered in three milestones."
            }'
components:
  schemas:
    UploadProposalRequest:
      type: object
      required:
        - proposalName
      properties:
        proposalName:
          type: string
          minLength: 1
        text:
          type: string
          description: Proposal content.
          minLength: 1
        file:
          type: string
          description: >-
            PDF, DOC, DOCX, TXT, JPEG, or PNG, at most 20 MiB. Use
            multipart/form-data and the matching MIME type.
          format: binary
      anyOf:
        - required:
            - text
        - required:
            - file
    UploadProposalResponse:
      type: object
      required:
        - success
        - proposalId
      properties:
        success:
          type: boolean
        proposalId:
          type: string
          description: 24-character record ID.
          pattern: ^[a-fA-F0-9]{24}$
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          description: Optional detail; not returned by every endpoint.
        code:
          type: string
          description: Machine-readable code when available.
        actionUrl:
          type: string
          format: uri
        requiresSubscription:
          type: boolean
        trialsUsed:
          type: integer
        maxTrials:
          type: integer
      additionalProperties: true
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Use a pre.dev API key from https://pre.dev/projects/key.
    xApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Alternative to Authorization: Bearer.'

````