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

# Delete buy orders

> Deletes one or more of the caller's buy orders, keyed by project slug.

- Idempotent: deleting a project that has no active buy order returns `status: "already_deleted"` instead of an error.
- Each item is processed independently. The response is always HTTP 200 once authenticated and the body is valid — check the per-item `ok` flag in `results` (index-aligned to your request) for each outcome.



## OpenAPI

````yaml https://thefirm.biz/api/public/v1/openapi.json delete /api/public/v1/orders
openapi: 3.1.0
info:
  title: AutoBoy Public API
  version: 0.1.0
  description: >-
    REST API for AutoBoy — browse projects, view detailed stats about your own
    launch, create buy orders and manage your AutoBoy smart wallet.


    ## Authentication


    Most endpoints require an API key, sent as a bearer token:


    ```

    Authorization: Bearer autoboy_…

    ```


    ## Quick start


    1. **Request a key** — `POST /api/public/v1/api-key-requests`

    2. **Register a project** — `POST /api/public/v1/projects`.


    New to AutoBoy? Read the product docs https://docs.thefirm.biz.
servers:
  - url: https://thefirm.biz
security: []
tags:
  - name: API Keys
    description: Request, create, and inspect API keys.
  - name: Projects
    description: Browse projects and their buyers.
  - name: Buy Orders
    description: Read and manage the API key owner's pre-launch buy orders.
  - name: AutoBoy Wallet
    description: Balances of, and withdrawals from, the AutoBoy smart wallet.
  - name: Feedback
    description: Send feedback to The Firm.
paths:
  /api/public/v1/orders:
    delete:
      tags:
        - Buy Orders
      summary: Delete buy orders
      description: >-
        Deletes one or more of the caller's buy orders, keyed by project slug.


        - Idempotent: deleting a project that has no active buy order returns
        `status: "already_deleted"` instead of an error.

        - Each item is processed independently. The response is always HTTP 200
        once authenticated and the body is valid — check the per-item `ok` flag
        in `results` (index-aligned to your request) for each outcome.
      operationId: deleteBuyOrders
      requestBody:
        required: true
        description: The buy orders to delete, keyed by project slug.
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      slug:
                        type: string
                        minLength: 1
                        description: >-
                          Public project slug identifying the buy order to
                          remove.
                        example: thefirm
                    required:
                      - slug
                  minItems: 1
                  maxItems: 50
              required:
                - items
      responses:
        '200':
          description: Per-item results for the batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyOrderMutationResponse'
              example:
                results:
                  - slug: thefirm
                    ok: true
                    status: created
                  - slug: charms
                    ok: true
                    status: unchanged
                  - slug: no-such-project
                    ok: false
                    code: unknown_project
                    message: No project matches the slug
        '400':
          description: Malformed JSON, an invalid body, or an over-limit batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Bad request
                message: Invalid request body
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingAuthorizationHeader:
                  value:
                    error: Unauthorized
                    message: Missing or invalid Authorization header
                invalidApiKey:
                  value:
                    error: Unauthorized
                    message: Invalid API key
        '500':
          description: An unexpected server-side error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal server error
                message: Failed to delete buy orders
      security:
        - apiKeyAuth: []
components:
  schemas:
    BuyOrderMutationResponse:
      type: object
      properties:
        results:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  slug:
                    type: string
                    example: thefirm
                  ok:
                    type: boolean
                    enum:
                      - true
                  status:
                    type: string
                    enum:
                      - created
                      - updated
                      - deleted
                      - unchanged
                      - already_deleted
                    example: created
                required:
                  - slug
                  - ok
                  - status
              - type: object
                properties:
                  slug:
                    type: string
                    example: no-such-project
                  ok:
                    type: boolean
                    enum:
                      - false
                  code:
                    type: string
                    enum:
                      - unknown_project
                      - already_exists
                      - not_found
                      - not_modifiable
                      - invalid_value
                      - duplicate_in_request
                    example: unknown_project
                  message:
                    type: string
                    example: No project matches the slug
                required:
                  - slug
                  - ok
                  - code
                  - message
      required:
        - results
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      example:
        error: Bad request
        message: Invalid request body
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key issued via POST /api/public/v1/api-keys.

````