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

# Delete products

> Delete products by their external IDs. This endpoint only deletes products.

## Overview

Delete specific products from a product block using their external IDs. This endpoint removes only the products you specify, leaving all others unchanged.

## Use Cases

* **Remove Discontinued Products**: Delete products no longer available
* **Inventory Cleanup**: Remove out-of-stock items
* **Bulk Delete**: Remove multiple products at once
* **Selective Removal**: Delete specific products without affecting catalog

## Authentication

```
x-api-key: your_api_key_here
```

## Path Parameters

| Parameter       | Type   | Required | Description      |
| --------------- | ------ | -------- | ---------------- |
| `promptBlockId` | string | Yes      | Product block ID |

## Request Body

Array of objects with external IDs (minimum 1):

| Field         | Type   | Required | Description                      |
| ------------- | ------ | -------- | -------------------------------- |
| `external_id` | string | Yes      | External ID of product to delete |

## Example Request

```bash theme={null}
curl --request POST \
  'https://api.vambe.me/api/public/product/delete/block-abc123' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: your_api_key_here' \
  --data-raw '[
    { "external_id": "discontinued-product-001" },
    { "external_id": "out-of-stock-002" }
  ]'
```

## Example Response

```json theme={null}
{
  "deleted": 2,
  "external_ids": ["discontinued-product-001", "out-of-stock-002"]
}
```

## Error Responses

| Status Code | Description             |
| ----------- | ----------------------- |
| 400         | Bad Request             |
| 401         | Unauthorized            |
| 403         | Forbidden               |
| 404         | Product block not found |
| 500         | Internal Server Error   |

## Related Endpoints

* [POST /api/public/product/create/{promptBlockId}](/reference/product/create-products) - Create products
* [POST /api/public/product/upsert/{promptBlockId}](/reference/product/upsert-products) - Full sync
* [GET /api/public/product/product-blocks](/reference/product/get-product-blocks) - List blocks


## OpenAPI

````yaml post /api/public/product/delete/{promptBlockId}
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/product/delete/{promptBlockId}:
    post:
      tags:
        - Product
      summary: Delete products
      description: >-
        Delete products by their external IDs. This endpoint only deletes
        products.
      operationId: PublicProductController_deleteProducts
      parameters:
        - name: promptBlockId
          required: true
          in: path
          description: The prompt block ID from which to delete the products
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key needed to authorize the request
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: The payload with external IDs of products to delete
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicDeleteProducts'
      responses:
        '201':
          description: Products deleted successfully.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
components:
  schemas:
    PublicDeleteProducts:
      type: array
      minItems: 1
      items:
        type: object
        properties:
          external_id:
            description: External ID of product to delete
            type: string
            minLength: 1
        required:
          - external_id

````