Delete a collection

October 15, 2026

Table of contents

  1. Request Headers
  2. Responses
  3. Model
  4. Examples
  5. Try It

Remove a collection from its account. Its notebooks are not deleted: they stay on the account, outside this collection. To delete a notebook itself use DELETE /notebooks/notebook.

https://api.useapi.net/v1/gemini-notebook/collections/collection

  • collection is required, the collection id from GET /collections or POST /collections, URL-encoded in the path (it contains : and @). The id names its account, so no email is needed.
Request Headers
Authorization: Bearer {API token}
Responses
  • 204 No Content

    The collection was deleted. No body.

  • 400 Bad Request

    The path does not hold a valid collection id.

    {
      "error": "Path parameter collection (user%3A12345-user%40example.com-notebook%3Ad02c903b-17f8-4241-a263-2be9e7359d55) is not a valid collection id",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden

    The id was issued to a different API token.

    {
      "error": "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43 does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found

    The account the collection names is no longer configured.

    {
      "error": "Account [email protected] of user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43 is not configured",
      "code": 404
    }
    
  • 596 Account Error

    Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Gemini Notebook.

    {
      "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.",
      "code": 596
    }
    
    {
      "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-gemini-notebook",
      "code": 596
    }
    
  • 503 Service Unavailable

    Google is temporarily unavailable or is challenging our network. Retry in a few minutes. A 502 means Google answered with an unexpected error.

    {
      "error": "GOOGLE_BOT_CHECK: Google is challenging our network right now, please retry in a few minutes",
      "code": 503
    }
    
Model

A successful delete returns 204 with no body. Errors return:

{ // TypeScript, all fields are optional
  error: string
  code: number
}
Examples
  • COLLECTION="user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43"
    curl -X DELETE "https://api.useapi.net/v1/gemini-notebook/collections/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$COLLECTION")" \
       -H "Authorization: Bearer …"
    
  • const token = "API token";
    const collection = "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43";
    const apiUrl = `https://api.useapi.net/v1/gemini-notebook/collections/${encodeURIComponent(collection)}`;
    const response = await fetch(apiUrl, {
      method: "DELETE",
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    console.log("response", response.status);
    
  • import requests, urllib.parse
    token = "API token"
    collection = "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43"
    apiUrl = "https://api.useapi.net/v1/gemini-notebook/collections/" + urllib.parse.quote(collection, safe="")
    headers = {
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response.status_code)
    
Try It