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

# Withdraw a quote

> Cancels a quote that is out for signature: requires `status` of `sent`. Withdrawing a new-business quote withdraws its subscription and keeps the issued document; withdrawing an amendment discards the staged draft phase, so its document no longer renders. Use Discard a draft quote for one that was never sent.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json post /quotes/{id}/withdraw
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
    x-fern-server-name: Production
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Checkout Sessions
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Feedback
  - name: Insights
  - name: Integrations
  - name: Invoices
  - name: Merchants
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Quotes
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Tags
  - name: Tax
  - name: Users
  - name: Wallet Grants
  - name: Wallets
paths:
  /quotes/{id}/withdraw:
    post:
      tags:
        - Quotes
      summary: Withdraw a quote
      description: >-
        Cancels a quote that is out for signature: requires `status` of `sent`.
        Withdrawing a new-business quote withdraws its subscription and keeps
        the issued document; withdrawing an amendment discards the staged draft
        phase, so its document no longer renders. Use Discard a draft quote for
        one that was never sent.
      operationId: withdraw-quote
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: header
          name: Idempotency-Key
          schema:
            description: >-
              A unique string that makes a retried write safe. If you send the
              same request with the same key within 24 hours, the API returns
              the stored response and does not run the request again. A 5xx or
              429 response is not stored, so a retry with that key runs the
              request again.
            example: ik_a1b2c3d4e5f6
            maxLength: 255
            type: string
        - in: path
          name: id
          required: true
          schema:
            description: Unique identifier for the quote
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteWithdrawRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
          description: Success
          headers:
            Idempotency-Key:
              description: Echo of the idempotency key provided in the request
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                Whether this response was replayed from a previous request
                (true) or freshly executed (false)
              schema:
                type: boolean
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden — the organization does not have access to this feature
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Conflict — a request with this idempotency key is currently being
            processed
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying with the same idempotency key.
                Sent only when a request with this key is still being processed;
                a 409 without it is a conflict that a retry will not resolve.
              schema:
                type: integer
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          description: >-
            Bad Gateway — sent by the infrastructure in front of the API; the
            body is not JSON. Safe to retry.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Service Unavailable — a dependency is temporarily unavailable. Retry
            with backoff.
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Gateway Timeout — the request did not finish in time. Retry with
            backoff; use an idempotency key for writes.
components:
  schemas:
    QuoteWithdrawRequest:
      properties:
        reason:
          description: Optional reason recorded on the withdrawal.
          example: Superseded by revised terms
          nullable: true
          type: string
      type: object
    QuoteResponse:
      properties:
        approval:
          allOf:
            - $ref: '#/components/schemas/QuoteApprovalResponse'
          description: >-
            The quote's current approval. A new-business quote shows the
            approval of its subscription's creation; a quote that amends or
            renews an existing subscription shows the approval of its own
            issuance.
        auto_activate:
          description: >-
            Whether this quote takes effect on its own once signed; otherwise
            activate it with Activate a Signed Quote
          example: false
          type: boolean
        contract:
          allOf:
            - $ref: '#/components/schemas/ContractResponse'
          description: Term of the subscription this quote documents
        created_at:
          description: When the quote was created
          example: '2026-08-21T10:00:00Z'
          format: date-time
          type: string
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
        customer_id:
          description: Customer ID
          example: cust_abc123
          type: string
        expires_at:
          description: When the signing offer expires; null means it never expires
          example: '2026-09-30T23:59:59Z'
          format: date-time
          nullable: true
          type: string
        id:
          description: Quote ID
          example: qt_abc123
          type: string
        kind:
          description: Quote kind
          enum:
            - new
            - renewal
            - amendment
          example: new
          type: string
        name:
          description: >-
            Display name of the quote: its own override when one is set,
            otherwise the name of the subscription it documents
          example: Acme Platform 2026
          type: string
        signing_url:
          description: >-
            Hosted page where the customer reviews and signs. Present on a
            single quote while a customer signature is pending, so a lost link
            can be recovered; omitted on the list.
          example: https://acme.alguna.io/hs/elt_abc123
          nullable: true
          type: string
        status:
          description: Document status
          enum:
            - draft
            - pending_approval
            - approved
            - sent
            - signed
            - rejected
            - withdrawn
            - expired
          example: draft
          type: string
        subscription_id:
          description: >-
            The subscription this quote creates or amends. Whether the deal is
            in effect is that subscription's state, not the quote's: read it, or
            its phases, once the quote is signed.
          example: sub_abc123
          type: string
        updated_at:
          description: When the quote was last updated
          example: '2026-08-21T10:00:00Z'
          format: date-time
          type: string
        withdrawal_reason:
          description: Reason recorded on withdrawal
          example: Superseded by revised terms
          nullable: true
          type: string
        withdrawn_at:
          description: When the quote was withdrawn, if withdrawn
          example: '2026-09-15T09:00:00Z'
          format: date-time
          nullable: true
          type: string
      required:
        - approval
        - auto_activate
        - contract
        - created_at
        - currency
        - customer_id
        - id
        - kind
        - name
        - status
        - subscription_id
        - updated_at
      type: object
    ErrorResponse:
      description: The body of every error the API returns.
      properties:
        detail:
          description: Explanation of what went wrong
          type: string
        status:
          description: HTTP status code of the response
          format: int64
          type: integer
        title:
          description: >-
            HTTP status text. Sent only by version, idempotency and
            credit-refusal errors.
          type: string
        type:
          description: Always `about:blank`. Sent only by version and idempotency errors.
          type: string
      required:
        - status
        - detail
      type: object
    GatewayErrorResponse:
      description: >-
        Returned by the API gateway when a request carries no valid API key,
        before the API handles it.
      properties:
        code:
          description: Machine-readable error code, e.g. `unauthenticated`
          type: string
        details:
          nullable: true
          type: object
        message:
          description: Explanation of what went wrong
          type: string
      required:
        - code
        - message
      type: object
    QuoteApprovalResponse:
      properties:
        decided_at:
          description: When the approval request was decided, if decided
          example: '2026-08-21T12:00:00Z'
          format: date-time
          nullable: true
          type: string
        flow_id:
          description: >-
            The approval request. Errors that an approval refuses name the same
            request in approval.flow_id.
          example: 3f2b8c1e-5d4a-4f7b-9c2e-1a6d8e0f4b21
          nullable: true
          type: string
        generation:
          description: >-
            Version of the approval request's content; it increases when the
            request is evaluated again for changed terms
          example: 1
          format: int64
          nullable: true
          type: integer
        operation:
          description: >-
            The action the approval covers: send_quote sends the quote once
            approved, manual_hold leaves it for someone to send, activate
            activates the subscription. Absent when no approval was requested.
          enum:
            - send_quote
            - manual_hold
            - activate
          example: send_quote
          nullable: true
          type: string
        requested_at:
          description: When the approval was requested
          example: '2026-08-21T10:00:00Z'
          format: date-time
          nullable: true
          type: string
        status:
          description: >-
            Where the current approval stands. none: no approval was requested.
            pending: waiting for a decision. approved_manual_hold: approved, and
            waiting for someone to send the quote. approved_awaiting_execution:
            approved, and the approved action has not run yet. executed:
            approved, and the approved action ran. failed: approved, but the
            approved action failed. stale: the quote's subscription changed
            after the request, so the approval no longer applies and approval
            must be requested again for the current terms. rejected: an approver
            rejected the request. canceled: the request was canceled.
          enum:
            - none
            - pending
            - approved_awaiting_execution
            - approved_manual_hold
            - executed
            - stale
            - failed
            - rejected
            - canceled
          example: pending
          type: string
      required:
        - status
      type: object
    ContractResponse:
      properties:
        duration_months:
          description: Contract duration in months
          example: 12
          format: int64
          nullable: true
          type: integer
        end_date:
          description: Contract end date
          example: '2027-01-01T00:00:00Z'
          format: date-time
          nullable: true
          type: string
        period_type:
          description: Contract period type
          enum:
            - fixed
            - monthly_rolling
          example: fixed
          type: string
        start_date:
          description: Contract start date
          example: '2026-01-01T00:00:00Z'
          format: date-time
          nullable: true
          type: string
      required:
        - period_type
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http
      x-fern-bearer:
        env: ALGUNA_API_KEY
        name: apiKey

````

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