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

# Bulk Delete Links

> Delete up to 100 short links in a single request

## Request

### Headers

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Body

<ParamField body="linkIds" type="array" required>
  Array of link IDs to delete (max: 100)

  **Example:** `["link_abc123", "link_def456", "link_ghi789"]`
</ParamField>

<Warning>
  This action is permanent and cannot be undone. All short URLs will immediately stop working.
</Warning>

## Response

<ResponseField name="deleted" type="array">
  Array of successfully deleted link IDs
</ResponseField>

<ResponseField name="failed" type="array">
  Array of failed deletion attempts with error details

  <Expandable title="properties">
    <ResponseField name="linkId" type="string">
      The link ID that failed to delete
    </ResponseField>

    <ResponseField name="error" type="object">
      Error details with `code` and `message`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="summary" type="object">
  Summary counts

  <Expandable title="properties">
    <ResponseField name="total" type="integer">
      Total number of links attempted
    </ResponseField>

    <ResponseField name="succeeded" type="integer">
      Number of successfully deleted links
    </ResponseField>

    <ResponseField name="failed" type="integer">
      Number of failed deletions
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.bouncy.ai/v1/links/bulk \
    -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "linkIds": ["link_abc123", "link_def456", "link_ghi789"]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.bouncy.ai/v1/links/bulk', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      linkIds: ['link_abc123', 'link_def456', 'link_ghi789']
    })
  });

  const result = await response.json();
  console.log(`Deleted ${result.summary.succeeded} links`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://api.bouncy.ai/v1/links/bulk',
      headers={
          'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'linkIds': ['link_abc123', 'link_def456', 'link_ghi789']
      }
  )

  result = response.json()
  print(f"Deleted {result['summary']['succeeded']} links")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "deleted": ["link_abc123", "link_def456"],
    "failed": [
      {
        "linkId": "link_ghi789",
        "error": {
          "code": "link_not_found",
          "message": "Link not found"
        }
      }
    ],
    "summary": {
      "total": 3,
      "succeeded": 2,
      "failed": 1
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": {
      "code": "invalid_request",
      "message": "linkIds array is required"
    }
  }
  ```

  ```json 400 Too Many Links theme={null}
  {
    "error": {
      "code": "too_many_links",
      "message": "Maximum 100 link IDs allowed per request. You provided 150."
    }
  }
  ```
</ResponseExample>
