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

# Bulk delete links

> Permanently delete up to 100 links by public ID.

Permanently delete up to 100 links from the API key's workspace. This endpoint
uses public `biq_lnk_...` IDs and requires **Links: Write** (`links.delete`).

## Request

Send the IDs as one comma-separated `link_ids` query parameter:

```bash theme={null}
curl --request DELETE \
  --url 'https://biq.li/api/v1/link/bulk?link_ids=biq_lnk_01M17YFAR0FEN7R66T99JH820N,biq_lnk_01M17Y6XGP07PR11S3DRFCX6Y9' \
  --header 'Authorization: Bearer biqli_your_workspace_api_key' \
  --header 'Accept: application/json'
```

The list must contain 1 to 100 distinct, correctly formatted public IDs.
Internal numeric IDs and workspace IDs are not accepted.

<Warning>
  Deletion is permanent. Short URLs stop resolving, attached QR files are
  removed, and related data is scheduled for cleanup. Use List or Retrieve to
  confirm targets before deleting them.
</Warning>

## Idempotent behavior

Valid IDs that are already deleted, missing, inaccessible to the key owner, or
belong to another workspace are ignored. This makes retrying the same request
safe and avoids revealing whether a link exists elsewhere.

Unlike the single-link Delete endpoint, bulk delete returns `200 OK` with a
summary body:

```json theme={null}
{
  "deleted_count": 2,
  "status": "success"
}
```

`deleted_count` is the number deleted by this request. It can be `0`. The
response does not echo identifiers, so retain your own submitted list if you
need to reconcile it.

## Errors

| HTTP status | Error code              | Meaning                                                                                                                          |
| ----------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `401`       | `invalid_token`         | The workspace API key is missing, invalid, or revoked.                                                                           |
| `403`       | `insufficient_scope`    | The key lacks `links.delete` or its user lost workspace access.                                                                  |
| `422`       | `validation_error`      | IDs are missing, malformed, duplicated, over the 100-item limit, or an unknown query parameter was supplied. Nothing is deleted. |
| `429`       | `rate_limit_exceeded`   | The workspace exceeded its API request limit.                                                                                    |
| `500`       | `internal_server_error` | An unexpected server error occurred.                                                                                             |

Validation responses include field errors under `error.details.errors`. Every
error includes a `request_id` for support and request tracing.

## Shared API behavior

Authentication is workspace-scoped; see [Authentication](/docs/api-reference/authentication). Errors use the standard envelope and request IDs described in [Errors](/docs/api-reference/errors), and requests are subject to [Rate limits](/docs/api-reference/rate-limits).


## OpenAPI

````yaml DELETE /v1/link/bulk
openapi: 3.1.0
info:
  title: Biqli API
  version: 1.0.0
  description: Workspace-scoped REST API for Biqli.
servers:
  - url: https://biq.li/api
security:
  - bearerAuth: []
paths:
  /v1/link/bulk:
    delete:
      tags:
        - Links
      summary: Bulk delete links
      description: >-
        Permanently deletes up to 100 links. Missing or inaccessible IDs are
        ignored. Requires links.delete.
      operationId: link.bulkDestroy
      parameters:
        - name: link_ids
          in: query
          required: true
          description: Comma-separated public link IDs.
          style: form
          explode: false
          schema:
            type: array
            minItems: 1
            maxItems: 100
            uniqueItems: true
            items:
              type: string
              pattern: ^biq_lnk_[0-9A-HJKMNP-TV-Z]{26}$
      responses:
        '200':
          description: Deletion request completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteLinksResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    BulkDeleteLinksResponse:
      type: object
      additionalProperties: false
      required:
        - deleted_count
        - status
      properties:
        deleted_count:
          type: integer
          minimum: 0
          maximum: 100
        status:
          type: string
          const: success
    ApiError:
      type: object
      required:
        - error
        - request_id
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_token
                - insufficient_scope
                - upgrade_required
                - quota_exceeded
                - resource_not_found
                - domain_taken
                - alias_taken
                - external_id_taken
                - folder_name_taken
                - tag_name_taken
                - pixel_name_taken
                - biolink_name_taken
                - method_not_allowed
                - url_blocked
                - dns_verification_failed
                - validation_error
                - rate_limit_exceeded
                - internal_server_error
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        request_id:
          type: string
          description: Request identifier to include when contacting support.
  responses:
    Unauthorized:
      $ref: '#/components/responses/ApiErrorResponse'
      description: The workspace API key is missing, invalid, or revoked.
    Forbidden:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The key lacks a required scope, the workspace must upgrade, or its quota
        is exhausted.
    UnprocessableEntity:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The payload is invalid, a destination was blocked, or domain DNS
        verification is not ready.
    RateLimited:
      description: The workspace exceeded its plan's API rate limit.
      headers:
        RateLimit-Policy:
          description: Current IETF HTTPAPI quota policy as a structured field.
          schema:
            type: string
            example: '"workspace-api";q=1000;w=60'
        RateLimit:
          description: Current IETF HTTPAPI service limit as a structured field.
          schema:
            type: string
            example: '"workspace-api";r=0;t=17'
        Retry-After:
          description: Seconds to wait before retrying the request.
          schema:
            type: integer
            minimum: 0
            example: 17
        X-RateLimit-Limit:
          description: Legacy maximum request count for the current window.
          schema:
            type: integer
            minimum: 1
            example: 1000
        X-RateLimit-Remaining:
          description: Legacy remaining request count.
          schema:
            type: integer
            minimum: 0
            example: 0
        X-RateLimit-Reset:
          description: Legacy reset time as a UTC Unix timestamp.
          schema:
            type: integer
            format: int64
            example: 1788126519
        X-Biq-Request-Id:
          description: Request identifier for support and tracing.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      $ref: '#/components/responses/ApiErrorResponse'
      description: The request failed unexpectedly.
    ApiErrorResponse:
      description: API error.
      headers:
        X-Biq-Request-Id:
          description: Request identifier for support and tracing.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Workspace API key
      description: A workspace API key beginning with biqli_.

````