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

# Delete a listing

> Delete a draft, a rejected listing, one on hold or unconfirmed. An active or sold listing cannot be deleted: you put it on hold or mark it as sold.



## OpenAPI

````yaml en/openapi.json DELETE /listings/{code}
openapi: 3.1.2
info:
  title: Housera API
  version: 1.0.0
  description: >-
    Publish and manage real estate listings on Housera from your CRM or
    application, with the same rules as the Housera form.
servers:
  - url: https://staging.housera.ro/api/v1
    description: 'Sandbox (staging): test data, the same rules as production.'
  - url: https://housera.ro/api/v1
    description: 'Production: real listings from housera.ro.'
security:
  - bearer: []
tags:
  - name: Your Listings
  - name: Photos
  - name: Events
  - name: Vocabulary
paths:
  /listings/{code}:
    delete:
      tags:
        - Your Listings
      summary: Delete a listing
      description: >-
        Delete a draft, a rejected listing, one on hold or unconfirmed. An
        active or sold listing cannot be deleted: you put it on hold or mark it
        as sold.
      operationId: v1.listings.destroy
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
          description: >-
            The public code of the listing (8 characters, as in its address on
            Housera).
      responses:
        '204':
          description: Done. The response has no body.
        '401':
          content:
            application/problem+json:
              schema:
                $ref: df9e5864-a2f9-487d-b0db-169bf3dc8506
          description: The key is missing, revoked, or expired (`unauthenticated`).
        '404':
          content:
            application/problem+json:
              schema:
                $ref: df9e5864-a2f9-487d-b0db-169bf3dc8506
          description: The listing does not exist or it is not your account (`not_found`).
        '409':
          content:
            application/problem+json:
              schema:
                $ref: df9e5864-a2f9-487d-b0db-169bf3dc8506
          description: >-
            The listing is occupied by another writing (`listing_busy`) or the
            action is not allowed in its state (`listing_action_refused`).
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <key>'

````

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